Cataclysm-dda: Seg Fault Crash on Load

Created on 4 Jul 2020  路  5Comments  路  Source: CleverRaven/Cataclysm-DDA

Describe the bug

While exploring around a building the game crashed with a seg fault error. Now it crashes immediately on load.

Steps To Reproduce

  1. Load attached savegame
  2. Observe the seg fault crash

or

  1. Wander around until you get a seg fault (trigger unknown as I couldn't load the game back to check what might have been around) and see if you can load again after?

Expected behavior


The main character wins megabucks.

Screenshots

Versions and configuration

  • OS: Windows 10
  • Game Version: 10806
  • Graphics version: Tiles
  • Ingame language: English
  • Mods loaded: "dda", "no_npc_food", "aftershock", "blazeindustries", "crt_expansion", "magiclysm", "DinoMod", alt_map_key", "crazy_cataclysm", "MMA", "zets_hair_extensions_undead", "Graphical_Overmap", Graphical_Overmap_Magiclysm", "fuji_mpp", "speedydex", "stats_through_kills", "StatsThroughSkills"
  • Additional context

    Mega City 4.zip
    crash.log
    debug.log

    <Crash / Freeze>

    Most helpful comment

    @IYourDoomI Yeah, same thing. my_world_name-fixed.zip

    A guide for anyone else who may stumble upon this:

    1. Go to save folder and find a file with .sav extension (there _should_ be only one with that extension, but I'm not sure about that)
    2. Make a backup copy of that file
    3. Open the original file with a text editor (any should do) and find "activity" string (including quotes).
    4. Replace "activity": { "type": "ACT_DROP", ... (may be something a bit different, e.g. "ACT_CONSUME") with "activity": { "type": "ACT_NULL", ...
    5. Save the file and try to load.

    All 5 comments

    01:39:41.804 ERROR : D:\git\Cataclysm-DDA\src\item_location.cpp:244 [ensure_who_unpacked] Failed to find item_location owner with character_id 1
    01:39:48.666 ERROR : D:\git\Cataclysm-DDA\src\item_location.cpp:102 [ensure_unpacked] item_location lost its target item during a save/load cycle
    

    Seems to be a case of #41352, crashes while loading item locations for avatar's activity:
    https://github.com/CleverRaven/Cataclysm-DDA/blob/bcd166f18c0155cbc1bb420205906c1e2314cd44/src/savegame_json.cpp#L326
    Clearing current activity (ACT_DROP) makes the save loadable: save-fixed.zip

    You are a saint, thank you!

    01:39:41.804 ERROR : D:\git\Cataclysm-DDA\src\item_location.cpp:244 [ensure_who_unpacked] Failed to find item_location owner with character_id 1
    01:39:48.666 ERROR : D:\git\Cataclysm-DDA\src\item_location.cpp:102 [ensure_unpacked] item_location lost its target item during a save/load cycle
    

    Seems to be a case of #41352, crashes while loading item locations for avatar's activity:
    https://github.com/CleverRaven/Cataclysm-DDA/blob/bcd166f18c0155cbc1bb420205906c1e2314cd44/src/savegame_json.cpp#L326

    Clearing current activity (ACT_DROP) makes the save loadable: save-fixed.zip

    Hello! I got the same problem today:

    17:08:08.427 ERROR : src/item_location.cpp:242 [bool item_location::impl::item_on_person::ensure_who_unpacked() const] Failed to find item_location owner with character_id 1
    17:08:18.569 ERROR : src/item_location.cpp:100 [void item_location::impl::ensure_unpacked() const] item_location lost its target item during a save/load cycle

    I found this post, but I dont know how to clear current activity. Any help would be very appreciated, thank you! Here's my save:
    my_world_name.zip

    @IYourDoomI Yeah, same thing. my_world_name-fixed.zip

    A guide for anyone else who may stumble upon this:

    1. Go to save folder and find a file with .sav extension (there _should_ be only one with that extension, but I'm not sure about that)
    2. Make a backup copy of that file
    3. Open the original file with a text editor (any should do) and find "activity" string (including quotes).
    4. Replace "activity": { "type": "ACT_DROP", ... (may be something a bit different, e.g. "ACT_CONSUME") with "activity": { "type": "ACT_NULL", ...
    5. Save the file and try to load.

    Does not crash on latest game version. Please try again and report if you still face this issue.

    Was this page helpful?
    0 / 5 - 0 ratings

    Related issues

    2birdie picture 2birdie  路  3Comments

    pisskop picture pisskop  路  3Comments

    jeremyshannon picture jeremyshannon  路  3Comments

    ituluwituluwzev picture ituluwituluwzev  路  3Comments

    Taberone picture Taberone  路  3Comments