Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game crashes when trying to modify sidebar #39663

Closed
truewis opened this issue Apr 18, 2020 · 3 comments · Fixed by #39758
Closed

Game crashes when trying to modify sidebar #39663

truewis opened this issue Apr 18, 2020 · 3 comments · Fixed by #39758
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes. Info / User Interface Game - player communication, menus, etc.

Comments

@truewis
Copy link
Contributor

truewis commented Apr 18, 2020

Describe the bug

The game crashes when finished modifying my sidebar display.
The display is modified when I launch the game again (which is an intended behavior, but weird considering that the game has crashed).

Steps To Reproduce

  1. In game, open sidebar option by pressing }
  2. It is hard to reproduce from now on. Try moving and disable various information such as "sound" and "wind". The game always crash when disabled all information, but this is not necessary.
  3. Press Esc. The game would crash immediately.

Versions and configuration

  • OS: Windows 10
  • Game Version: 0.E-839-g5dd7e74
  • Graphics version: Tiles
  • Ingame language: English
  • Mods loaded: DDA, Disable NPC Needs

Additional context

crash.log

Multiple instances of the crash, all caused by tweaking with different display options such as "sound" or "wind".
debug.log

Save file
Collettsville.zip

@wapcaplet
Copy link
Contributor

I have managed to reproduce this at least 3 times, but still do not know exactly how. The first time I saw it occur, it was after toggling off almost everything in the sidebar. The other two times, I had just toggled some things on and off (using TAB), then swapped the position of two items - crash occurred immediately after swapping and pressing ESC.

  • OS: Linux
    • OS Version: Distributor ID: Ubuntu; Description: Pop!_OS 19.10; Release: 19.10; Codename: eoan;
  • Game Version: 0.E-841-gb56d325109-dirty [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food]
    ]

@Night-Pryanik Night-Pryanik added <Crash / Freeze> Fatal bug that results in hangs or crashes. Info / User Interface Game - player communication, menus, etc. labels Apr 18, 2020
@anothersimulacrum
Copy link
Member

@Qrox Looks like a ui_adaptor bug

Thread 1 "cataclysm-tiles" received signal SIGSEGV, Segmentation fault.
0x000055555841bebc in ui_adaptor::redraw () at src/ui_manager.cpp:192
192	            if( ui.invalidated ) {
(gdb) bt
#0  0x000055555841bebc in ui_adaptor::redraw () at src/ui_manager.cpp:192
#1  0x000055555841c117 in ui_manager::redraw () at src/ui_manager.cpp:232
#2  0x0000555557499069 in game::do_turn (this=0x555559df3fa0) at src/game.cpp:1534
#3  0x00005555579b532f in main (argc=0, argv=0x7fffffffe8e0) at src/main.cpp:693

@Qrox
Copy link
Contributor

Qrox commented Apr 18, 2020

Well, I think it's more precisely an incompatibility of legacy code with ui_adaptor. ui_adaptor requires its callbacks to not call unsupported ui_adaptor functions. However, game::draw_panels, which is called in the main UI redraw callback, calls panel_manager::draw_adm if panel manager is open, which in turn calls unsupported ui_adaptor functions, which I didn't expect to happen, because game::draw_panels, as the name may suggest, should only do drawing and not input. I'll see if I can migrate panel manager and move the input loop out of game::draw_panels to fix the crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes. Info / User Interface Game - player communication, menus, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants