[Lou][2.0.15] Blueprints are causing game to crash when loading any save or starting a new game

tapedeck
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jun 01, 2020 12:24 am
Contact:

[Lou][2.0.15] Blueprints are causing game to crash when loading any save or starting a new game

Post by tapedeck »

Reconsolidating everything into the OP, original post below the break.

ISSUE: With a review of the crash logs, it appears that I have a corrupted/invalid blueprint in my game storage and in my Space Age save file. I was unable to load my save or start a new game as the game would crash right at the end of loading. I was able to fix everything but my main save file but removing the blueprint storage files from the following locations:
AppData\Roaming\Factorio - blueprint-storage.dat, blueprint-storage2.dat, blueprint-storage-version-1.1-backup.dat
C:\Program Files (x86)\Steam\userdata\<UserNumber>\427520\remote - blueprint-storage.dat.zstd, blueprint-storage-2.dat.zstd

After some trial and error, it seems that the blueprint-storage-2 files in both locations are the issue, as without them in their respective folders, a new game will start just fine (but without any of my blueprints since 2.0). Notably even with the new game working, my save still won't load.

Issue occurs on 2.0.15 and 2.0.16, save won't load on 2.0.14 due to it being a newer version. All of the autosaves from the hour leading up to that recent save also have the same issue. The newest save that actually works is from 6 days prior (_autosave-platform2s-first-trip-to-vulcanus) does load but would lose me an entire planet's worth of progress.

I tried the bypass-library-sync secret setting but still experienced the same crashes.

Original post below:
-------------------------------------------

I last played Factorio yesterday and saved my game before exiting. The save went fine, but the game crashed when I clicked the exit to menu button (I don't have the logs from this crash). Today, I went to continue my save and the game crashes right at the end of loading/entity setup every time. I tried loading a previous autosave from the same day, as well as one from last week (one of the planet travel saves) and had the same result. I also have the same crash when I start a new game. I've included the logs from my main save (and save file) as well as the logs from a new game.

What did you do? Tried to load a save or start a new game.
What happened? The game crashed.
What did you expect to happen instead? It might be obvious to you, but do it anyway! I expected the game to complete loading and allow me to play.
Does it happen always, once, or sometimes? It happens every time, I am currently unable to play Factorio.

MOD: Space Age, Elevated Rails, Quality (no third party mods).
Attachments
crashes.zip
(26.43 MiB) Downloaded 10 times
Last edited by tapedeck on Mon Nov 11, 2024 4:01 pm, edited 2 times in total.
tapedeck
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jun 01, 2020 12:24 am
Contact:

Re: [2.0.15] Crash when loading any save or starting a new game

Post by tapedeck »

Just updated to 2.0.16 and the crash occurs exactly the same. Here's the logs from that attempt.
Attachments
factorio-current.log
(12.04 KiB) Downloaded 12 times
robot256
Smart Inserter
Smart Inserter
Posts: 1041
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [2.0.15] Crash when loading any save or starting a new game

Post by robot256 »

The attached save file (inside crashes.zip) also gives me the same error on 2.0.16. The stack trace makes it sound like something is wrong with a blueprint that includes walls. The fact that it also crashes for me means the defective blueprint has to be inside the savegame somewhere. But since you also have trouble with making a new game on your instance, it could be the defective blueprint also exists in your blueprints.dat file. Can you try renaming your blueprints-X.dat in the factorio folder and creating a new game? That should allow you to start a new game without issues.

Code: Select all

Factorio crashed. Generating symbolized stacktrace, please wait ...
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Util\ReleaseAssert.cpp(7): ReleaseAssertFailed
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Entity\EntityWithOwner.cpp(62): EntityWithOwner::EntityWithOwner
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Entity\WallConnectable.cpp(18): WallConnectable::WallConnectable
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Entity\Wall.cpp(19): Wall::Wall
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Data\InstanceLoader.hpp(56): `InstanceLoader<ID<EntityPrototype,unsigned short> >::registerLoader<Wall>'::`2'::<lambda_1>::<lambda_invoker_cdecl><EntityLoadingParameters>
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Entity\EntityPrototype.cpp(1006): EntityPrototype::loadEntity
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Blueprint\BlueprintEntities.cpp(58): BlueprintEntities::load
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Blueprint\Blueprint.cpp(201): Blueprint::loadReal
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Blueprint\Blueprint.cpp(101): Blueprint::load
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Blueprint\Blueprint.cpp(46): Blueprint::Blueprint
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Blueprint\BlueprintRecord.cpp(40): BlueprintRecord::load
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Blueprint\BlueprintBookRecord.cpp(433): BlueprintBookRecord::BlueprintBookRecord
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Blueprint\BlueprintRecord.cpp(41): BlueprintRecord::load
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Blueprint\BlueprintBookRecord.cpp(433): BlueprintBookRecord::BlueprintBookRecord
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Blueprint\BlueprintRecord.cpp(41): BlueprintRecord::load
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Blueprint\BlueprintShelf.cpp(69): BlueprintShelf::load
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Blueprint\BlueprintLibrary.cpp(224): BlueprintLibrary::load
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Map\Map.cpp(616): Map::loadData
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Map\Map.cpp(335): Map::load
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\src\Scenario\Scenario.cpp(232): Scenario::loadFactory
C:\Users\build\AppData\Local\Temp\factorio-build-rnR77b\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: 00007FF8905F257D)
00007FF8905F257D (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF8923AAF08)
00007FF8923AAF08 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
 102.117 Error EntityWithOwner.cpp:62: qualityID was not true
 102.117 Error CrashHandler.cpp:643: Received 22
EDIT: Yes that is definitely the problem. The "new game" log file crashes when it is reading blueprints, "Loading blueprint storage: Local timestamp 1731109844, Cloud timestamp 1731109843". Try disabling your Steam cloud sync, the bad file might be there as well. And then upload your blueprint*.dat files here for the devs.
tapedeck
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jun 01, 2020 12:24 am
Contact:

Re: [2.0.15] Crash when loading any save or starting a new game

Post by tapedeck »

I moved all the blueprint*.dat files as well as all the saves out of the factorio folder and onto my desktop. Still crashing when launching a new game.
Attachments
factorio-current.log
(13.18 KiB) Downloaded 10 times
tapedeck
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jun 01, 2020 12:24 am
Contact:

Re: [2.0.15] Crash when loading any save or starting a new game

Post by tapedeck »

Here's my blueprint files:
Attachments
blueprint-storage.zip
(13.45 MiB) Downloaded 12 times
tapedeck
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jun 01, 2020 12:24 am
Contact:

Re: [2.0.15] Crash when loading any save or starting a new game

Post by tapedeck »

I uninstalled the game, moved everything out of the AppData\Roaming\Factorio folder, installed the game, and went to start it and I'm still getting the same crash. Steam Cloud remains disabled from before I uninstalled. There are no blueprint-storage.dat files nor are there any saves.

Though I am noticing that steam is still placing a steam_autocloud.vdf file in the Saves folder even with cloud sync turned off in steam preferences.
Attachments
factorio-current.log
(13.18 KiB) Downloaded 8 times
tapedeck
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jun 01, 2020 12:24 am
Contact:

Re: [2.0.15] Crash when loading any save or starting a new game

Post by tapedeck »

Aha!

It appears that even with Cloud sync turned off in Steam, Factorio still looks in the C:\Program Files (x86)\Steam\userdata\<UserNumber>\427520\remote folder for blueprint storage (or steam still injects it into the game files).

After removing the files from that folder, I got an error when starting the game saying achievement progress could not be loaded, and then when starting a new game, I got the following error:
Screenshot 2024-11-10 115103.png
Screenshot 2024-11-10 115103.png (50.89 KiB) Viewed 580 times
But I was able to actually start a new game!

I placed everything except blueprint-storage.dat.zstd and blueprint-storage-2.dat.zstd back into the userdata\..\remote folder and new games continued to work (but my save was still crashing).

From there, I narrowed it down to blueprint-storage-2.dat being the culprit. With only that file removed from Appdata, new games will work just fine (though I don't have any of my blueprints since starting 2.0/Space Age). Though even with those files deleted, my save (or any of the recent autosaves) still won't load, even on 2.0.16.

Notably, The _autosave-platform2s-first-trip-to-vulcanus save from 6 days ago does work, but I'd rather not have to restart Vulcanus... I've attached that save here as well so they could possibly be compared.

Is there any way to crack open the blueprint-storage.dat file outside the game and remove blueprints from it? I would like to try to at least try eliminating one half and then continuing to half them until the culprit is found.

Also, is there any way to remove the blueprint data from a save so it can be continued?
Attachments
_autosave-platform-2s-first-trip-to-fulgora.zip
(16.03 MiB) Downloaded 8 times
tapedeck
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jun 01, 2020 12:24 am
Contact:

Re: [Lou][2.0.15] Blueprints are causing game to crash when loading any save or starting a new game

Post by tapedeck »

I found this method but I still experience the same crash when loading my save with bypass-library-sync enabled. I also tried on 2.0.14 but the save will not load due to the save file being for a newer version (2.0.14-2 I think). Still unable to play my save at all.
User avatar
Lou
Factorio Staff
Factorio Staff
Posts: 196
Joined: Mon Nov 30, 2020 10:50 am
Contact:

Re: [Lou][2.0.15] Blueprints are causing game to crash when loading any save or starting a new game

Post by Lou »

Hi. I have not gotten to the crux of the issue, but after disabling some checks and re-saving the save it loads OK for me:
I would hope with cmbination of the purging of the blueprint library, it might load for you as well.
EDIT: removed the wrong save file, it would fail to load, because dev version is higher than your version, will post correct one soon
tapedeck
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jun 01, 2020 12:24 am
Contact:

Re: [Lou][2.0.15] Blueprints are causing game to crash when loading any save or starting a new game

Post by tapedeck »

Lou, thanks! That save does indeed load without issue.

Would it be possible to get the non-offending blueprints out of that save or should I start going through my browser history to get my imports back?

Is there a set process to correctly restore steam cloud functionality without having the bad blueprint files syncing back down?
tapedeck
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jun 01, 2020 12:24 am
Contact:

Re: [Lou][2.0.15] Blueprints are causing game to crash when loading any save or starting a new game

Post by tapedeck »

Ehh, I was able to get pretty much everything I needed from the first-trip-to-vulcanus autosave. I used the bypass-library-sync method and dumped them to a book and re-imported them.
Post Reply

Return to “Assigned”