Page 1 of 1

[Rseding91] [1.1.57] changing dependency order may cause "corrupt map - bad load statistics size"

Posted: Mon Apr 25, 2022 10:07 pm
by Honktown
When dependency order of mods is the only thing that changes from before and after a save, AND prototypes are only added, then the 'corrupt map' message happens.

Example:
dependency_order_map_corruption_A_1.0.0.zip
(1.09 KiB) Downloaded 32 times
dependency_order_map_corruption_B_1.0.0.zip
(1017 Bytes) Downloaded 32 times
A_then_B.zip
(1.3 MiB) Downloaded 31 times
A has a procedural function to create prototypes. B adds a prototype. A does not create a prototype because it is ordered before B.

Expected Solution: Change the "dependencies" : ["base"] in A to "dependencies": ["base", "dependency_order_map_corruption_B"]

Restart Factorio, load the save. Message:

Code: Select all

   8.912 Warning Map.cpp:346: Map loading failed: corrupt map - bad loaded statistics size: 531 != 532
   8.963 Error AppManagerStates.cpp:1599: corrupt map - bad loaded statistics size: 531 != 532
*IF* a prototype goes missing, the game pops up the dialog that XYZ has been removed.

Expected result: No error, additional prototypes work as expected (even if a manual reset_technology_effects() etc is needed)

Re: [Rseding91] [1.1.57] changing dependency order may cause "corrupt map - bad load statistics size"

Posted: Tue Apr 26, 2022 3:21 pm
by Rseding91
Thanks for the report. It's now fixed for the next release.