-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Assert when using font awesome Icons #8070
Comments
Hello, |
Yes, same thing happens when I use the code shown as bellow: io.Fonts->AddFontFromFileTTF(FONT_ICON_FILE_NAME_FAS, 18.0f, &icons_config, icons_ranges); Everything is fine with MSVC2015, but the application crashes and shows assertion with MinGW |
I get the same assert. It depends on icons_ranges value (maximun 0xf06d for size 16 without error) and also on font size (not for size 13 for example). Does not happen on a mingw-w64 64bits build but happens with 32 bits build Could be related to ImTextureID changing from void* to ImU64? |
My case is for impl_opengl3 (when calling |
Please provide exact compilation and linking flags for dear imgui. Neither of you provided them. |
It is a CMake build from https://github.com/sonoro1234/LuaJIT-ImGui/blob/docking_inter/CMakeLists.txt comand
Where the only relevant flag is I will try to get a simpler reproducer with example_glfw_opengl3 |
My compilation is shown as below: g++.exe -c imgui/imgui_demo.cpp -o imgui/imgui_demo.o -O2 -pipe
g++.exe -c imgui/imgui_tables.cpp -o imgui/imgui_tables.o -O2 -pipe
g++.exe -c imgui/imgui_impl_win32.cpp -o imgui/imgui_impl_win32.o -O2 -pipe
g++.exe -c imgui/imgui_widgets.cpp -o imgui/imgui_widgets.o -O2 -pipe
g++.exe -c imgui/imgui_impl_dx11.cpp -o imgui/imgui_impl_dx11.o -O2 -pipe
g++.exe -c imgui/imgui_draw.cpp -o imgui/imgui_draw.o -O2 -pipe
g++.exe -c main.cpp -o main.o -O2 -pipe
g++.exe -c imgui/imgui.cpp -o imgui/imgui.o -O2 -pipe
windres.exe -i imgui-fontawesome-test_private.rc --input-format=rc -o imgui-fontawesome-test_private.res -O coff
g++.exe imgui/imgui_demo.o imgui/imgui_tables.o imgui/imgui_impl_win32.o imgui/imgui_widgets.o imgui/imgui_impl_dx11.o imgui/imgui_draw.o main.o imgui/imgui.o imgui-fontawesome-test_private.res -o imgui-fontawesome-test.exe -s -ld3d11 -ld3dcompiler -ldxgi -lgdi32 -ldwmapi -static My case is for 32bit with mingw-w64, and I have'd try this for 64bit. |
https://github.com/sonoro1234/imgui/tree/stbtt_assert is a branch where we can go to init_cmake mingw-w64 can be found on https://github.com/niXman/mingw-builds-binaries/releases i686-14.2.0-release-posix-dwarf-msvcrt-rt_v12-rev0.7z is for 32bits |
Version/Branch of Dear ImGui:
Version 1.91.3 and version 1.90.9
Back-ends:
imgui_impl_win32.cpp + imgui_impl_dx11.cpp
Compiler, OS:
Windows 10 + GCC-8.5.0 with MinGW-w64-8.0.3
Full config/build information:
g++.exe -c main.cpp -o main.o -O2 -pipe
windres.exe -i imgui-fontawesome-test_private.rc --input-format=rc -o imgui-fontawesome-test_private.res -O coff
g++.exe imgui/imgui_impl_win32.o imgui/imgui.o imgui/imgui_demo.o imgui/imgui_draw.o main.o imgui/imgui_tables.o imgui/imgui_impl_dx11.o imgui/imgui_widgets.o imgui-fontawesome-test_private.res -o imgui-fontawesome-test.exe -s -ld3d11 -ld3dcompiler -ldxgi -lgdi32 -ldwmapi -static
Details:
When I tried to compile caiocinel/imgui-fontawesome-example using GCC-8.5.0 with MinGW-w64-8.0.3 on Windows 10, the application exited with an assertion in file imgui/imstb_truetype.h, line 3160. It's fine with MSVC-2015.
Screenshots/Video:
Assertion failed: dy >= 0, file imgui/imstb_truetype.h, line 3160
Process exited after 2.554 seconds with return value 3 (562.5 ms cpu time, 62744 KB mem used).
Press ANY key to exit...
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: