-
-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Description
I’m trying to set up ImGui with SDL2 using this template. The build completes successfully, but when I run the app, it crashes with an assertion error from ImGui.
Steps to Reproduce
-
Clone the repository.
-
Build using the following commands:
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -B build/debug cmake --build build/debug
-
Run:
./build/debug/src/app/App
-
Observe the crash.
Note: A window briefly appears without any ImGui components before the application crashes. Running from WSL2 Ubuntu
Actual Behavior
[18:11:02] APP(debug): Current SDL_Renderer: opengl
[18:11:02] APP(debug): User config path: /path/.local/share/com.mycompany/BasicGuiProjectSetup/
App: /mypath/cpp-gui-template-sdl2/build/debug/_deps/imgui-src/imgui_draw.cpp:2535: ImFont* ImFontAtlas::AddFont(const ImFontConfig*): Assertion `font_cfg->SizePixels > 0.0f && "Is ImFontConfig struct correctly initialized?"' failed.
Aborted (core dumped)
Expected Behavior
The application should run without crashing and display the default GUI.
Environment
-
OS:
- Windows 11 (base)
- Ubuntu 22.04 in WSL2 (running here)
-
Compiler: GCC 13.3.0
-
Build System: Ninja + CMake
-
CMake Version: 3.28.3
Additional Query
-
What is
profile.json
and why is it being saved to this path?User config path: /path/.local/share/com.mycompany/BasicGuiProjectSetup/
Do I need to set up something for it manually?
Additional Context
I’m new to setting up ImGui with SDL2. I chose this template because the documentation is great, but I still can’t figure out how to resolve the crash. Any help would be greatly appreciated!
Thanks