-
-
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
Floating point exception from slider in very small child window #5249
Comments
We don't well support While a little of a workaround, I think in On another side, I think we could probably to fix/clarify cases of using near-zero rounding values. That radius value will probably fail our |
Tried making that change it didn't seem to help; in ScrollbarEx the
Poking around further, it seems like in
The tiny number coming from
If I make the following ch ange it does stop crashing, although the change feels.. pretty arbitrary: void ImDrawList::_PathArcToFastEx(const ImVec2& center, float radius, int a_min_sample, int a_max_sample, int a_step)
{
- if (radius <= 0.0f)
+ if (radius <= 0.5f) |
Version/Branch of Dear ImGui:
Version: 1.86 via imgui-rs
Branch: docking
My Issue/Question:
We are using
SetWindowFontScale
to have a zoomable imnodes-style node graph. This all works well, except sometimes we get a floating point exception as follows:The top of the backtrace refers to this code:
https://github.com/ocornut/imgui/blob/v1.86/imgui_draw.cpp#L1066-L1068
(well specifically these ones in the docking branch code)
Problem is most probably caused by radius being a tiny number (2.38418579e-07) leading to some zero-division
It's hard to narrow down the exact cause, as the crash only happens sometimes when randomly panning around in a large node graph - but I'm hoping the backtrace is enough to narrow down what causes this exception?
The text was updated successfully, but these errors were encountered: