[2.0.20] Crash on save load - Consistency failed in arithmetic combinator with quality in signals

This subforum contains all the issues which we already resolved.
Soggs
Inserter
Inserter
Posts: 23
Joined: Fri Sep 28, 2018 6:53 pm
Contact:

[2.0.20] Crash on save load - Consistency failed in arithmetic combinator with quality in signals

Post by Soggs »

Autosaves are also dead. If you need anything else, let me know.

Code: Select all

79.434 Loading map C:\Factorio Space Age\saves\Solo-SpaceAge.zip: 45223547 bytes.
  79.483 Loading level.dat: 133880987 bytes.
  79.487 Info Scenario.cpp:178: Map version 2.0.19-0
Factorio crashed. Generating symbolized stacktrace, please wait ...
C:\Users\build\AppData\Local\Temp\factorio-build-l9PYyt\src\ID\IDWithQuality.cpp(272): IDWithQuality<SignalIDBase>::checkConsistency
C:\Users\build\AppData\Local\Temp\factorio-build-l9PYyt\src\CircuitNetwork\Behaviors\ArithmeticCombinatorControlBehavior.cpp(49): ArithmeticCombinatorControlBehavior::checkConsistency
C:\Users\build\AppData\Local\Temp\factorio-build-l9PYyt\src\Entity\Entity.cpp(1895): Entity::checkConsistency
C:\Users\build\AppData\Local\Temp\factorio-build-l9PYyt\src\Entity\EntityWithHealth.cpp(145): EntityWithHealth::checkConsistency
C:\Users\build\AppData\Local\Temp\factorio-build-l9PYyt\src\Entity\EntityWithOwner.cpp(348): EntityWithOwner::checkConsistency
C:\Users\build\AppData\Local\Temp\factorio-build-l9PYyt\src\Surface\Surface.cpp(136): Surface::checkConsistency
C:\Users\build\AppData\Local\Temp\factorio-build-l9PYyt\src\Map\Map.cpp(1719): Map::checkConsistency
C:\Users\build\AppData\Local\Temp\factorio-build-l9PYyt\src\Map\MapSetupHelper.cpp(189): MapSetupHelper::MapSetupHelper
C:\Users\build\AppData\Local\Temp\factorio-build-l9PYyt\src\Map\Map.cpp(827): Map::setupEntities
C:\Users\build\AppData\Local\Temp\factorio-build-l9PYyt\src\Scenario\Scenario.cpp(331): Scenario::loadFactory
C:\Users\build\AppData\Local\Temp\factorio-build-l9PYyt\src\Scenario\ParallelScenarioLoader.cpp(192): ParallelScenarioLoader::doLoad
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\thread(56): std::thread::_Invoke<std::tuple<void (__cdecl*)(MapInterface,ParallelScenarioLoader *,MapDeserialiser *,enum InputType,InputSource *,MultiplayerManagerBase *,NamedBool<EnableReplayTag>),MapInterface,ParallelScenarioLoader *,MapDeserialiser *,enum InputType,InputSource *,MultiplayerManagerBase *,enum NamedBool<EnableReplayTag>::Enum>,0,1,2,3,4,5,6,7>
minkernel\crts\ucrt\src\appcrt\startup\thread.cpp(97): thread_start<unsigned int (__cdecl*)(void *),1>
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFDC72E257D)
00007FFDC72E257D (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFDC830AF08)
00007FFDC830AF08 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
  83.273 Error IDWithQuality.cpp:274: consistency check failed: scrap, <null>
  83.273 Error CrashHandler.cpp:643: Received 22
Logger::writeStacktrace skipped.
  83.322 Info CrashHandler.cpp:318: Executable CRC: 384704539
  83.322 Error Util.cpp:95: 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.
  90.078 Uploading log file
  90.123 Error CrashHandler.cpp:270: Heap validation: success.
  90.124 Creating crash dump.
  90.318 CrashDump success
Attachments
Solo-SpaceAge.zip
(43.13 MiB) Downloaded 13 times
factorio-dump-1.dmp
(1.67 MiB) Downloaded 12 times
factorio-crashlog-1.log
(10.53 KiB) Downloaded 18 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3456
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.20] Crash on save load - Consistency failed in arithmetic combinator with quality in signals

Post by boskid »

Thanks for the report. Here is a fixed save file:
122043-Solo-SpaceAge-fixed.zip
(36.68 MiB) Downloaded 20 times

Arithmetic combinator that was specifically in a broken state was at [gps=-750.5,61,fulgora] (if you paste this into in game chat it will show you exact position) which you may need to verify if its configured correctly because i set it to take scrap of normal quality.

This consistency check is exactly what was added because of 120441 - is the corrupted entity at a position where you were placing parametrized blueprint and when placing it you choosed an "Any" quality? or do you have a different way of making it inconsistent without using blueprint parameters?
Soggs
Inserter
Inserter
Posts: 23
Joined: Fri Sep 28, 2018 6:53 pm
Contact:

Re: [2.0.20] Crash on save load - Consistency failed in arithmetic combinator with quality in signals

Post by Soggs »

Arithmetic combinator that was specifically in a broken state was at [gps=-750.5,61,fulgora] (if you paste this into in game chat it will show you exact position) which you may need to verify if its configured correctly because i set it to take scrap of normal quality.
First of all, thank you for fixing it. I guess I have to do something else to count total scrap regardless of quality. Did you also remove or change a train? I swear there was train with fixed scheduled assigned to the station but not a big deal. More asking for my own sanity.
This consistency check is exactly what was added because of 120441 - is the corrupted entity at a position where you were placing parametrized blueprint and when placing it you choosed an "Any" quality? or do you have a different way of making it inconsistent without using blueprint parameters?
99% sure that was placed via BP parameters. It probably was this BP with the steel chests removed after placing. The station left of it uses the same design.

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

Re: [2.0.20] Crash on save load - Consistency failed in arithmetic combinator with quality in signals

Post by boskid »

Soggs wrote: Tue Nov 19, 2024 11:59 am Did you also remove or change a train? I swear there was train with fixed scheduled assigned to the station but not a big deal. More asking for my own sanity.
The way i fixed this save file guarantees i was not changing anything else: by loading this save file i got the position in the save file that was corrupted and i adjusted exactly 1 byte related to quality of that specific signal. This change was done using hex editor which is not capable of removing trains.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3456
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.20] Crash on save load - Consistency failed in arithmetic combinator with quality in signals

Post by boskid »

I am moving this to Resolved given that 2.0.21 contains a migration that should be handling those cases now automatically.

Core of the issue was that there was one interaction where using parametrized blueprint building of a blueprint where a parameter was on a logistic container and combinator at the same time in certain cases allowed setting "any" quality on the combinator even when it was not supposed to. In 2.0.20 i added consistency check to combinators to throw an error if this type of corruption was detected but there were some decisions about blueprint parameters to be decided so there was no migration implemented for this. 2.0.21 includes consistency checks and also includes migration to fix saves created before that will get fixed automatically if they are seen in a broken state: in that case log will contain info records stating "fixing missing qualityID for id ..."
Post Reply

Return to “Resolved Problems and Bugs”