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:
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
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):
Additional context
Save file: Google Docs link: World name: Tryhard
https://drive.google.com/open?id=1sFRgHw1OYMEzPMmz4J8neKtp1K0tfj9G
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.
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.__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.
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.