[0.17.76] Crash when saving, in FluidBoxManager

Post your bugs and problems so we can fix them.
Post Reply
killerbee13
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat May 07, 2016 11:28 pm
Contact:

[0.17.76] Crash when saving, in FluidBoxManager

Post by killerbee13 » Thu Nov 14, 2019 8:30 am

I have a heavily modded game, and a bug in the Turret Shields mod caused some shield entities to be left behind after the turrets were removed, so I tried to remove the mod to force them to disappear. This worked fine, and then I immediately saved so I could reload with the mod again, and it froze about halfway through the progress bar and then crashed. I tried again to reproduce it, and it did exactly the same thing.

My system information is Debian GNU/Linux 9.11 "Stretch". AMD Ryzen 5 1600 CPU, NVIDIA GeForce GTX 1050 Ti, 16 GB RAM.

I've included the original save file, as well as the two .tmp files from the crashes, the two log files, my mod-list.json. All mods are the current versions from the mod portal.

This is the last section of the log file, for searchability.

Code: Select all

Factorio crashed. Generating symbolized stacktrace, please wait ...
Raw stacktrace: 0xb4d718, 0xd30c2d, 0xa03f19, 0xa1a64f, 0xc582a4, 0xc583f2, 0xc58491, 0x7b8466, 0xb6e6ac, 0xbd585d, 0xd9462e, 0xd9501c, 0xe8b633, 0xf608a4, 0x19df41f, 0x74a4, 0
 187.921 Warning Logger.cpp:518: Symbols.size() == 23, usedSize == 16
#0  0x0000000000d30c2d in std::__uniq_ptr_impl<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::_M_ptr() const at /usr/include/c++/8/bits/unique_ptr.h:150
#1  0x0000000000a03f19 in std::unique_ptr<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::get() const at /usr/include/c++/8/bits/unique_ptr.h:343
#2  0x0000000000a1a64f in std::unique_ptr<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::operator->() const at /usr/include/c++/8/bits/unique_ptr.h:337
#3  0x0000000000c582a4 in Logger::flush() at /tmp/factorio-build-puo5ip/src/Util/Logger.cpp:558
#4  0x0000000000c583f2 in Logger::logStacktrace(StackTraceInfo*) at /tmp/factorio-build-puo5ip/src/Util/Logger.cpp:544
#5  0x0000000000c58491 in Logging::flush() at /tmp/factorio-build-puo5ip/src/Util/Logging.cpp:69
#6  0x00000000007b8466 in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, std::string const&) at /tmp/factorio-build-puo5ip/src/Util/Logging.cpp:103
#7  0x0000000000b6e6ac in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, char const*, ...) at /tmp/factorio-build-puo5ip/src/Util/Logging.cpp:93
#8  0x0000000000bd585d in FluidBoxManager::save(MapSerialiser&) const at /tmp/factorio-build-puo5ip/src/Fluid/FluidBoxManager.cpp:522 (discriminator 1)
#9  0x0000000000d9462e in CraftingMachine::save(MapSerialiser&) const at /tmp/factorio-build-puo5ip/src/Entity/CraftingMachine.cpp:527
#10 0x0000000000d9501c in Furnace::save(MapSerialiser&) const at /tmp/factorio-build-puo5ip/src/Entity/Furnace.cpp:602
#11 0x0000000000e8b633 in EntityUsageBitMask::operator|=(int) at /tmp/factorio-build-puo5ip/src/Entity/EntityUsageBitMask.hpp:43
#12 0x0000000000f608a4 in Entity::setSaved() at /tmp/factorio-build-puo5ip/src/Entity/Entity.hpp:440
#13 0x00000000019df41f in Chunk::saveNonRecursive(Entity*, MapSerialiser&) at /tmp/factorio-build-puo5ip/src/Surface/Chunk.cpp:383
#14 0x00000000000074a4 in Chunk::save(MapSerialiser&, ChunkPosition const&) const at /tmp/factorio-build-puo5ip/src/Surface/Chunk.cpp:121
#15 (nil) in Surface::save(MapSerialiser&, unsigned int*, unsigned int, ProgressObserver*) at /tmp/factorio-build-puo5ip/src/Surface/Surface.cpp:863 (discriminator 3)
#16 (nil) in Map::save(MapSerialiser&, ProgressObserver*) const at /tmp/factorio-build-puo5ip/src/Map/Map.cpp:1419
#17 0x696461722c302b70 in Scenario::saveMap(SaveType, PackageWriter&, TargetSerialiser&, ProgressObserver*, bool&) at /tmp/factorio-build-puo5ip/src/Scenario/Scenario.cpp:1001
#18 0x2b703478303d7375 in Scenario::saveAs(Filesystem::Path const&, std::string const&, Filesystem::Path const&, ProgressObserver*, SaveType) at /tmp/factorio-build-puo5ip/src/Scenario/Scenario.cpp:888
#19 0x5f746e756f632c30 in ParallelScenarioSaver::doSave(ParallelScenarioSaver*) at /tmp/factorio-build-puo5ip/src/Scenario/ParallelScenarioSaver.cpp:99
#20 0x703278303d6e696d in execute_native_thread_routine at blake2s.c:?
#21 0x746e756f632c302b in ?? at ??:0
#22 0x3278303d78616d5f in ?? at ??:0
Stack trace logging done
 193.995 Warning Logger.cpp:518: Symbols.size() == 18, usedSize == 15
 193.995 Error FluidBoxManager.cpp:517: fluidBox->isInFluidManager() was not true
Logger::writeStacktrace skipped.
 193.996 Error CrashHandler.cpp:189: Map tick at moment of crash: 12049614
 193.996 Error Util.cpp:97: 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.
 210.424 Info SystemUtil.cpp:539: Started /usr/bin/xdg-open; trampoline PID: 17751
 210.424 Uploading log file
 210.467 Info SystemUtil.cpp:539: Started /home/killerbee/.local/share/Steam/steamapps/common/Factorio/bin/x64/factorio; trampoline PID: 17752
As an aside, I discovered that the mod provides a command "ts refresh" which cleanly removed the shields. After that, the game saved fine. I reported the original bug to the mod author, as well.
Attachments
mod-list.json
(11.24 KiB) Downloaded 8 times
factorio-current-2.log
The reproduction log file
(69.74 KiB) Downloaded 5 times
factorio-current-1.log
The first log file
(69.82 KiB) Downloaded 7 times
Epsilon-24.3.tmp.zip
The corrupted save from the reproduction attempt
(6.8 MiB) Downloaded 3 times
Epsilon-24.1.tmp.zip
The first corrupted save
(7.02 MiB) Downloaded 2 times
Epsilon-24.zip
The original save
(14.97 MiB) Downloaded 4 times

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 902
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.17.76] Crash when saving, in FluidBoxManager

Post by TruePikachu » Thu Nov 14, 2019 6:09 pm

I read through the first attached log, and found it curious there was no summary of applied migrations (which should have happened, given that the mod configuration was changed). It might be a feature request for them to be added to the log, just to simplify diagnosing these kinds of issues that involve migrations.

The mod doesn't appear to modify turrets at all, nor utilize the fluid network (even for recipes), nor create any crafting machines (or their subtypes e.g. furnaces). Assuming all other mods behaved properly on migration steps, I don't see any reason why removing this mod would have caused a crash in this place, so I'm tempted to believe it was some other mod that was the root cause. Do you get the crash if you remove any other mod that has entities in the world while leaving Turret Shields?

Also, what's the full list of migrations listed in a dialog box when you start the game after removing Turret Shields? I feel that might be able to give a couple hints as to what's going on, since (to me) it looks like some crafter that uses the fluid network is being modified for some reason.

killerbee13
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat May 07, 2016 11:28 pm
Contact:

Re: [0.17.76] Crash when saving, in FluidBoxManager

Post by killerbee13 » Sun Nov 17, 2019 9:43 am

The migrations are:

Code: Select all

Migrated content
Removed entities
liquid-square-12	4
square-0	4
square-8	77
ts-electic-interface 699

Removed recipes
ts-shield-disabler
turret-shield-combinator

Removed technologies
turret-shields-base
turret-shields-size-1
turret-shields-size-2
turret-shields-size-3
turret-shields-speed-1
turret-shields-speed-2
turret-shields-speed-3
I tried removing several other mods which added entities, one at a time, and Geothermal also caused a crash when removed. But after that I was out of time to try more mods, and didn't have any time to even post this until today. I included the log file for that crash as well, and the full list of migrated content below.

Code: Select all

Migrated content
Removed entities
geothermal-heat-exchanger	50
geothermal-well	33
geothermal	197
geothermal-purple	19
geothermal-light	197
geothermal-light-purple	19

Removed items
geothermal-heat-exchanger	92
geothermal-well	78

Removed recipes
geothermal-heat-exchanger
geothermal-well
fill-geothermal-water-barrel
fill-geothermal-water-blue-barrel
fill-geothermal-water-green-barrel
fill-geothermal-water-purple-barrel
geothermal-exchange
geothermal-exchange-2
geothermal-exchange-2-blue
geothermal-exchange-2-flipped
geothermal-exchange-2-flipped-blue
geothermal-exchange-2-flipped-green
geothermal-exchange-2-flipped-purple
geothermal-exchange-2-green
geothermal-exchange-2-purple
geothermal-exchange-blue
geothermal-exchange-flipped
geothermal-exchange-flipped-blue
geothermal-exchange-flipped-green
geothermal-exchange-flipped-purple
geothermal-exchange-green
geothermal-exchange-purple
geothermal-exchange-2-GDIW-IR
geothermal-exchange-2-blue-GDIW-IR
geothermal-exchange-2-flipped-GDIW-IR
geothermal-exchange-2-flipped-blue-GDIW-IR
geothermal-exchange-2-flipped-green-GDIW-IR
geothermal-exchange-2-flipped-purple-GDIW-IR
geothermal-exchange-2-green-GDIW-IR
geothermal-exchange-2-purple-GDIW-IR
geothermal-exchange-GDIW-IR
geothermal-exchange-blue-GDIW-IR
geothermal-exchange-flipped-GDIW-IR
geothermal-exchange-flipped-blue-GDIW-IR
geothermal-exchange-flipped-green-GDIW-IR
geothermal-exchange-flipped-purple-GDIW-IR
geothermal-exchange-green-GDIW-IR
geothermal-exchange-purple-GDIW-IR
empty-geothermal-water-barrel
empty-geothermal-water-blue-barrel
empty-geothermal-water-green-barrel
empty-geothermal-water-purple-barrel
geothermal-water-blue-flaring
geothermal-water-flaring
geothermal-water-green-flaring
geothermal-water-purple-flaring
item-geothermal-heat-exchanger-incineration
item-geothermal-water-barrel-incineration
item-geothermal-water-blue-barrel-incineration
item-geothermal-water-green-barrel-incineration
item-geothermal-water-purple-barrel-incineration
item-geothermal-well-incineration

Removed technologies
geothermal
geothermal-2
Attachments
factorio-current.log
The log from the crash after removing Geothermal
(74.96 KiB) Downloaded 4 times

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

Re: [0.17.76] Crash when saving, in FluidBoxManager

Post by boskid » Sun Nov 17, 2019 10:23 am

I can reproduce this with steps from initial post.
Assert it hits: "fluidBox->isInFluidManager() was not true" is however during saving fluidbox of "air-filter-machine-2" (x=-270.5, y=-273.5) so it may be related to 77452.
Question is how it managed to get into that state. For now i know that having assembler and furnaces in one replace group causes some issues when doing fast replace between this two groups (IIRC air filter 1 is furnace and air filter 2 is assembler)

Honktown
Filter Inserter
Filter Inserter
Posts: 250
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: [0.17.76] Crash when saving, in FluidBoxManager

Post by Honktown » Tue Nov 19, 2019 10:27 am

I have a save which shows this same behavior. I'm going to bed soon, but I can load it up tomorrow and test anything if needed. About a minute into my save the game becomes un-saveable.

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 902
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.17.76] Crash when saving, in FluidBoxManager

Post by TruePikachu » Tue Nov 19, 2019 1:39 pm

Honktown wrote:
Tue Nov 19, 2019 10:27 am
I have a save which shows this same behavior. I'm going to bed soon, but I can load it up tomorrow and test anything if needed. About a minute into my save the game becomes un-saveable.
But it can be saved immediately after loading? If so, by all means post the savegame itself.

Honktown
Filter Inserter
Filter Inserter
Posts: 250
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: [0.17.76] Crash when saving, in FluidBoxManager

Post by Honktown » Tue Nov 19, 2019 6:02 pm

Had the issue last week, somewhere in the middle of the week. Stopped playing that save. Loaded up with synced mods, now it's not happening :/

Post Reply

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users