Page 1 of 1

[posila] [1.1.3] Crash during blueprint rotating when blueprint contains Splitter

Posted: Tue Dec 01, 2020 10:31 pm
by VyacheslavEnis
Hi,

I have a problem which can be almost 100% reproduced using my save with provided set of mods. Steps to reproduce this crash are following:
  • Load savefile
  • Create any blueprint which contains splitter (just 2-3 splitters are enough)
  • Select this blueprint
  • Rotate it couple of times (sometimes 2-3, sometimes 10) without placing.
At some point game just freezes and log file contains information about actual crash. I've seen two different types of the crash in the log:

First crash has following in the log:

Code: Select all

Factorio crashed. Generating symbolized stacktrace, please wait ...
#1  0x000000010b1faff2 in Logger::logStacktrace(StackTraceInfo*) + 0x12
#2  0x000000010a679df9 in CrashHandler::writeStackTrace(CrashHandler::CrashReason) + 0xb9
#3  0x000000010b1e1ed4 in CrashHandler::commonSignalHandler(int) + 0x74
#4  0x000000010b1e13b9 in CrashHandler::SignalHandler(int) + 0x9
#5  0x00007fff6f072b5d in _sigtramp + 0x1d
Stack trace logging done
 471.726 Error CrashHandler.cpp:189: Map tick at moment of crash: 1289569
 471.726 Error Util.cpp:97: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.

Second one - following:

Code: Select all

Factorio crashed. Generating symbolized stacktrace, please wait ...
#1  0x0000000109f73ff2 in Logger::logStacktrace(StackTraceInfo*) + 0x12
#2  0x00000001093f2df9 in CrashHandler::writeStackTrace(CrashHandler::CrashReason) + 0xb9
#3  0x0000000109f5aed4 in CrashHandler::commonSignalHandler(int) + 0x74
#4  0x0000000109f5a3b9 in CrashHandler::SignalHandler(int) + 0x9
#5  0x00007fff6f072b5d in _sigtramp + 0x1d
#6  0x000000010922720b in Splitter::drawItems(DrawQueue&, unsigned char, unsigned int&, FixedPointNumberTemplate<int, 8u>&) const + 0x2b
#7  0x00000001093eeb56 in EntityRenderer::prepareRow(int, unsigned long) + 0xaa6
#8  0x00000001093edf15 in EntityRenderer::threadJob(unsigned long) + 0x65
#9  0x0000000109fb4955 in WorkerThread::loop() + 0x85
#10 0x000000010a47ee0e in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (WorkerThread::*)(), WorkerThread*> >(void*) + 0x3e
#11 0x00007fff6f07b2eb in _pthread_body + 0x7e
#12 0x00007fff6f07e249 in _pthread_start + 0x42
Stack trace logging done
4219.043 Error CrashHandler.cpp:189: Map tick at moment of crash: 1286987
4219.043 Error Util.cpp:97: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.

Steps to reproduce and visible results are completely the same. I've attached both logs and actual savefile.

Re: [1.1.3] Crash during blueprint rotating when blueprint contains Splitter

Posted: Tue Dec 01, 2020 11:11 pm
by VyacheslavEnis
Just got completely the same crash with same log file content just by moving blueprint with splitters and belts only without any rotate. Log file attached

Re: [1.1.3] Crash during blueprint rotating when blueprint contains Splitter

Posted: Tue Dec 01, 2020 11:13 pm
by VyacheslavEnis
Also maybe it will help - the game is freezed and need's to be killed manually after crash. So it's not closed and still running as "Not responding"

Re: [1.1.3] Crash during blueprint rotating when blueprint contains Splitter

Posted: Mon Dec 07, 2020 3:29 pm
by posila
I can't reproduce the issue crash even in 1.1.3. Could you please post also blueprint I should try to rotate and specify where on the map should I be hovering it when rotating it? (does it crash even if you do that in a location where the blueprint doesn't collide with anything, nor connects to any belts)?

Re: [1.1.3] Crash during blueprint rotating when blueprint contains Splitter

Posted: Mon Dec 07, 2020 3:35 pm
by VyacheslavEnis
Actually it doesn't depends on any specific blueprint. I've reproduced it couple of times just using following steps:
  • Load attached savefile
  • Place 2 or 3 Splitters
  • Copy them and put to the inventory as a blueprint
  • Grab this blueprint and move mouse around a base (even without rotation). At some point )and I don't know when, it's always random place for me) game will just freeze and needs to be force closed. Game log will looks like as one of the attached logs

Re: [1.1.3] Crash during blueprint rotating when blueprint contains Splitter

Posted: Mon Dec 07, 2020 3:56 pm
by posila
Does it happen also in 1.1.5?
I still was not able to reproduce it.
This is blueprint with 3 splitters I am using:
3splitters.png
3splitters.png (11.45 KiB) Viewed 4469 times

Re: [1.1.3] Crash during blueprint rotating when blueprint contains Splitter

Posted: Mon Dec 07, 2020 3:58 pm
by VyacheslavEnis
Will try to reproduce it in 1.5 and will post a result.

Re: [1.1.3] Crash during blueprint rotating when blueprint contains Splitter

Posted: Mon Dec 07, 2020 3:58 pm
by posila
VyacheslavEnis wrote: Mon Dec 07, 2020 3:58 pm Will try to reproduce it in 1.5 and will post a result.
Thank you very much!

Re: [1.1.3] Crash during blueprint rotating when blueprint contains Splitter

Posted: Mon Dec 07, 2020 7:50 pm
by VyacheslavEnis
Checked on 1.1.5 with all used mods updated to the latest version. Got the same freeze with yours splitters combination. Crash log contains the same:

Code: Select all

Factorio crashed. Generating symbolized stacktrace, please wait ...
#1  0x0000000102773c82 in Logger::logStacktrace(StackTraceInfo*) + 0x12
#2  0x0000000101bf0039 in CrashHandler::writeStackTrace(CrashHandler::CrashReason) + 0xb9
#3  0x000000010275ab64 in CrashHandler::commonSignalHandler(int) + 0x74
#4  0x000000010275a049 in CrashHandler::SignalHandler(int) + 0x9
#5  0x00007fff6df0bb5d in _sigtramp + 0x1d
#6  0x0000000101a23e4b in Splitter::drawItems(DrawQueue&, unsigned char, unsigned int&, FixedPointNumberTemplate<int, 8u>&) const + 0x2b
#7  0x0000000101bebd96 in EntityRenderer::prepareRow(int, unsigned long) + 0xaa6
#8  0x0000000101beb155 in EntityRenderer::threadJob(unsigned long) + 0x65
#9  0x00000001027b45e5 in WorkerThread::loop() + 0x85
#10 0x0000000102c7e76e in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (WorkerThread::*)(), WorkerThread*> >(void*) + 0x3e
#11 0x00007fff6df142eb in _pthread_body + 0x7e
#12 0x00007fff6df17249 in _pthread_start + 0x42
Stack trace logging done
 420.595 Error CrashHandler.cpp:189: Map tick at moment of crash: 1287711
 420.595 Error Util.cpp:97: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.
Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.

Also I've made screenshot right after game freezes. Single blueprint in the quick-bar is the splitters in the hand. Just moved around. Also I've noticed that almost all if not all crashes where when mouse cursor was near the place in the screenshot. I've tried to move mouse to the left near the copper belts and it's not crashed at all. But when I moved my mouse to the right side - it's crashed again. Maybe it's somehow terrain-related? :
screen.png
screen.png (5.24 MiB) Viewed 4426 times

Re: [posila] [1.1.3] Crash during blueprint rotating when blueprint contains Splitter

Posted: Tue Dec 08, 2020 9:18 am
by posila
Thanks for the report.
Fixed for 1.1.6

Your screenshot made me realize something I didn't pay attention to before, and that's that there are camera widgets. It was race condition between rendering of camera widget and game view, due to building preview temporarily modifying map for buildability checks and connecting belts in the preview with real belts (etc.)
So that meant, the larger blueprint the higher chance the crash will happen, and that helped me to reproduce the issue and fix it. Thanks for the additional info.

Re: [posila] [1.1.3] Crash during blueprint rotating when blueprint contains Splitter

Posted: Tue Dec 08, 2020 9:25 am
by VyacheslavEnis
Perfect. Thank you.