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

Implemented new UI framework backed by ImGui, ported keybindings screen, popup #65709

Merged
merged 15 commits into from
Feb 26, 2024

Conversation

katemonster33
Copy link
Contributor

@katemonster33 katemonster33 commented May 18, 2023

Summary

Features "Integrated ImGui UI framework into Cataclysm, and ported inventory screens to the new framework as a proof-of-concept"

Purpose of change

Implementation of simple things like navigation between elements and mouse-based selections involve code which currently needs to be repeated in every UI that exists in Cataclysm. Integrating a common UI framework like ImGui allows much of that heavy lifting to be handled by the framework, allowing less code required to produce functional and modern dialogs/forms. Other things like modal dialogs are simple impossible with the current code base.

Describe the solution

For tiled/SDL builds, the latest ImGui has been integrated into CDDA, using the SDL renderer backend so that it works seamlessly alongside all existing drawing code. On the Curses side, the ImTui backend has been integrated, with heavy modification to fix issues drawing alongside the rest of the game's screens. ImGui windows can draw on top of the play area without any graphical glitches. In addition, there are new common classes under cata_imgui.h which allow easy ways to create an ImGui window, and add it to the ui_adaptor stack for later drawing, without needing to write extra code to do so.

Describe alternatives you've considered

Before starting this branch, the original solution was to create a common class to create dialogs that create the same NCurses-like windows, but in a more common fashion. This would be easier to switch to, but also would look much less modern.

Testing

I've spent countless hours testing each screen as I've ported them, still many bugs to be found I'm sure.

Additional context

this PR originally ported the inventory screens, but reviewers didn't like that there were some unavoidable graphical bugs related to ImGui screens not able to be sandwiched between the game board and a non-ImGui screen on top, so all of that work had to be thrown out in favor of only porting screens that could be drawn on the top-level, meaning the keybindings screen and query_popup.
Screenshot_20240211_224920

@katemonster33 katemonster33 marked this pull request as draft May 18, 2023 05:35
@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Code: Build Issues regarding different builds and build environments Code: Tests Measurement, self-control, statistics, balancing. Info / User Interface Game - player communication, menus, etc. labels May 18, 2023
src/color.cpp Outdated Show resolved Hide resolved
src/color.cpp Outdated Show resolved Hide resolved
src/color.h Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/ncurses_def.cpp Outdated Show resolved Hide resolved
src/sdl_font.cpp Outdated Show resolved Hide resolved
src/sdl_font.h Outdated Show resolved Hide resolved
src/sdl_font.h Outdated Show resolved Hide resolved
src/sdltiles.cpp Outdated Show resolved Hide resolved
src/sdltiles.cpp Outdated Show resolved Hide resolved
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label May 18, 2023
@Qrox
Copy link
Contributor

Qrox commented May 18, 2023

This looks promising, thanks for taking the effort to do it! Could you share some screenshots of the new UIs? Also, does this allow windows and text in the SDL build to have more fine-grained positioning not restricted to a terminal grid?

@PatrikLundell
Copy link
Contributor

You've gotten the "Summary" section wrong. The tools demand an exact adherence to the format described in the comment or the PR validator rejects it, which in your case would be something like:

Features "Implemented UI framework with inventory screen use case"

or with a better comment.

@katemonster33
Copy link
Contributor Author

You've gotten the "Summary" section wrong. The tools demand an exact adherence to the format described in the comment or the PR validator rejects it, which in your case would be something like:

Features "Implemented UI framework with inventory screen use case"

or with a better comment.

Good catch, done.

src/input.cpp Outdated Show resolved Hide resolved
src/input.cpp Outdated Show resolved Hide resolved
src/inventory_ui.cpp Outdated Show resolved Hide resolved
@github-actions github-actions bot added the <Enhancement / Feature> New features, or enhancements on existing label May 18, 2023
Copy link
Member

@akrieger akrieger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll also need to update the cmake and gradle builds. You can look at my flatbuffer pr stack #50143 for examples of how to do that. Specifically b157d7e

imgui/imtui licences need to go into LICENSE.txt

As others have mentioned, at minimum split it up so the clean source is its own commit, then any changes to made to them. Optionally although I recommend it, keep the integration of the third party code into the build as its own commit as well, followed by the changes to source to use the new code.

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
tests/Makefile Outdated Show resolved Hide resolved
tests/Makefile Outdated Show resolved Hide resolved
msvc-full-features/ImGui-lib-vcpkg-static.vcxproj Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
@AlbertTheTerrible
Copy link

I'd love to get on with this and make some UI tiles as soon as this is ready 😃

Curious question (I don't understand programing), can this work outside the game itself? Like the game's main menu, character creation, maybe even add some logos/loadscreen images?

Copy link
Contributor

@Qrox Qrox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are some comments on the changes to ui_adaptor. I'll review the remainder when I have more time.

I also took a quick look at the other UI code and it seems you removed the original ui_adaptor resize callbacks. The resize callback is need by ui_adaptor to do occlusion check and invalidation flag optimization, so removing it would break the logic of the ui_adaptor stack.

Therefore I suggest you leave ui_adaptor as is and use it in the imgui window classes and provide the approriate callbacks instead to avoid complictating the logic. (And also avoid confusion with the name, it is an adaptor and not the window itself after all).

And in case you missed the questions in my previous comment (because you didn't reply): Could you share some screenshots of the new UIs? Also, does this allow windows and text in the SDL build to have more fine-grained positioning not restricted to a terminal grid?

src/main.cpp Outdated Show resolved Hide resolved
tests/Makefile Outdated Show resolved Hide resolved
src/ui_manager.h Show resolved Hide resolved
src/ui_manager.h Outdated Show resolved Hide resolved
src/ui_manager.cpp Outdated Show resolved Hide resolved
src/ui_manager.cpp Show resolved Hide resolved
@Inglonias
Copy link
Contributor

Do we have to include the full source code of the framework? Have there been edits made to it for Cataclysm?

@Zireael07
Copy link
Contributor

I wonder what's the accessibility situation with this PR? Is ImGui/ImTUI screen reader friendly?

@katemonster33
Copy link
Contributor Author

Do we have to include the full source code of the framework? Have there been edits made to it for Cataclysm?

ImTui uses a special version of ImGui in its source, and ImTui itself has been heavily modified (see commits). As for ImGui itself, this is the easiest way to include it that works on all platforms.

@katemonster33
Copy link
Contributor Author

katemonster33 commented May 19, 2023

I wonder what's the accessibility situation with this PR? Is ImGui/ImTUI screen reader friendly?

Hard to say. When I made these changes I was not initially aware of screen readers being used in CDDA. There will probably be significant work needed to support these.

@katemonster33
Copy link
Contributor Author

A few people have asked for screenshots now... I've included a few.

@Inglonias
Copy link
Contributor

Do we have to include the full source code of the framework? Have there been edits made to it for Cataclysm?

ImTui uses a special version of ImGui in its source, and ImTui itself has been heavily modified (see commits). As for ImGui itself, this is the easiest way to include it that works on all platforms.

If we do go ahead with implementation on this, I would prefer we host and compile the gui libraries elsewhere to keep the line count down. Maybe I'm an outlier, but I'm a little worried that this PR is 100k lines of code.

@Zireael07
Copy link
Contributor

Hard to say. When I made these changes I was not initially aware of screen readers being used in CDDA. There will probably be significant work needed to support these.

I'm not a screen reader user myself but I know there are multiple blind/VI CDDA players, mostly because CDDA is very accessible to them (e.g. the V menu is supposedly extremely useful). So it's important this part of accessibility doesn't regress (The current inventory is, to my understanding, reader accessible)

@Qrox
Copy link
Contributor

Qrox commented May 20, 2023

Hard to say. When I made these changes I was not initially aware of screen readers being used in CDDA. There will probably be significant work needed to support these.

Currently screen readers are supported by placing the terminal cursor at the right position so the only potential problems I can think of are: 1. If ImTui does not place the cursor after the last drawn string, most of the windows that do not use ui_adaptor::set_cursor will likely have regressions (not that many of them aren't problematic to begin with...); 2. For windows that use ui_adaptor::set_cursor, we'll have to find a way for ImTui to tell us where it draws a string exactly so we know where to place the cursor.

If you can compile the curses version, you can test it by adding the DEBUG_CURSES_CURSOR flag and check if the cursor position changes between master and this PR.

src/cata_imgui.cpp Outdated Show resolved Hide resolved
src/cata_imgui.cpp Outdated Show resolved Hide resolved
src/cata_imgui.cpp Outdated Show resolved Hide resolved
src/cata_imgui.cpp Outdated Show resolved Hide resolved
src/cata_imgui.cpp Outdated Show resolved Hide resolved
src/inventory_ui.cpp Outdated Show resolved Hide resolved
src/inventory_ui.cpp Outdated Show resolved Hide resolved
src/inventory_ui.cpp Outdated Show resolved Hide resolved
src/inventory_ui.cpp Outdated Show resolved Hide resolved
src/inventory_ui.cpp Outdated Show resolved Hide resolved
@akrieger
Copy link
Member

So the vcpkg integration is kind of a headache. Both imgui and cdda depend on sdl but only cdda currently actually depends on it via vcpkg. Having a dependency on a stub target that has the vcpkg config in it doesn't actually block any downstream targets from building before vcpkg completes, afaict. I'll keep poking at it.

@Qrox
Copy link
Contributor

Qrox commented May 22, 2023

I pulled the current changes and tested on SDL and Curses. I had to change a few lines of code for it to compile, so some of the results might not be entirely accurate, but here they are.

On SDL it mostly worked, but as expected it only showed the ImGUI windows when they are topmost windows.

On Curses it did not seem to display the color at all and sometimes input was completely ignored, including ctrl-c, so I had to restart the terminal. It could be different in other termianls, because I was using MSYS2 MSYS and ImTUI seems to use pdcurses instead of ncurses, but since the game worked before in MSYS2 MSYS this should probably be fixed nevertheless.

Anyway, the display on my setup is shown in the following image, and the cursor is positioned in the top right corner (the pink square), whereas before these changes the cursor was in the bottom right corner, so ImTUI indeed changed the cursor position, but the original cursor position probably wasn't working for screen readers anyway.

The trade UI on the other hand was not shown at all.

image

There was also a crash when resizing the SDL window before the main menu was shown, and IIRC it wasn't happening before these changes.

Full crash log
The program has crashed.
See the log file for a stack trace.
CRASH LOG FILE: ./config/crash.log
VERSION: 0.G-2018-ge82875eec2
TYPE: Signal
MESSAGE: SIGSEGV: Segmentation fault
STACK TRACE:

  #0
    (dbghelp: @0x7ff74b888253[cataclysm-tiles.exe+0x268253]), 
    (libbacktrace: debug_write_backtrace(std::ostream&)+0xa1@0x140268253),
    0x140268253    [unknown src]:0    [unknown func]
  #1
    (dbghelp: @0x7ff74b8690c3[cataclysm-tiles.exe+0x2490c3]), 
    (libbacktrace: log_crash+0x1de@0x1402490c3),
    0x1402490c3    [unknown src]:0    [unknown func]
  #2
    (dbghelp: @0x7ff74b8692eb[cataclysm-tiles.exe+0x2492eb]), 
    (libbacktrace: signal_handler+0x52@0x1402492eb),
    0x1402492eb    [unknown src]:0    [unknown func]
  #3
    (dbghelp: @0x7ff74c1eab12[cataclysm-tiles.exe+0xbcab12]), 
    (libbacktrace: _gnu_exception_handler+0x152@0x140bcab12),
    0x140bcab12    [unknown src]:0    [unknown func]
  #4
    (dbghelp: _C_specific_handler+0x96@0x7ffd41a1c876[ntdll.dll+0x8c876]), 
    (backtrace_syminfo failed: errno = -1, msg = no symbol table in PE/COFF executable),
    (backtrace_pcinfo failed: errno = -1, msg = no debug info in PE/COFF executable),
  #5
    (dbghelp: _chkstk+0x11f@0x7ffd41a323df[ntdll.dll+0xa23df]), 
    (backtrace_syminfo failed: errno = -1, msg = no symbol table in PE/COFF executable),
    (backtrace_pcinfo failed: errno = -1, msg = no debug info in PE/COFF executable),
  #6
    (dbghelp: RtlRaiseException+0x434@0x7ffd419e14a4[ntdll.dll+0x514a4]), 
    (backtrace_syminfo failed: errno = -1, msg = no symbol table in PE/COFF executable),
    (backtrace_pcinfo failed: errno = -1, msg = no debug info in PE/COFF executable),
  #7
    (dbghelp: KiUserExceptionDispatcher+0x2e@0x7ffd41a30f0e[ntdll.dll+0xa0f0e]), 
    (backtrace_syminfo failed: errno = -1, msg = no symbol table in PE/COFF executable),
    (backtrace_pcinfo failed: errno = -1, msg = no debug info in PE/COFF executable),
  #8
    (dbghelp: @0x7ff74c1a05b9[cataclysm-tiles.exe+0xb805b9]), 
    (libbacktrace: ImGui::SetCurrentFont(ImFont*)+0x5e@0x140b805b9),
    0x140b805b9    [unknown src]:0    [unknown func]
  #9
    (dbghelp: @0x7ff74c1b35f9[cataclysm-tiles.exe+0xb935f9]), 
    (libbacktrace: ImGui::NewFrame()+0x301@0x140b935f9),
    0x140b935f9    [unknown src]:0    [unknown func]
  #10
    (dbghelp: @0x7ff74c01492d[cataclysm-tiles.exe+0x9f492d]), 
    (libbacktrace: refresh_display()+0x43@0x1409f492d),
    0x1409f492d    [unknown src]:0    [unknown func]
  #11
    (dbghelp: @0x7ff74c01746d[cataclysm-tiles.exe+0x9f746d]), 
    (libbacktrace: CheckMessages()+0x148d@0x1409f746d),
    0x1409f746d    [unknown src]:0    [unknown func]
  #12
    (dbghelp: @0x7ff74c017501[cataclysm-tiles.exe+0x9f7501]), 
    (libbacktrace: input_manager::pump_events()+0x1d@0x1409f7501),
    0x1409f7501    [unknown src]:0    [unknown func]
  #13
    (dbghelp: @0x7ff74ba3fc65[cataclysm-tiles.exe+0x41fc65]), 
    (libbacktrace: DynamicDataLoader::load_data_from_path(cata_path const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, loading_ui&)+0x11f@0x14041fc65),
    0x14041fc65    [unknown src]:0    [unknown func]
  #14
    (dbghelp: @0x7ff74b96d81c[cataclysm-tiles.exe+0x34d81c]), 
    (libbacktrace: game::load_core_data(loading_ui&)+0x54@0x14034d81c),
    0x14034d81c    [unknown src]:0    [unknown func]
  #15
    (dbghelp: @0x7ff74bbf4e9b[cataclysm-tiles.exe+0x5d4e9b]), 
    (libbacktrace: main_menu::init_strings()+0xc19@0x1405d4e9b),
    0x1405d4e9b    [unknown src]:0    [unknown func]
  #16
    (dbghelp: @0x7ff74bbf93c2[cataclysm-tiles.exe+0x5d93c2]), 
    (libbacktrace: main_menu::opening_screen()+0x84@0x1405d93c2),
    0x1405d93c2    [unknown src]:0    [unknown func]
  #17
    (dbghelp: @0x7ff74b624a29[cataclysm-tiles.exe+0x4a29]), 
    (libbacktrace: WinMain+0x1f82@0x140004a29),
    0x140004a29    [unknown src]:0    [unknown func]
  #18
    (dbghelp: @0x7ff74b6212ef[cataclysm-tiles.exe+0x12ef]), 
    (libbacktrace: __tmainCRTStartup+0x16f@0x1400012ef),
    0x1400012ef    [unknown src]:0    [unknown func]
  #19
    (dbghelp: @0x7ff74b6213e6[cataclysm-tiles.exe+0x13e6]), 
    (libbacktrace: WinMainCRTStartup+0x16@0x1400013e6),
    0x1400013e6    [unknown src]:0    [unknown func]
  #20
    (dbghelp: BaseThreadInitThunk+0x14@0x7ffd416a7604[KERNEL32.DLL+0x17604]), 
    (backtrace_syminfo failed: errno = -1, msg = no symbol table in PE/COFF executable),
    (backtrace_pcinfo failed: errno = -1, msg = no debug info in PE/COFF executable),
  #21
    (dbghelp: RtlUserThreadStart+0x21@0x7ffd419e26a1[ntdll.dll+0x526a1]), 
    (backtrace_syminfo failed: errno = -1, msg = no symbol table in PE/COFF executable),
    (backtrace_pcinfo failed: errno = -1, msg = no debug info in PE/COFF executable),

Another crash happened in the Curses build when I pressed up/down to navigate the list of saves in the main menu. Unfortunately I didn't compile with backtrace on so I don't have a stack trace.

On a side note, the ImGUI windows are currently translucent in the SDL build, but ui_adptor wasn't designed for transparency so that should probably be handled carefully too...

It also seems a imgui.ini file is created in the game's root after starting the SDL build, which should probably be redirected to config/ instead where other configuration files reside.

@katemonster33
Copy link
Contributor Author

Alright, I took a stab at creating a new option in the "interface" group, a "Use ImGui?" option, with a default value of false. I did some testing, and it appears that the legacy UI for the popups and the keybindings are intact. Once I get all the checks ran successfully, I will rebase again. After that, maybe we can start to consider merging this to master?

@katemonster33 katemonster33 marked this pull request as ready for review February 23, 2024 21:39
@BrettDong
Copy link
Member

I noticed the build failure in macOS CI, so I tried to compile the branch locally on macOS, and found out that a newer version of GNU Make (I tried 4.4.1) is required to build it correctly. GNU Make 3.81 shipped in the system interprets the Makefile differently and feeds different compiler flags (specifically without -w flag to suppress ImGui warnings).

@katemonster33
Copy link
Contributor Author

I noticed the build failure in macOS CI, so I tried to compile the branch locally on macOS, and found out that a newer version of GNU Make (I tried 4.4.1) is required to build it correctly. GNU Make 3.81 shipped in the system interprets the Makefile differently and feeds different compiler flags (specifically without -w flag to suppress ImGui warnings).

Oh that's very odd, I don't understand how I got it to build before. Do you have any idea what it isn't liking?

@BrettDong
Copy link
Member

Your pull request was in draft mode so macOS build was actually skipped and showed a green mark (you can see the build only took a few seconds to finish).

Qrox and others added 10 commits February 25, 2024 12:00
…oved some extra imgui-specific drawing code.

Co-authored-by: Jianxiang Wang (王健翔) <[email protected]>
Co-authored-by: akrieger <[email protected]>

Update src/sdltiles.h

Co-authored-by: Jianxiang Wang (王健翔) <[email protected]>

Update src/ui_manager.cpp

Co-authored-by: Jianxiang Wang (王健翔) <[email protected]>
The invalidation logic is already there, we just have to set the
`dimensions` so that it knows what we drew over.
Now that an ImGui window can draw arbitrary pixels on top of a normal
“curses” window, the terminal_framebuffer is no longer adequate for
keeping track of which characters in a “curses” window can be
skipped. We just have to clear and redraw the whole window.

This patch removes the terminal_framebuffer, the
oversized_framebuffer, and several other cached values. Gone as well
is the complexity of initializing, reinitializing, and invalidating
these caches.
@katemonster33
Copy link
Contributor Author

rebased, squashed a ton of commits. haven't rebased against master, gonna wait until @Brambor 's changes get merged. Builds should still be working unless something got lost.

I skipped the commits for fixing the Gradle build, FYI. My current plan for Android is to force usage of the legacy UI until we have a more concrete plan to fix it. Haven't had time to build and test it, probably needs more work. I think the branch is ready otherwise.

@Maleclypse
Copy link
Member

Compiled and worked! My screens looked like your test screens. Congratulations!

@l29ah
Copy link
Contributor

l29ah commented Apr 12, 2024

Forgot to call ImGui::NewFrame() huh

(gdb) bt
#0  0x00007f08ab3e903c in __pthread_kill_implementation () from /lib64/libc.so.6
#1  0x00007f08ab399296 in raise () from /lib64/libc.so.6
#2  0x00007f08ab3818b7 in abort () from /lib64/libc.so.6
#3  0x000056124ed5c1e9 in signal_handler (sig=<optimized out>) at src/crash.cpp:147
#4  signal_handler (sig=<optimized out>) at src/crash.cpp:108
#5  <signal handler called>
#6  0x00007f08ab3e903c in __pthread_kill_implementation () from /lib64/libc.so.6
#7  0x00007f08ab399296 in raise () from /lib64/libc.so.6
#8  0x00007f08ab3818b7 in abort () from /lib64/libc.so.6
#9  0x00007f08ab3817db in __assert_fail_base.cold () from /lib64/libc.so.6
#10 0x00007f08ab391a76 in __assert_fail () from /lib64/libc.so.6
#11 0x000056125021af65 in ImGui::Begin (name=0x561287b6faa0 "QUERY_POPUP##94637403218112", p_open=p_open@entry=0x56127ccd20e9, flags=532847) at src/third-party/imgui/imgui.cpp:6193
#12 0x000056124ea9d07d in cataimgui::window::draw (this=0x56127ccd20c0) at src/cata_imgui.cpp:578
#13 0x000056124eaa0771 in cataimgui::window::draw (this=<optimized out>) at src/cata_imgui.cpp:554
#14 cataimgui::window_impl::window_impl(cataimgui::window*)::{lambda(ui_adaptor&)#1}::operator()(ui_adaptor&) const (__closure=<optimized out>) at src/cata_imgui.cpp:450
#15 std::__invoke_impl<void, cataimgui::window_impl::window_impl(cataimgui::window*)::{lambda(ui_adaptor&)#1}&, ui_adaptor&>(std::__invoke_other, cataimgui::window_impl::window_impl(cataimgui::window*)::{lambda(ui_adaptor&)#1}&, ui_adaptor&) (__f=...) at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/invoke.h:61
#16 std::__invoke_r<void, cataimgui::window_impl::window_impl(cataimgui::window*)::{lambda(ui_adaptor&)#1}&, ui_adaptor&>(cataimgui::window_impl::window_impl(cataimgui::window*)::{lambda(ui_adaptor&)#1}&, ui_adaptor&) (__fn=...)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/invoke.h:111
#17 std::_Function_handler<void (ui_adaptor&), cataimgui::window_impl::window_impl(cataimgui::window*)::{lambda(ui_adaptor&)#1}>::_M_invoke(std::_Any_data const&, ui_adaptor&) (__functor=..., __args#0=...)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/std_function.h:290
#18 0x000056125030e718 in std::function<void (ui_adaptor&)>::operator()(ui_adaptor&) const (__args#0=..., this=0x56127cdf6568) at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/std_function.h:591
#19 ui_adaptor::redraw_invalidated () at src/ui_manager.cpp:440
#20 0x000056125030ea41 in ui_adaptor::redraw () at src/ui_manager.cpp:345
#21 0x000056124feb201d in query_popup::query_once (this=this@entry=0x7ffda94bdde0) at src/popup.cpp:285
#22 0x000056124feb384f in query_popup::query (this=<optimized out>) at src/popup.cpp:397
#23 0x000056124fd2d601 in query_yn (text="Really Quit?  All unsaved changes will be lost.") at src/output.cpp:847
#24 0x000056124f61e7da in query_yn<>(char const*) (msg=<optimized out>) at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/allocator.h:184
#25 (anonymous namespace)::exit_handler (s=<optimized out>) at src/main.cpp:146
#26 <signal handler called>
#27 0x00007f08ab447674 in write () from /lib64/libc.so.6
#28 0x00007f08ab94536b in _nc_flush_sp () from /lib64/libtinfow.so.6
#29 0x00007f08ab9849cc in _nc_mvcur_sp () from /lib64/libncursesw.so.6
#30 0x00007f08ab994a3c in TransformLine () from /lib64/libncursesw.so.6
#31 0x00007f08ab9966cc in doupdate_sp () from /lib64/libncursesw.so.6
#32 0x00007f08ab986f58 in wrefresh () from /lib64/libncursesw.so.6
#33 0x00005612502967b1 in ImTui_ImplNcurses_DrawScreen (active=<optimized out>) at src/third-party/imtui/imtui-impl-ncurses.cpp:378
#34 0x000056124ea9dc6c in cataimgui::client::end_frame (this=<optimized out>) at src/cata_imgui.cpp:77
#35 0x000056125030e5f2 in ui_adaptor::redraw_invalidated () at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/unique_ptr.h:199
#36 0x000056125030ea59 in ui_manager::redraw_invalidated () at src/ui_manager.cpp:511
#37 0x000056124f14abd3 in game::get_player_input (this=this@entry=0x561252be4270, action="TIMEOUT") at src/handle_action.cpp:427
#38 0x000056124f15d9e2 in game::handle_action (this=0x561252be4270) at src/handle_action.cpp:2973
#39 0x000056124ee9c33d in do_turn () at src/do_turn.cpp:541
#40 0x000056124e5dd16d in main (argc=<optimized out>, argv=<optimized out>) at src/main.cpp:868
(gdb) up
#1  0x00007f08ab399296 in raise () from /lib64/libc.so.6
(gdb) 
#2  0x00007f08ab3818b7 in abort () from /lib64/libc.so.6
(gdb) 
#3  0x000056124ed5c1e9 in signal_handler (sig=<optimized out>) at src/crash.cpp:147
147	        abort(); // NOLINT(cata-assert)
(gdb) 
#4  signal_handler (sig=<optimized out>) at src/crash.cpp:108
108	    static void signal_handler( int sig )
(gdb) 
#5  <signal handler called>
(gdb) 
#6  0x00007f08ab3e903c in __pthread_kill_implementation () from /lib64/libc.so.6
(gdb) 
#7  0x00007f08ab399296 in raise () from /lib64/libc.so.6
(gdb) 
#8  0x00007f08ab3818b7 in abort () from /lib64/libc.so.6
(gdb) 
#9  0x00007f08ab3817db in __assert_fail_base.cold () from /lib64/libc.so.6
(gdb) 
#10 0x00007f08ab391a76 in __assert_fail () from /lib64/libc.so.6
(gdb) 
#11 0x000056125021af65 in ImGui::Begin (name=0x561287b6faa0 "QUERY_POPUP##94637403218112", p_open=p_open@entry=0x56127ccd20e9, flags=532847) at src/third-party/imgui/imgui.cpp:6193
warning: Source file is more recent than executable.
6193	    IM_ASSERT(g.WithinFrameScope);                  // Forgot to call ImGui::NewFrame()

@katemonster33
Copy link
Contributor Author

why are you posting crash logs in a closed PR? please make an issue with some details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Build Issues regarding different builds and build environments Code: Tests Measurement, self-control, statistics, balancing. Code: Tooling Tooling that is not part of the main game but is part of the repo. <Documentation> Design documents, internal info, guides and help. <Enhancement / Feature> New features, or enhancements on existing ImGui Anything related to the new ImGui UI for SDL/tiles or ImTui for curses builds Info / User Interface Game - player communication, menus, etc. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
Development

Successfully merging this pull request may close these issues.