[boskid][1.1.35] Crash placing small cargowagon "this->state == RailConnectionDirection::None was not true"

This subforum contains all the issues which we already resolved.
Post Reply
Roboboy
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Jun 29, 2021 9:13 pm
Contact:

[boskid][1.1.35] Crash placing small cargowagon "this->state == RailConnectionDirection::None was not true"

Post by Roboboy »

This crash is caused while trying to place a smaler than normal lokomotive/wagon betwen two of thes smaler wagons snaped together by the automatik trainsnaping. This causes a crash always when i do this. One of two things shud happen either it shud nof have be able to place it or place them closer together so that they conect together like the big ones.
Attachments
factorio-current.log
(9.08 KiB) Downloaded 32 times
20210630001012_1.jpg
20210630001012_1.jpg (878.01 KiB) Viewed 329 times

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 1527
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.35] Crash placing small cargowagon "this->state == RailConnectionDirection::None was not true"

Post by boskid »

Ugh... i am fully aware of this crash being possible in exactly those cases, they just did not happen in general in vanilla or with most of the mods. Its related to having 2 trains over the same connection between rails as the connection is able to store state for only a single train. Option to insert a rolling stock in between of 2 other rolling stocks is not an option because 2 outer stocks are already at the required connection distance from each other so trying to build another rolling stock in between would need to move them out quite a lot. Only reasonable fix for this is to prevent building rolling stock when it would need to register over already used rail connection. This will also require extra handling for other weird cases like having both outer rolling stocks to be on the same rail (like curved-rail) and trying to build a rolling stock exactly in between as in that case it will not require registration over any rail connections but that will still cause some issues when the outer train would start moving.

I will look into possible ways to prevent this action from happening that will not fallback into more rolling stock prototype restrictions if possible.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 1527
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [boskid][1.1.35] Crash placing small cargowagon "this->state == RailConnectionDirection::None was not true"

Post by boskid »

Ok i managed to find a relatively simple solution for this so the issue is now fixed for 1.1.36. It does not fix every possible case (i can find some obscure cases that will still crash) but this is good enough for now.

Post Reply

Return to “Resolved Problems and Bugs”