CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.61k stars 4.17k forks source link

SIGSEGV starting game #36376

Closed ymber closed 4 years ago

ymber commented 4 years ago

Describe the bug

Segmentation fault when starting a new game. I can't reliably reproduce it and I can't give a save because it crashes starting the game.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Start a new game

Expected behavior

No segfaults.

Versions and configuration

Additional context

The program has crashed.
See the log file for a stack trace.
CRASH LOG FILE: ./config/crash.log
VERSION: 0.C-48240-gb9b3dc27b0-dirty
TYPE: Signal
MESSAGE: SIGSEGV: Segmentation faultError creating SDL message box: No message system available

STACK TRACE:

    ./cataclysm-tiles(_Z21debug_write_backtraceRSo+0x39) [0x55cef3850a09]
    ./cataclysm-tiles(+0x17ee19a) [0x55cef382f19a]
    ./cataclysm-tiles(+0x17edf38) [0x55cef382ef38]
    /usr/lib/libc.so.6(+0x3bfb0) [0x7f8a86f88fb0]
    ./cataclysm-tiles(_ZNK7monster11can_move_toERK8tripoint+0x4d9) [0x55cef3f39579]
    ./cataclysm-tiles(_ZN3map21spawn_monsters_submapERK8tripointb+0x2b3) [0x55cef3d34ff3]
    ./cataclysm-tiles(_ZN3map14spawn_monstersEb+0xad) [0x55cef3d3531d]
    ./cataclysm-tiles(_ZN4game10start_gameEv+0x690) [0x55cef3988eb0]
    ./cataclysm-tiles(_ZN9main_menu17new_character_tabEv+0xfa2) [0x55cef3d0c4f2]
    ./cataclysm-tiles(_ZN9main_menu14opening_screenEv+0xfd1) [0x55cef3d0b201]
    ./cataclysm-tiles(main+0xb9c) [0x55cef3d0383c]
    /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7f8a86f74153]
    ./cataclysm-tiles(_start+0x2e) [0x55cef34f89ae]

    Attempting to repeat stack trace using debug symbols…
    debug_write_backtrace(std::ostream&)
    …/src/debug.cpp:620
    log_crash(char const*, char const*)
    crash.cpp:?
    signal_handler(int)
    …/src/crash.cpp:284
    ??
    ??:0
    monster::can_move_to(tripoint const&) const
    …/src/monmove.cpp:185
    map::spawn_monsters_submap(tripoint const&, bool)
    …/src/map.cpp:7252
    map::spawn_monsters(bool)
    …/src/map.cpp:7272
    game::start_game()
    …/src/game.cpp:768
    main_menu::new_character_tab()
    ??:?
    main_menu::opening_screen()
    …/src/main_menu.cpp:539
    main
    ??:?
    __libc_start_main
    ??:?
    _start
    ??:?
sztosz commented 4 years ago

Did you did make clean before compiling new version? And are you sure you pasted correct log, because in that log version is: VERSION: 0.C-48240-gb9b3dc27b0-dirty?

I had today different segfault after pulling changes, that went away after I did make clean and recompiled, maybe it's something similar, so sorry if those above question may sound stupid, just trying to be helpful.

ymber commented 4 years ago

I was testing on a build from my working branch here when I thought it was on an experimental release. Unless someone else can reproduce this in master I'm going to assume it's a bug I introduced given that monster code is what I'm working on in that branch.