[boskid][1.1.56] Crash when rapidly placing blueprint (RailChainSignal::clearChainState)

This subforum contains all the issues which we already resolved.
Medium9
Inserter
Inserter
Posts: 22
Joined: Thu Oct 04, 2018 8:30 pm
Contact:

[boskid][1.1.56] Crash when rapidly placing blueprint (RailChainSignal::clearChainState)

Post by Medium9 »

Bug observed in editor mode when placing the following BP in quick succession by walking with it in hand with LMB pressed. Effect is a crash to desktop.
(This already happened in the previous version as well.)

The map parts were entirely cleared of obstacles, and ~380 of these squares were already in place, so that adding more caused short lags of a few 100ms on placing each. The 380 former ones were added slowly one by one, which seemingly continues to be no issue.



This BP only contains chain signals, but there were versions of it with 4 stations and rail signals towards the middle "city block style" already present in the map, with the newly inserted ones connecting to the same rail network. It was not all only chain signals on the network, which I could imagine can become iffy.

Log file and savegame attached.

The BP pasted above is called "_MASTER GRID no stations" ingame, with only a rail symbol on the icon. I tried filling out the upper left corner to make it flush with the sides when the crash first occured, but it looks like it consistently happens after quickly adding about 20 more squares.
Attachments
Pretty Sucker 0.3.zip
(89.03 MiB) Downloaded 146 times
factorio-current.log
(117.06 KiB) Downloaded 130 times
Medium9
Inserter
Inserter
Posts: 22
Joined: Thu Oct 04, 2018 8:30 pm
Contact:

Re: [1.1.56] Crash when rapidly placing blueprint (RailChainSignal::clearChainState)

Post by Medium9 »

Update: After I slowly added ~20 more squares after many tries, it has now gotten to a point where this error occurs immediately before the switch from the loading bar to the game screen should happen, after loading the savegame from a freshly started game. I therefore cannot continue with this base :(

I also tried to set all trains to manual to avoid their potential re-pathing before the ultimate "save death", but it seemingly made no difference.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2964
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [boskid][1.1.56] Crash when rapidly placing blueprint (RailChainSignal::clearChainState)

Post by boskid »

Thanks for the report, issue is now fixed for 1.1.57.

Having 19k+ chain signals in such large network is not something the game was designed for and it was crashing on a recursive update. This configuration is really bad for performance because every time a state of some signals change, it has to go through all 19k+ chain signals, clear them and recompute everything recurisvely which is quite expensive operation.
Medium9
Inserter
Inserter
Posts: 22
Joined: Thu Oct 04, 2018 8:30 pm
Contact:

Re: [boskid][1.1.56] Crash when rapidly placing blueprint (RailChainSignal::clearChainState)

Post by Medium9 »

So this was essentially a classic stack overflow? Neat!

And woah, I was not aware that this was already at over 19k signals. Whoopsie.
This base was fully intentionally made using two things I percieve as anti-patterns: 2-way rails and city block style layout, and I wanted to push it. Mostly for the fun of it, and then having a working example of why I don't like these thing. I'll add the conclusion of this to my list! :)

And guys, you're incredible. Actually fixing something that is, realistically, just a result of abusing the game. Just amazing!
Post Reply

Return to “Resolved Problems and Bugs”