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

Editor crashes when dragging timeline in animation editor #58960

Closed
Calinou opened this issue Mar 10, 2022 · 1 comment · Fixed by #58978
Closed

Editor crashes when dragging timeline in animation editor #58960

Calinou opened this issue Mar 10, 2022 · 1 comment · Fixed by #58978

Comments

@Calinou
Copy link
Member

Calinou commented Mar 10, 2022

Godot version

4.0.alpha (fe95b61)

System information

Fedora 34, GeForce GTX 1080 (NVIDIA 495.46)

Issue description

The editor crashes when dragging timeline in animation editor.

Backtrace

The editor crash handler doesn't work here, so I used gdb instead:

#0  0x00000000047cf136 in Vector2::Vector2 (this=0x7fffff7ff088, p_x=1, p_y=-1)
    at ./core/math/vector2.h:176
#1  0x0000000008d19f75 in Transform2D::affine_invert (this=0x7fffff7ff108) at core/math/transform_2d.cpp:56
#2  0x0000000008d1a052 in Transform2D::affine_inverse (this=0x7fffff7ff128)
    at core/math/transform_2d.cpp:64
#3  0x000000000732f72f in Control::_get_internal_transform (this=0xe201930) at scene/gui/control.cpp:248
#4  0x0000000007340484 in Control::get_transform (this=0xe201930) at scene/gui/control.cpp:2682
#5  0x00000000071faff4 in Viewport::_gui_find_control_at_pos (this=0xce29f30, p_node=0xe201930, 
    p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1388
#6  0x00000000071fb167 in Viewport::_gui_find_control_at_pos (this=0xce29f30, p_node=0xe200b30, 
    p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#7  0x00000000071fb167 in Viewport::_gui_find_control_at_pos (this=0xce29f30, p_node=0xe1ffd00, 
    p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#8  0x00000000071fb167 in Viewport::_gui_find_control_at_pos (this=0xce29f30, p_node=0xe1fd2f0, 
    p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#9  0x00000000071fb167 in Viewport::_gui_find_control_at_pos (this=0xce29f30, p_node=0xe1f7a70, 
    p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#10 0x00000000071fb167 in Viewport::_gui_find_control_at_pos (this=0xce29f30, p_node=0xe1f2350, 
    p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#11 0x00000000071fb167 in Viewport::_gui_find_control_at_pos (this=0xce29f30, p_node=0xe1f1000, 
    p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#12 0x00000000071fb167 in Viewport::_gui_find_control_at_pos (this=0xce29f30, p_node=0xe1e0fc0, 
    p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#13 0x00000000071fb167 in Viewport::_gui_find_control_at_pos (this=0xce29f30, p_node=0xe1e07d0, 
    p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#14 0x00000000071faf1f in Viewport::gui_find_control (this=0xce29f30, p_global=...)
    at scene/main/viewport.cpp:1370
#15 0x00000000071fcf6a in Viewport::_gui_input_event (this=0xce29f30, p_event=...)
    at scene/main/viewport.cpp:1691
#16 0x0000000007204a8a in Viewport::push_input (this=0xce29f30, p_event=..., p_local_coords=false)
    at scene/main/viewport.cpp:2697
#17 0x0000000007247275 in Window::update_mouse_cursor_shape (this=0xce29f30) at scene/main/window.cpp:390
#18 0x0000000007340418 in Control::set_default_cursor_shape (this=0x1316c980, 
    p_shape=Control::CURSOR_ARROW) at scene/gui/control.cpp:2670
#19 0x0000000005deca42 in AnimationTimelineEdit::gui_input (this=0x1316c980, p_event=...)
    at editor/animation_track_editor.cpp:1821
#20 0x0000000007339113 in Control::_call_gui_input (this=0x1316c980, p_event=...)
    at scene/gui/control.cpp:941
#21 0x00000000071faaf4 in Viewport::_gui_call_input (this=0xce29f30, p_control=0x1316d1e0, p_input=...)
    at scene/main/viewport.cpp:1300
#22 0x00000000071fdf42 in Viewport::_gui_input_event (this=0xce29f30, p_event=...)
    at scene/main/viewport.cpp:1791
#23 0x0000000007204a8a in Viewport::push_input (this=0xce29f30, p_event=..., p_local_coords=false)
    at scene/main/viewport.cpp:2697
#24 0x0000000007247275 in Window::update_mouse_cursor_shape (this=0xce29f30) at scene/main/window.cpp:390
#25 0x0000000007340418 in Control::set_default_cursor_shape (this=0x1316c980, 
    p_shape=Control::CURSOR_ARROW) at scene/gui/control.cpp:2670
#26 0x0000000005deca42 in AnimationTimelineEdit::gui_input (this=0x1316c980, p_event=...)
    at editor/animation_track_editor.cpp:1821
#27 0x0000000007339113 in Control::_call_gui_input (this=0x1316c980, p_event=...)
    at scene/gui/control.cpp:941
#28 0x00000000071faaf4 in Viewport::_gui_call_input (this=0xce29f30, p_control=0x1316d1e0, p_input=...)
    at scene/main/viewport.cpp:1300
#29 0x00000000071fdf42 in Viewport::_gui_input_event (this=0xce29f30, p_event=...)
    at scene/main/viewport.cpp:1791
#30 0x0000000007204a8a in Viewport::push_input (this=0xce29f30, p_event=..., p_local_coords=false)
    at scene/main/viewport.cpp:2697
#31 0x0000000007247275 in Window::update_mouse_cursor_shape (this=0xce29f30) at scene/main/window.cpp:390
#32 0x0000000007340418 in Control::set_default_cursor_shape (this=0x1316c980, 
    p_shape=Control::CURSOR_ARROW) at scene/gui/control.cpp:2670

I bisected the regression to 0fce98b (#58913). cc @Sauermann

Steps to reproduce

  • Add a Sprite2D node to animate.
  • Add AnimationPlayer node with an animation.
  • Add 2-3 keyframes to animate the Sprite2D node's position.
  • Drag the timeline on any animation (even on the automatically created RESET track which only has 1 keyframe).

Minimal reproduction project

test_animationplayer_manual.zip

@akien-mga
Copy link
Member

Also crashes with stack overflow just when opening the Animation tab in a blank scene (with no AnimationPlayer):

Thread 1 "godot-git" received signal SIGSEGV, Segmentation fault.
0x00000000061aa4a8 in Transform2D::Transform2D (this=0x7fffff7ff060) at ./core/math/transform_2d.h:150
150             Transform2D() {
(gdb) bt
#0  0x00000000061aa4a8 in Transform2D::Transform2D (this=0x7fffff7ff060) at ./core/math/transform_2d.h:150
#1  0x0000000007c18a21 in Control::_get_internal_transform (this=0x10f72f20) at scene/gui/control.cpp:243
#2  0x0000000007c26ac9 in Control::get_transform (this=0x10f72f20) at scene/gui/control.cpp:2682
#3  0x0000000007b1dc34 in Viewport::_gui_find_control_at_pos (this=0xc624f20, p_node=0x10f72f20, p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1388
#4  0x0000000007b1ddc6 in Viewport::_gui_find_control_at_pos (this=0xc624f20, p_node=0x10f72070, p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#5  0x0000000007b1ddc6 in Viewport::_gui_find_control_at_pos (this=0xc624f20, p_node=0x10f71290, p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#6  0x0000000007b1ddc6 in Viewport::_gui_find_control_at_pos (this=0xc624f20, p_node=0x10f2f5d0, p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#7  0x0000000007b1ddc6 in Viewport::_gui_find_control_at_pos (this=0xc624f20, p_node=0xd8f1170, p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#8  0x0000000007b1ddc6 in Viewport::_gui_find_control_at_pos (this=0xc624f20, p_node=0xd8f0370, p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#9  0x0000000007b1ddc6 in Viewport::_gui_find_control_at_pos (this=0xc624f20, p_node=0xd8ef540, p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#10 0x0000000007b1ddc6 in Viewport::_gui_find_control_at_pos (this=0xc624f20, p_node=0xd8ecb30, p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#11 0x0000000007b1ddc6 in Viewport::_gui_find_control_at_pos (this=0xc624f20, p_node=0xd8e72b0, p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#12 0x0000000007b1ddc6 in Viewport::_gui_find_control_at_pos (this=0xc624f20, p_node=0xd8e1b10, p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#13 0x0000000007b1ddc6 in Viewport::_gui_find_control_at_pos (this=0xc624f20, p_node=0xd8e07b0, p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#14 0x0000000007b1ddc6 in Viewport::_gui_find_control_at_pos (this=0xc624f20, p_node=0xd8d0fc0, p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#15 0x0000000007b1ddc6 in Viewport::_gui_find_control_at_pos (this=0xc624f20, p_node=0xd8d0770, p_global=..., p_xform=..., r_inv_xform=...) at scene/main/viewport.cpp:1403
#16 0x0000000007b1db65 in Viewport::gui_find_control (this=0xc624f20, p_global=...) at scene/main/viewport.cpp:1370
#17 0x0000000007b1f16a in Viewport::_gui_input_event (this=0xc624f20, p_event=...) at scene/main/viewport.cpp:1691
#18 0x0000000007b25413 in Viewport::push_input (this=0xc624f20, p_event=..., p_local_coords=false) at scene/main/viewport.cpp:2697
#19 0x0000000007b5da65 in Window::update_mouse_cursor_shape (this=0xc624f20) at scene/main/window.cpp:390
#20 0x0000000007c26a74 in Control::set_default_cursor_shape (this=0x12765650, p_shape=Control::CURSOR_ARROW) at scene/gui/control.cpp:2670
#21 0x0000000006bdff14 in AnimationTimelineEdit::gui_input (this=0x12765650, p_event=...) at editor/animation_track_editor.cpp:1820
#22 0x0000000007c1e7c5 in Control::_call_gui_input (this=0x12765650, p_event=...) at scene/gui/control.cpp:941
#23 0x0000000007b1d7cd in Viewport::_gui_call_input (this=0xc624f20, p_control=0x12765eb0, p_input=...) at scene/main/viewport.cpp:1300
#24 0x0000000007b1fa87 in Viewport::_gui_input_event (this=0xc624f20, p_event=...) at scene/main/viewport.cpp:1791
#25 0x0000000007b25413 in Viewport::push_input (this=0xc624f20, p_event=..., p_local_coords=false) at scene/main/viewport.cpp:2697
#26 0x0000000007b5da65 in Window::update_mouse_cursor_shape (this=0xc624f20) at scene/main/window.cpp:390
#27 0x0000000007c26a74 in Control::set_default_cursor_shape (this=0x12765650, p_shape=Control::CURSOR_ARROW) at scene/gui/control.cpp:2670
...
#20141 0x0000000007b1d7cd in Viewport::_gui_call_input (this=0xc624f20, p_control=0x12765eb0, p_input=...) at scene/main/viewport.cpp:1300
#20142 0x0000000007b1fa87 in Viewport::_gui_input_event (this=0xc624f20, p_event=...) at scene/main/viewport.cpp:1791
#20143 0x0000000007b25413 in Viewport::push_input (this=0xc624f20, p_event=..., p_local_coords=false) at scene/main/viewport.cpp:2697
#20144 0x0000000007b60443 in Window::_window_input (this=0xc624f20, p_ev=...) at scene/main/window.cpp:985
#20145 0x0000000007b7bdc3 in call_with_variant_args_helper<Window, Ref<InputEvent> const&, 0ul> (p_instance=0xc624f20, p_method=(void (Window::*)(Window * const, const Ref<InputEvent> &)) 0x7b602aa <Window::_window_input(Ref<InputEvent> const&)>, p_args=0x7fffffffc8c8, r_error=...) at ./core/variant/binder_common.h:232
#20146 0x0000000007b793c6 in call_with_variant_args<Window, Ref<InputEvent> const&> (p_instance=0xc624f20, p_method=(void (Window::*)(Window * const, const Ref<InputEvent> &)) 0x7b602aa <Window::_window_input(Ref<InputEvent> const&)>, p_args=0x7fffffffc8c8, p_argcount=1, r_error=...) at ./core/variant/binder_common.h:346
#20147 0x0000000007b76186 in CallableCustomMethodPointer<Window, Ref<InputEvent> const&>::call (this=0x1685b190, p_arguments=0x7fffffffc8c8, p_argcount=1, r_return_value=..., r_call_error=...) at ./core/object/callable_method_pointer.h:104
#20148 0x00000000093acec1 in Callable::call (this=0x7fffffffc870, p_arguments=0x7fffffffc8c8, p_argcount=1, r_return_value=..., r_call_error=...) at core/variant/callable.cpp:50
#20149 0x00000000055d0fbd in DisplayServerX11::_dispatch_input_event (this=0xa533020, p_event=...) at platform/linuxbsd/display_server_x11.cpp:3077
#20150 0x00000000055d0d35 in DisplayServerX11::_dispatch_input_events (p_event=...) at platform/linuxbsd/display_server_x11.cpp:3048
#20151 0x000000000935a0dd in Input::_parse_input_event_impl (this=0xa484120, p_event=..., p_is_emulated=false) at core/input/input.cpp:658
#20152 0x000000000935b36a in Input::flush_buffered_events (this=0xa484120) at core/input/input.cpp:877
#20153 0x00000000055d569c in DisplayServerX11::process_events (this=0xa533020) at platform/linuxbsd/display_server_x11.cpp:4038
#20154 0x00000000055b9c85 in OS_LinuxBSD::run (this=0x7fffffffd170) at platform/linuxbsd/os_linuxbsd.cpp:353
#20155 0x00000000055b5f5c in main (argc=4, argv=0x7fffffffd6b8) at platform/linuxbsd/godot_linuxbsd.cpp:58

Sauermann added a commit to Sauermann/godot that referenced this issue Dec 29, 2022
…SourceEditor

get_cursor_shape() is used in cases where a Control displays different cursors in different areas.
There is no need to set the default cursor shape on every mouse move event.

Was part of the reason for godotengine#58960.
Streq pushed a commit to Streq/godot that referenced this issue Feb 9, 2023
…SourceEditor

get_cursor_shape() is used in cases where a Control displays different cursors in different areas.
There is no need to set the default cursor shape on every mouse move event.

Was part of the reason for godotengine#58960.
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.

2 participants