Cataclysm-dda: Games crashes with segfault when finishing sleeping. Happening in multiple worlds.

Created on 3 May 2019  路  6Comments  路  Source: CleverRaven/Cataclysm-DDA

Describe the bug
This bug triggers after having played a world for a certain amount of time. It could be a week, or in my most recent case it happens around day 18. There is no warning signs, and it just occurs when a character has finished sleeping. Previous sleeping sessions in the same world by the same character poses no problem. When the character has finished sleeping, just before waking up, the game display an error message with the title of segmentation fault.
To Reproduce
Steps to reproduce the behavior:

  1. Make a player.
  2. Play for a certain amount of time.
  3. Pick anywhere to sleep.
  4. Sleep occurs.
  5. Player about to get up.
  6. Game crashes.

Expected behavior
The game will crash before the player gets up, and the user will have to exit the game.

Ideally also describe why you expect it to happen.
"couldn't parse color: c_orange
15:21:43.517 ERROR : couldn't parse color: c_orange
15:21:43.518 ERROR : couldn't parse color: c_gray
15:21:43.541 ERROR : couldn't parse color: c_gray
15:21:43.541 ERROR : couldn't parse color: c_gray
15:21:43.541 ERROR : couldn't parse color: c_gray
15:21:43.542 ERROR : couldn't parse color: c_gray
15:21:43.830 ERROR MAP_GEN : sym is defined as number instead of string for overmap_terrain: robot_dispatch_first (robot dispatch center)
15:21:43.830 ERROR MAP_GEN : sym is defined as number instead of string for overmap_terrain: robot_dispatch_second (robot dispatch center)
15:21:44.652 WARNING : opendir [./save/Tryhard/mods] failed with "No such file or directory"."

Amateur observation: This section of the debug talks about "robot dispatch center", which seems to be in the game but no more info can be found online. which makes it seem like redundant code. The game might have tried to generate it and failed leading to crash.

Screenshots
Segmentation crash CDDA

Game crashes when the sleep duration is finished. Crash message is displayed on screen. Pressing Enter will proceed to close the game.

Versions and configuration(please complete the following information):

  • OS: Windows 7
  • Game Version: 0.D-2530-gaf7f5cd
  • Graphics version: Tiles
  • Mods loaded:
    Dark Days Ahead
    Disable NPC needs
    Aftershock
    Bens GF recipes
    Deadleaves' Fictional Guns
    Garden Pots
    Icecoon's Arsenal
    Makeshift Item Mods
    Medieval and Historic Content
    More Survival Tools
    Mythological Replicas
    Dino Mods
    Modular Turrets
    Salvaged Robots
    Hydroponics
    Mutant NPCs
    Beta National Guard Camp
    More Locations
    Urban Development
    Mapgen Demo
    Fuji's More Buildings
    Boats
    Folding Parts Pack
    Vehicle Addition Packs
    Tanks and Other Vehicles
    Classes and Scenario Mods
    Classic Roguelike Classes
    Manual Bionic Installations
    No Filthy Clothing
    Prevent Zombie Revivication
    Safe Autodoc
    Simplified Nutrition
    Sleep Deprivation
    StatsThroughSkills

Additional context
Save file: Google Docs link: World name: Tryhard
https://drive.google.com/open?id=1sFRgHw1OYMEzPMmz4J8neKtp1K0tfj9G

(S1 - Need confirmation) <Crash / Freeze>

Most helpful comment

Happens to me too. Can provide savefile. And I know why it happens. You have NPC mission started some time ago(I've tried with "get inhaler" and "get antibiotics"). If this mission fails when you run out of time, and you are in not same overmap with that NPC, you will crash. I'm trying to fix it now so i can recover my savefile.

All 6 comments

Tried your save file multiple times but couldn't get a single crash.

After loading the save, I just press $leep but nothing problematic happens.
I'm on 0.D-2553-gf3a679e222 which is the latest version as I'm writing this (8909).

I'm thinking that there might something wrong with your game installation or there was a fix since you posted this issue (current is 8909 and yours was 8899).

Also, you seem to indicate that this is happening with any new game, which would have raised quite a lot of issues but since you are alone in this case, I really lean for a problem on the side of your game installation.

[edit]

As a side note I also get the couldn't parse color logs but even though they are marked as ERROR they don't lead to a crash (the game internally replace the missing colors with something else).

That is strange. I guess it might be the problem of older versions as you said. Well if I find another I'll report it again, but currently it's finals so I could not play much. Thanks for helping out.

Happens to me too. Can provide savefile. And I know why it happens. You have NPC mission started some time ago(I've tried with "get inhaler" and "get antibiotics"). If this mission fails when you run out of time, and you are in not same overmap with that NPC, you will crash. I'm trying to fix it now so i can recover my savefile.

@Esyvir can you confirm that in your game you have above conditions?

I can reproduce the crash with the save provided, if I set the alarm clock to 8 hours. Doesn't seem to happen whens sleeping without alarm. Seems to happen in player::process_effects(). I've experienced crashes in similar situations: actually sleeping in the same tile of a farm house in a different world, with an 8 hour alarm clock timer.

I think this is the same issue, but it could be something else entirely.

Details

  • 0.D-2604-ge169df3755
  • built with CLANG=1 TILES=1 RUNTESTS=0 LINTJSON=0 BACKTRACE=1 DEBUG_SYMBOLS=1. I've experienced similar crashes when building with optimizations, too. Haven't checked if it happens with GCC.
  • Ubuntu 18.10 x86_64

Stack trace

__GI_raise(int sig) (/build/glibc-B9XfQf/glibc-2.28/sysdeps/unix/sysv/linux/raise.c:50)
__GI_abort() (/build/glibc-B9XfQf/glibc-2.28/stdlib/abort.c:79)
[Unknown/Just-In-Time compiled code] (Unknown Source:0)
__gnu_debug::_Safe_iterator<std::__detail::_Node_iterator<std::pair<body_part const, effect>, false, false>, std::__debug::unordered_map<body_part, effect, std::hash<int>, std::equal_to<body_part>, std::allocator<std::pair<body_part const, effect> > > >::operator++(__gnu_debug::_Safe_iterator<std::__detail::_Node_iterator<std::pair<body_part const, effect>, false, false>, std::__debug::unordered_map<body_part, effect, std::hash<int>, std::equal_to<body_part>, std::allocator<std::pair<body_part const, effect> > > > * this) (/usr/include/c++/8/debug/safe_iterator.h:295)
player::process_effects(player * this) (/home/d/src/Cataclysm-DDA/src/player.cpp:5340)
Creature::process_turn(Creature * this) (/home/d/src/Cataclysm-DDA/src/creature.cpp:133)
player::process_turn(player * this) (/home/d/src/Cataclysm-DDA/src/player.cpp:764)
game::do_turn(game * this) (/home/d/src/Cataclysm-DDA/src/game.cpp:1508)
main(int argc, char ** argv) (/home/d/src/Cataclysm-DDA/src/main.cpp:688)

I can still reproduce the crash, as in https://github.com/CleverRaven/Cataclysm-DDA/issues/30216#issuecomment-490075278, as of 0.D-2671-g9131a6a780.

I'll open a new issue if this is solved for @Esyvir though.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Cyrano7 picture Cyrano7  路  3Comments

RogueYun picture RogueYun  路  3Comments

jeremyshannon picture jeremyshannon  路  3Comments

Regularitee picture Regularitee  路  3Comments

BorkBorkGoesTheCode picture BorkBorkGoesTheCode  路  3Comments