Page 1 of 1

[2.0.34] Crash with "!this->buffer was not true" on modded pipe

Posted: Sat Feb 08, 2025 10:36 am
by mooseyman
Log: https://drive.google.com/file/d/16FXjHO ... sp=sharing
Savefile: https://drive.google.com/file/d/1j1H7Av ... sp=sharing

Crashes to desktop a few seconds into save with no interaction (on warping).

Log stacktrace says

Code: Select all

  95.842 Info ConsistencyScraper.cpp:83: queued check: entity [name=wdm_ship_pipe, type=pipe-to-ground(PipeToGround), position={-47.500, 30.500}, direction=East, force=player, surface=space_ship_player, setup=true, owned-by-ghost=false, to-be-deconstructed=false, to-be-upgraded=false, simulation=false]
The pipe is from Warp Drive Machine https://mods.factorio.com/mod/Warp-Drive-Machine

The save has a lot of other mods installed but I don't think any of them interact with those pipes in any way. Save just wouldn't load if i removed them.

Re: [2.0.34] Crash with "!this->buffer was not true" on modded pipe

Posted: Sat Feb 08, 2025 12:10 pm
by mooseyman
Update:
Removing the offending pipe causes another wdm_ship_pipe to error instead.
Removing all wdm_ship_pipe from the surface prevents crash.
Disabling consistency-scraper in "the rest" settings prevents the crash.

No idea what the setting does though so not sure if it will break anything else. Is it new? my 2.0.32 install doesn't have the setting.

Re: [2.0.34] Crash with "!this->buffer was not true" on modded pipe

Posted: Sat Feb 08, 2025 12:53 pm
by boskid
mooseyman wrote: Sat Feb 08, 2025 12:10 pm Disabling consistency-scraper in "the rest" settings prevents the crash.

No idea what the setting does though so not sure if it will break anything else. Is it new? my 2.0.32 install doesn't have the setting.
That is new option that was added in 2.0.34 with the feature itself. I noticed a pattern with people's getting corrupted saves overwriting all autosaves which i am slightly tired of but we cannot run full consistency check before every save as it slows down the process significantly and there is huge pressure onto having save as fast as possible. Consistency scraper is a partial solution to this: if people would get corrupted game state somehow, this feature should after some time (preferably before all autosaves are overwritten) detect that something is wrong. This check tripping in other cases is a slightly expected side effect since usually consistency checks are rarely running for players (only when updating game or mods). Lets say that is part of "offensive programming", and the switch you found in hidden settings is a safety switch if you believe it is tripping incorrectly. Most likely raiguard will be checking if the fluid buffer consistency check tripping is a real issue or a false positive.

Re: [2.0.34] Crash with "!this->buffer was not true" on modded pipe

Posted: Sun Feb 09, 2025 1:51 am
by mooseyman
Thanks for the detailed response.

I couldn't find anything about consistency in any of the API docs, is it something we should be keeping in mind when developing mods? or is there anything we can do to help prevent it? I am not the dev of this mod but I have my own projects so would be good to know.
Most likely raiguard will be checking if the fluid buffer consistency check tripping is a real issue or a false positive.
Potentially relevant for him then that setting consistency-check to always doesn't cause any crashes (on saving, loading, or game start). But I will keep it on for now and hold a backup of my save in case there is something corrupted.

Re: [2.0.34] Crash with "!this->buffer was not true" on modded pipe

Posted: Sun Feb 09, 2025 7:37 pm
by Rseding91
mooseyman wrote: Sun Feb 09, 2025 1:51 am I couldn't find anything about consistency in any of the API docs, is it something we should be keeping in mind when developing mods? or is there anything we can do to help prevent it? I am not the dev of this mod but I have my own projects so would be good to know.
There is not. Consistency is supposed to be enforced by the engine and prevented at all possible entry points either by errors (can’t do x, wrong value provided and so on) or by silently making things correct when it applies.

Re: [2.0.34] Crash with "!this->buffer was not true" on modded pipe

Posted: Mon Feb 10, 2025 5:53 pm
by raiguard
Thanks for the report, this has been fixed for 2.0.35.