-
-
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
CalcTextSize can produce a segfault #4769
Comments
Would like to add, that I'm calling Also, turned out that it doesn't segfault for me only when But there is a gdb trace of segfault caused by
|
hide_text_after_double_hash
parameter is set to false
Please check if font atlas is generated. If you do not do that by yourself atlas if generation is triggered by the backend while creating font atlas texture via |
Oh, thanks. But I cannot figure out how exactly I need to call |
You may be simply missing a call to NewFrame(), it looks like the current font pointer is never set. A fuller repro would be helpful.
|
Yeah, if I put everything after a |
Version/Branch of Dear ImGui:
Version: 1.85
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler: g++ 11.2.0
Operating System: gentoo
My Issue/Question:
Calling
CalcTextSize
likeImGui::CalcTextSize("");
produces segfault, but calling it likeImGui::CalcTextSize("", nullptr, true);
wont segfault.String content doesn't affect presence of the error.
There is also what gdb says about that:
The text was updated successfully, but these errors were encountered: