Skip to content
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

TextureProgress.set_radial_initial_angle(INF) freeze Godot #60338

Closed
qarmin opened this issue Apr 18, 2022 · 1 comment · Fixed by #98816
Closed

TextureProgress.set_radial_initial_angle(INF) freeze Godot #60338

qarmin opened this issue Apr 18, 2022 · 1 comment · Fixed by #98816
Milestone

Comments

@qarmin
Copy link
Contributor

qarmin commented Apr 18, 2022

Godot version

3.5.beta.custom_build. 20b0818

System information

Ubuntu 21.10 - Nvidia GTX 970, Gnome shell 40.4 X11

Issue description

	var temp_variable452 = TextureProgress.new()
	temp_variable452.set_radial_initial_angle(INF)

freeze inside this code

#0  0x0000000003c3d127 in TextureProgress::set_radial_initial_angle (this=0xce3c4f0, p_angle=inf) at scene/gui/texture_progress.cpp:561
#1  0x0000000001c3dea7 in MethodBind1<float>::call (this=0x9e1dcd0, p_object=0xce3c4f0, p_args=0x7fffffffc8a8, p_arg_count=1, r_error=...)
    at ./core/method_bind.gen.inc:759
#2  0x0000000004a25250 in Object::call (this=0xce3c4f0, p_method=..., p_args=0x7fffffffc8a8, p_argcount=1, r_error=...) at core/object.cpp:918
#3  0x0000000004ac5fa9 in Variant::call_ptr (this=0x7fffffffc848, p_method=..., p_args=0x7fffffffc8a8, p_argcount=1, r_ret=0x0, r_error=...)
    at core/variant_call.cpp:1185
#4  0x0000000001991e47 in GDScriptFunction::call (this=0xce7cd30, p_instance=0xb685130, p_args=0x7fffffffd128, p_argcount=1, r_err=..., p_state=0x0)
    at modules/gdscript/gdscript_function.cpp:1050
#5  0x0000000001932d24 in GDScriptInstance::call_multilevel (this=0xb685130, p_method=..., p_args=0x7fffffffd128, p_argcount=1)
    at modules/gdscript/gdscript.cpp:1211
#6  0x000000000398876e in Node::_notification (this=0xce7ee80, p_notification=17) at scene/main/node.cpp:56
#7  0x00000000018ef52c in Node::_notificationv (this=0xce7ee80, p_notification=17, p_reversed=false) at scene/main/node.h:45
#8  0x0000000004a25393 in Object::notification (this=0xce7ee80, p_notification=17, p_reversed=false) at core/object.cpp:927
#9  0x00000000039c46fd in SceneTree::_notify_group_pause (this=0xa43cdb0, p_group=..., p_notification=17) at scene/main/scene_tree.cpp:1069
#10 0x00000000039c1e16 in SceneTree::idle (this=0xa43cdb0, p_time=0.0781010017) at scene/main/scene_tree.cpp:605
#11 0x000000000188d72c in Main::iteration () at main/main.cpp:2271
#12 0x000000000184df5a in OS_X11::run (this=0x7fffffffd5a0) at platform/x11/os_x11.cpp:3842
#13 0x0000000001839b0b in main (argc=2, argv=0x7fffffffded8) at platform/x11/godot_x11.cpp:55

Steps to reproduce

Above

Minimal reproduction project

No response

@arkology
Copy link
Contributor

arkology commented Nov 3, 2024

Godot will not only freeze when using huge numbers as parameter for this function, but also will give wrong results.

@tool
extends EditorScript

func _run() -> void:
	var temp_variable452 = TextureProgressBar.new()
	var f : float = 360*1e7
	temp_variable452.set_radial_initial_angle(f)
	print(f)
	print(temp_variable452.radial_initial_angle)
	return

Output:

3600000000.0
296.0

This one doesn't freeze (freeze occurs with 360*1e10) with current implementation, but result are still not correct.
So due to floating-point error this is not possible to get reliable results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants