Page 1 of 1

[1.0.0] Crash while game paused, garbled stack

Posted: Thu Jun 04, 2020 5:39 pm
by Xenophore
Started up a new Angel's (minimum Bob's) modded game, played about 25 minutes, got called away and paused the game. Switched to another workspace, did various unrelated tasks. Switched back to the original workspace back about fifteen minutes later to see the crash dialog. I believe it happened before I hit Escape to unpause, but I don't remember exactly.

Cannot seem to reproduce.

Log and last autosave attached.

Re: [0.18.30] Crash while game paused: "Character::postCloned"

Posted: Sun Jun 07, 2020 1:47 am
by Rseding91
Thanks for the report. Looking at the stack trace it makes no sense and looks like some memory corruption issue. It goes from constructing a EmptyWidgetStyleSpecification to running a default constructor for a class (OptionalFundamental) to reading from an INI from disk to Character::postCloned(). That's not a valid call stack in any world.

That makes me think you have some memory corruption issue going on with your machine. I recommend running something like this: https://www.memtest.org/

Re: [0.18.30] Crash while game paused: "Character::postCloned"

Posted: Tue Jun 16, 2020 12:15 pm
by Xenophore
Running memtest overnight a few times didn't reveal any issues. I haven't seen the bug again.

Re: [0.18.30] Crash while game paused: "Character::postCloned"

Posted: Fri Sep 11, 2020 8:46 pm
by Xenophore
@Rseding91: Another garbled stack, this time in 1.0. I saved, paused the game, and went AFK, coming back to the following:

Code: Select all

5359.755 Info AppManagerStates.cpp:1837: Saving finished
7012.618 Warning Logger.cpp:522: Symbols.size() == 18, usedSize == 12
Factorio crashed. Generating symbolized stacktrace, please wait ...
Raw stacktrace: 0xaee845, 0xd10e85, 0xd1129d, 0xd112f9, 0x46470, 0, 0xb, 0xe56119, 0xf997f6, 0xf4140d, 0xf41bd5, 0xa0292
7020.326 Warning Logger.cpp:522: Symbols.size() == 13, usedSize == 11
#0  0x0000000000d10e85 in GlobalContext::getMap() at /tmp/factorio-build-alkzzo/src/GlobalContext.cpp:1985
#1  0x0000000000d1129d in CrashHandler::writeStackTrace(CrashHandler::CrashReason) at /tmp/factorio-build-alkzzo/src/Util/CrashHandler.cpp:188
#2  0x0000000000d112f9 in CrashHandler::commonSignalHandler(int) at /tmp/factorio-build-alkzzo/src/Util/CrashHandler.cpp:624
#3  0x0000000000046470 in CrashHandler::SignalHandler(int) at /tmp/factorio-build-alkzzo/src/Util/CrashHandler.cpp:638
#4  (nil) in ?? at ??:0
#5  0x000000000000000b in ?? at ??:0
#6  0x0000000000e56119 in ?? at ??:0
#7  0x0000000000f997f6 in PathFinder::update() at /tmp/factorio-build-alkzzo/src/AI/PathFinder.cpp:402
#8  0x0000000000f4140d in LuaGuiElement::luaReadButtonFilter(lua_State*) at /tmp/factorio-build-alkzzo/src/Script/LuaGuiElement.cpp:1527
#9  0x0000000000f41bd5 in GuiAction::GuiAction(GuiAction const&) at /tmp/factorio-build-alkzzo/src/Input/GuiAction.cpp:48
#10 0x00000000000a0292 in SimpleModifier::show(GuiActionHandler*, ForceData const*, GuiAction const&, Player const*, std::function<void (Description&)>, std::function<unsigned int ()>) const at /tmp/factorio-build-alkzzo/src/Technology/SimpleModifier.cpp:76
#11 0x0000000105c28e94 in RecipeToolTip::addElementalIngredients(Recipe const&, std::map<MaterialID, RecipeProductPair, std::less<MaterialID>, std::allocator<std::pair<MaterialID const, RecipeProductPair> > >&&, std::set<MaterialID, std::less<MaterialID>, std::allocator<MaterialID> >&&) at /tmp/factorio-build-alkzzo/src/Gui/RecipeToolTip.cpp:513
#12 0x00007f00e26b400c in ?? at ??:0
Stack trace logging done
7020.326 Error CrashHandler.cpp:189: Map tick at moment of crash: 3757646
7020.326 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.
7108.353 Info SystemUtil.cpp:547: Started /usr/bin/xdg-open; trampoline PID: 29993
7108.353 Uploading log file
7108.391 Info SystemUtil.cpp:547: Started /home/drake/Downloads/Factorio-0.18.x/bin/x64/factorio; trampoline PID: 29994
memtest isn't showing any issues, and the crash only happens while left paused and unattended.

Re: [1.0.0] Crash while game paused, garbled stack

Posted: Sat Sep 12, 2020 1:32 am
by Rseding91
#7 0x0000000000f997f6 in PathFinder::update() at /tmp/factorio-build-alkzzo/src/AI/PathFinder.cpp:402
#8 0x0000000000f4140d in LuaGuiElement::luaReadButtonFilter(lua_State*) at /tmp/factorio-build-alkzzo/src/Script/LuaGuiElement.cpp:1527
#9 0x0000000000f41bd5 in GuiAction::GuiAction(GuiAction const&) at /tmp/factorio-build-alkzzo/src/Input/GuiAction.cpp:48
There's no code path that would ever make that series of jumps; that's just full on corrupt everything.

Re: [0.18.30] Crash while game paused: "Character::postCloned"

Posted: Sat Sep 12, 2020 6:49 am
by Theikkru
Xenophore wrote:
Fri Sep 11, 2020 8:46 pm
memtest isn't showing any issues, and the crash only happens while left paused and unattended.
Just a guess, but if memory's fine and it only happens when paused and unattended, maybe it's getting pushed to the page file and the hard drive is dying? Does it go away if you disable the page file?

Re: [1.0.0] Crash while game paused, garbled stack

Posted: Mon Sep 14, 2020 1:20 pm
by Xenophore
Doesn't seem to be swap related. I'm on Ubuntu 19.10, 16GB RAM, and there isn't any swap pressure. I'll try logging for the next time, but

Code: Select all

cat /proc/$PID/status
shows

Code: Select all

VmSwap: 0kB
even after playing for a while.