Closed moxian closed 1 year ago
The errors come from trying to load a washing activity, so something went wrong with that. Trying to find out what exactly might be a bit harder. Somehow it seems to have been finished but was still around when the game saved later.
Also interesting the last entry in the log is picking up a washboard. But that's not necessarily related.
Oh, i have context on that then!
I was washing the items with the water from the pond (east of the house), while being inside the house itself.
I was getting interrupted by seeing crawling zombie. I pressed "don't stop washing" a couple of times (didn't click "ignore all distractions" since i didn't feel very safe about that), but then gave a try to the distraction M
anager thing.
After seeing its interface, i realized that it probably doesn't do what i want it do, and pressed Esc
. That made me stop washing, and i had to restart the process anew.
Probably that leftover washing interrupted by opening the Manager and pressing Esc
is the culprit.
Okay, the activity is still there (on the backlog) after cancelling because it's a suspendable activity. However with the way it's assigned it can never actually resume the previous activity because the activity targets are only set after the activity is assigned. Assigning the activity compares targets to determine if it can resume an activity from the backlog which fails because the new one doesn't have any targets, yet. So the now stale activity sits in the backlog until that's cleared.
However looking at that info and the crash log, I'm fairly confident the issue is item_location::impl::item_in_container::calc_index
unsafely accessing the container, which can be invalidated by actions taken after the activity was suspended. Basically when you washed the military rucksack, it was in the backpack and that state got saved in the activity. Then you wore the rucksack and took off the backpack, so the saved container of the rucksack isn't valid anymore. And the the serialization code for the activity tries to access the now invalid backpack location and crashes.
Describe the bug
Was walking around; game crashed. Judging by the backtrace, did so when attempting to save the game.
The savefile appears to be corrupted - there are two identical characters, and trying to load throws a bunch of (skippable) errors.
Given that the backtrace mentions item_contents, i should probably mention that not long before the crash i: 1) acquired military rucksack, washed it 2) set its main pocket priority to 1 (from the default 0) 3) worn it 4)
U
nloaded the backpack i had on me at the time (also had its main pocket priority set to 1 some time prior). Presumably, the items got dumped into the military rucksack, but i didn't check 5)T
ook off the backpack 6) walked ~10 tiles towards the basement stairs 7) got the crash before i reached the destinationThe save appears to have happened between steps (3) and (6). Maybe during the
U
nloading? But then why did it not crash until after?Other than the loading errors, the character appears to be mostly the way i remember him. I don't notice any items missing either.
Steps to reproduce
unknown
Expected behavior
No crash
Screenshots
No response
Versions and configuration
Additional context
crash.log
``` The program has crashed. See the log file for a stack trace. CRASH LOG FILE: ./config/crash.log VERSION: ba42c0a TYPE: Signal MESSAGE: SIGSEGV: Segmentation fault STACK TRACE: #0 (dbghelp: @0x7ff611014710[cataclysm-tiles.exe+0x234710]), (libbacktrace: debug_write_backtrace(std::ostream&)+0x9e@0x140234710), 0x140234710 src/debug.cpp:1119 debug_write_backtrace(std::ostream&) #1 (dbghelp: @0x7ff610ffd101[cataclysm-tiles.exe+0x21d101]), (libbacktrace: log_crash+0x1d2@0x14021d101), 0x14021d101 /opt/mxe/usr/lib/gcc/x86_64-w64-mingw32.static.gcc11/11.2.0/include/c++/sstream:917 std::__cxx11::basic_ostringstreamdebug.log upon loading the savefile
``` ----------------------------------------- 14:46:36.460 : Starting log. 14:46:36.460 INFO : Cataclysm DDA version ba42c0a 14:46:36.460 INFO : [main] C locale set to C 14:46:36.461 INFO : [main] C++ locale set to C 14:46:36.461 INFO : SDL version used during compile is 2.0.14 14:46:36.461 INFO : SDL version used during linking and in runtime is 2.0.14 14:46:36.492 INFO : Number of render drivers on your system: 5 14:46:36.492 INFO : Render driver: 0/direct3d 14:46:36.492 INFO : Render driver: 1/direct3d11 14:46:36.492 INFO : Render driver: 2/opengl 14:46:36.492 INFO : Render driver: 3/opengles2 14:46:36.492 INFO : Render driver: 4/software 14:46:36.497 INFO : [options] C locale set to C 14:46:36.497 INFO : [options] C++ locale set to C 14:46:36.497 INFO : Setting language to: 'en' 14:46:36.497 INFO : [i18n] Scanning core translations from lang/mo/ 14:46:36.497 INFO : [i18n] Scanning mod translations from ./mods/ 14:46:36.497 WARNING : opendir [./mods/] failed with "No such process". 14:46:36.594 INFO : Active renderer: 1/direct3d11 14:46:36.723 INFO : USE_COLOR_MODULATED_TEXTURES is set to 0 14:46:36.733 INFO : Setting language to: 'en' 14:46:36.771 WARNING : opendir [./mods] failed with "No such process". 14:46:40.256 WARNING : opendir [./save/Somers/mods] failed with "No such process". 14:46:40.970 INFO : src/mod_tracker.h:70: Tried check if 'FakeSpecial_s_gas' had a duplicate, but type 'overmap_special' does not track object sources 14:46:48.378 INFO : Loaded tileset: UltimateCataclysm 14:46:48.555 INFO : Loaded tileset: UltimateCataclysm 14:46:52.606 ERROR : (error message will follow backtrace) #0 (dbghelp: @0x7ff611014710[cataclysm-tiles.exe+0x234710]), (libbacktrace: debug_write_backtrace(std::ostream&)+0x9e@0x140234710), 0x140234710 src/debug.cpp:1119 debug_write_backtrace(std::ostream&) #1 (dbghelp: @0x7ff611015564[cataclysm-tiles.exe+0x235564]), (libbacktrace: DebugLog(DebugLevel, DebugClass)+0x20e@0x140235564), 0x140235564 /opt/mxe/usr/x86_64-w64-mingw32.static.gcc11/include/time.h:230 time 0x140235564 src/debug.cpp:1447 DebugLog(DebugLevel, DebugClass) #2 (dbghelp: @0x7ff6110165be[cataclysm-tiles.exe+0x2365be]), (libbacktrace: realDebugmsg(char const*, char const*, char const*, std::__cxx11::basic_stringSavefile: Somers-bug.zip