Page 1 of 1

[boskid][1.1.74] "Corrupted FluidBoxIndex, Crash / game file corrupts when removing pipes connected to some buildings

Posted: Tue Jan 03, 2023 5:22 am
by ___LUNK
I was trying to remove some of the solid fuel producing buildings in the screenshot and found that trying to remove the pipes supplying gas to the buildings would cause the game to crash very frequently, like 90% of the time. Screenshot below with the pipes circled that I think most commonly cause the crash. Picking up the pipes by hand, using robots, or destroying them all causes the problem, can't do it in editor mode either.
factorio_wz82LDFlJj.jpg
factorio_wz82LDFlJj.jpg (1.44 MiB) Viewed 1025 times
I think I'm able to pick up some of the pipes by emptying the fluid contents, but then if I save the game I get this error upon trying to reload:
factorio_9qIamWyaYq.jpg
factorio_9qIamWyaYq.jpg (879.19 KiB) Viewed 1025 times
I've attached save games of the map before and after the corruption(?), plus the crash log, mods are shown in the screenshot too:

Before:
LUNKWRLD 2 09a.zip
(21.5 MiB) Downloaded 42 times
After:
LUNKWRLD 2 09b.zip
(21.66 MiB) Downloaded 41 times
log:
factorio-current.log
(11.92 KiB) Downloaded 40 times
Anyone able to help? I've basically got a tainted map now :(

Re: [boskid][1.1.74] "Corrupted FluidBoxIndex, Crash / game file corrupts when removing pipes connected to some buildin

Posted: Tue Jan 03, 2023 9:02 am
by boskid
I will take a look at why this save file reports as consistent while making this bug to appear, however when loading this save file with prototype changed mode (by holding control key while pressing the green "load" button) the fluid systems are rebuilt from scratch and i cannot reproduce this issue anymore as it fixes whatever the issue was in the save file.

Re: [boskid][1.1.74] "Corrupted FluidBoxIndex, Crash / game file corrupts when removing pipes connected to some buildin

Posted: Tue Jan 03, 2023 9:39 am
by boskid
Ok i see where the issue comes from. You are quite right with narrowing where the issue is. On the image below, the pipe-to-ground "A" thinks it is connected to pipe "B", however that connection of pipe "B" reports as being connected to chemical plant "C". You may even notice the graphical artifacts around the pipe-to-ground "A" as it has no cover rendered (because that connection reports as being connected) while the pipe on the right of it is not adjusting its shape because it does not recognize being connected to the pipe-to-ground on its left. Loading save file in prototype changed mode as mentioned above is the easiest solution (hold Ctrl while pressing "Load") as it rebuilds connections from scratch. Those connections would be rebuilt from scratch also when any upgrade to the base game would happen or if any mod would be updated. Only things i may consider adding for 1.1.75 are some extra consistency checks to make sure such save files will be detected earlier with more detailed information of what is broken.

Re: [boskid][1.1.74] "Corrupted FluidBoxIndex, Crash / game file corrupts when removing pipes connected to some buildin

Posted: Tue Jan 03, 2023 10:10 am
by boskid
I am moving this bug report to "1/0 magic". For 1.1.75 i have added some extra consistency checks related to loading save files with this type of corruption (fluidbox connection pointing to another fluidbox connection that is already connected to something else) but i was unable to reproduce how such corrupted save file would be created. Save file can be fixed on your end as mentioned already.

Re: [boskid][1.1.74] "Corrupted FluidBoxIndex, Crash / game file corrupts when removing pipes connected to some buildin

Posted: Tue Jan 03, 2023 2:11 pm
by ___LUNK
Thanks very much!