-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Float values NAN or INF are shown as 0 in the debugger and inspector #88006
Comments
I'm guessing this is because the inspector and debugger use Lines 96 to 99 in d335281
For infinities note that |
It really feels like the simplest solution to this would be to add a property to SpinBox/Range to allow only finite values or not. |
Could y'all check out the pr draft? It works but idk if the solution is good. Also there some suggestions in the comments. |
Commented on the PR. Seems pretty straightforward other than that. Not sure if it's worth adding complexity to the code to allow setting nan/inf, but I'll take it to avoid debugging headaches like what I ran into the other day. 😅 |
I just discovered that as well as being shown as 0, NAN variables can also show as |
Tested versions
System information
Godot v4.2.1.stable - Debian GNU/Linux trixie/sid trixie - Wayland - Vulkan (Forward+) - integrated Intel(R) Xe Graphics (TGL GT2) () - 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 Threads)
Issue description
Variables in the debugger window (stack variables) or properties in the inspector of type float will never show NAN or INF values correctly, they show up as 0
The tooltip in the script editor DOES show if a variable contains NAN or INF.
Rather nasty bug if you happen to be debugging a broken formula or something outputting an unwanted nan you are not aware of. The nan will profilerate but you will not see it at all. Nan has some special comparison properties also, which 0 does not, and this could really mess with your mind until you realize the debugger itself is bugged.
Steps to reproduce
Run the mrp until the breakpoint hits.
Open the local variables in the debugger -> all values show as 0
Open the 'self' object in the inspector -> all property values show as 0
Minimal reproduction project (MRP)
mrp_no_nan_visible_in_debugger_and_inspector.zip
The text was updated successfully, but these errors were encountered: