Godot: Changing an animation key's values in the inspector with enter crashes the editor

Created on 28 May 2019  路  11Comments  路  Source: godotengine/godot

Godot version:
254286a

Issue description:
When changing one the components of a select key in the animation editor (time or value) and confirming it with enter, will result in the editor crashing with this backtrace:

[1] /usr/lib/libc.so.6(+0x378b0) [0x7f7e01f648b0] (??:0)
[2] Node::is_inside_tree() const (/home/michael/Development/Projects/godot/./scene/main/node.h:283)
[3] Range::Shared::emit_value_changed() (/home/michael/Development/Projects/godot/scene/gui/range.cpp:58)
[4] Range::set_value(double) (/home/michael/Development/Projects/godot/scene/gui/range.cpp:99)
[5] EditorSpinSlider::_evaluate_input_text() (/home/michael/Development/Projects/godot/editor/editor_spin_slider.cpp:333)
[6] EditorSpinSlider::_value_focus_exited() (/home/michael/Development/Projects/godot/editor/editor_spin_slider.cpp:356)
[7] MethodBind0::call(Object*, Variant const**, int, Variant::CallError&) (/home/michael/Development/Projects/godot/./core/method_bind.gen.inc:61 (discriminator 4))
[8] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/michael/Development/Projects/godot/core/object.cpp:940 (discriminator 1))
[9] Object::emit_signal(StringName const&, Variant const**, int) (/home/michael/Development/Projects/godot/core/object.cpp:1240 (discriminator 1))
[10] Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/michael/Development/Projects/godot/core/object.cpp:1296)
[11] Control::_notification(int) (/home/michael/Development/Projects/godot/scene/gui/control.cpp:642)
[12] Control::_notificationv(int, bool) (/home/michael/Development/Projects/godot/./scene/gui/control.h:51 (discriminator 14))
[13] LineEdit::_notificationv(int, bool) (/home/michael/Development/Projects/godot/scene/gui/line_edit.h:42)
[14] Object::notification(int, bool) (/home/michael/Development/Projects/godot/core/object.cpp:952)
[15] Viewport::_gui_remove_focus() (/home/michael/Development/Projects/godot/scene/main/viewport.cpp:2515)
[16] Viewport::_gui_hid_control(Control*) (/home/michael/Development/Projects/godot/scene/main/viewport.cpp:2482)
[17] Control::_notification(int) (/home/michael/Development/Projects/godot/scene/gui/control.cpp:661)
[18] Control::_notificationv(int, bool) (/home/michael/Development/Projects/godot/./scene/gui/control.h:51 (discriminator 14))
[19] LineEdit::_notificationv(int, bool) (/home/michael/Development/Projects/godot/scene/gui/line_edit.h:42 (discriminator 3))
[20] Object::notification(int, bool) (/home/michael/Development/Projects/godot/core/object.cpp:952)
[21] CanvasItem::_propagate_visibility_changed(bool) (/home/michael/Development/Projects/godot/scene/2d/canvas_item.cpp:386)
[22] CanvasItem::hide() (/home/michael/Development/Projects/godot/scene/2d/canvas_item.cpp:430)
[23] EditorSpinSlider::_value_input_entered(String const&) (/home/michael/Development/Projects/godot/editor/editor_spin_slider.cpp:340)
[24] MethodBind1<String const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/michael/Development/Projects/godot/./core/method_bind.gen.inc:775 (discriminator 12))
[25] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/michael/Development/Projects/godot/core/object.cpp:940 (discriminator 1))
[26] Object::emit_signal(StringName const&, Variant const**, int) (/home/michael/Development/Projects/godot/core/object.cpp:1240 (discriminator 1))
[27] Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/michael/Development/Projects/godot/core/object.cpp:1296)
[28] LineEdit::_gui_input(Ref<InputEvent>) (/home/michael/Development/Projects/godot/scene/gui/line_edit.cpp:274 (discriminator 4))
[29] MethodBind1<Ref<InputEvent> >::call(Object*, Variant const**, int, Variant::CallError&) (/home/michael/Development/Projects/godot/./core/method_bind.gen.inc:775 (discriminator 12))
[30] Object::call_multilevel(StringName const&, Variant const**, int) (/home/michael/Development/Projects/godot/core/object.cpp:775 (discriminator 1))
[31] Object::call_multilevel(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/michael/Development/Projects/godot/core/object.cpp:881)
[32] Viewport::_gui_input_event(Ref<InputEvent>) (/home/michael/Development/Projects/godot/scene/main/viewport.cpp:2266 (discriminator 2))
[33] Viewport::input(Ref<InputEvent> const&) (/home/michael/Development/Projects/godot/scene/main/viewport.cpp:2686 (discriminator 2))
[34] Viewport::_vp_input(Ref<InputEvent> const&) (/home/michael/Development/Projects/godot/scene/main/viewport.cpp:1315)
[35] MethodBind1<Ref<InputEvent> const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/michael/Development/Projects/godot/./core/method_bind.gen.inc:775 (discriminator 12))
[36] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/michael/Development/Projects/godot/core/object.cpp:940 (discriminator 1))
[37] Object::call(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/michael/Development/Projects/godot/core/object.cpp:865)
[38] SceneTree::call_group_flags(unsigned int, StringName const&, StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/michael/Development/Projects/godot/scene/main/scene_tree.cpp:267)
[39] SceneTree::input_event(Ref<InputEvent> const&) (/home/michael/Development/Projects/godot/scene/main/scene_tree.cpp:422 (discriminator 6))
[40] InputDefault::_parse_input_event_impl(Ref<InputEvent> const&, bool) (/home/michael/Development/Projects/godot/main/input_default.cpp:416)
[41] InputDefault::parse_input_event(Ref<InputEvent> const&) (/home/michael/Development/Projects/godot/main/input_default.cpp:260)
[42] InputDefault::flush_accumulated_events() (/home/michael/Development/Projects/godot/main/input_default.cpp:671)
[43] OS_X11::process_xevents() (/home/michael/Development/Projects/godot/platform/x11/os_x11.cpp:2485)
[44] OS_X11::run() (/home/michael/Development/Projects/godot/platform/x11/os_x11.cpp:3032)
[45] /home/michael/Development/Projects/godot/bin/godot.x11.tools.64(main+0xdc) [0x1384942] (/home/michael/Development/Projects/godot/platform/x11/godot_x11.cpp:56)
[46] /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7f7e01f50ce3] (??:0)
[47] /home/michael/Development/Projects/godot/bin/godot.x11.tools.64(_start+0x2e) [0x13847ae] (??:?)

However, if you confirm it by clicking outside, it will not crash, but output this error instead:
scene/gui/control.cpp:2186 - Condition ' !is_inside_tree() ' is true.

Changing the Easing also doesn't crash, but the inspector will go blank once it's changed.

bug confirmed crash regression editor

Most helpful comment

I bisected it to this:
ca80ebe9f6319f3caf008

All 11 comments

By the way, I tested this prior to my commit, and still happens, so the cause has to be something older.

I bisected it to this:
ca80ebe9f6319f3caf008

CC @timoschwarzer

also crash when changing Interpolcation mode.
image

Will take a look later today. Thanks for bisecting! :)

No problem. Hope its nothing too serious.

Hope its nothing too serious.

Worst case would be reverting and rewriting the PR. It wasn't a too large of a PR :wink:

I can confirm this (clicking on other the controls to unfocus or editing with the arrow key doesn't cause a crash).

Stack trace:

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000008
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0x8:
--> 
    __TEXT                 0000000103847000-000000010815a000 [ 73.1M] r-x/rwx SM=COW  /Volumes/VOLUME/*/Godot.app/Contents/MacOS/Godot

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x00007fff73c642c6 __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fff73d1fbf1 pthread_kill + 284
2   libsystem_c.dylib               0x00007fff73bce6a6 abort + 127
3   godot                           0x0000000103849a03 handle_crash(int) + 3203 (crash_handler_osx.mm:153)
4   libsystem_platform.dylib        0x00007fff73d14b5d _sigtramp + 29
5   ???                             000000000000000000 0 + 0
6   godot                           0x0000000106923eac HashMap<StringName, Object::Signal, HashMapHasherDefault, HashMapComparatorDefault<StringName>, (unsigned char)3, (unsigned char)8>::getptr(StringName const&) + 76 (hash_map.h:320)
7   godot                           0x0000000106922da0 Object::emit_signal(StringName const&, Variant const**, int) + 96 (object.cpp:1177)
8   godot                           0x00000001069216d8 Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) + 200 (object.cpp:1296)
9   godot                           0x0000000105cd4088 CanvasItem::_propagate_visibility_changed(bool) + 296 (canvas_item.cpp:389)
10  godot                           0x0000000105cd46c3 CanvasItem::hide() + 131 (canvas_item.cpp:430)
11  godot                           0x0000000104ec276a EditorSpinSlider::_value_input_entered(String const&) + 42 (editor_spin_slider.cpp:340)
12  godot                           0x000000010694312b MethodBind1<String const&>::call(Object*, Variant const**, int, Variant::CallError&) + 747 (method_bind.gen.inc:775)
13  godot                           0x0000000106920d60 Object::call(StringName const&, Variant const**, int, Variant::CallError&) + 1456 (object.cpp:940)
14  godot                           0x000000010692369a Object::emit_signal(StringName const&, Variant const**, int) + 2394 (object.cpp:1240)
15  godot                           0x00000001069216d8 Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) + 200 (object.cpp:1296)
16  godot                           0x0000000105902a72 LineEdit::_gui_input(Ref<InputEvent>) + 6274 (line_edit.cpp:306)
17  godot                           0x0000000105804dab MethodBind1<Ref<InputEvent> >::call(Object*, Variant const**, int, Variant::CallError&) + 747 (method_bind.gen.inc:775)
18  godot                           0x000000010691f344 Object::call_multilevel(StringName const&, Variant const**, int) + 948 (object.cpp:775)
19  godot                           0x0000000106920785 Object::call_multilevel(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) + 213 (object.cpp:880)
20  godot                           0x00000001057cf65d Viewport::_gui_input_event(Ref<InputEvent>) + 15485 (viewport.cpp:2266)
21  godot                           0x00000001057c9658 Viewport::input(Ref<InputEvent> const&) + 296 (viewport.cpp:2686)
22  godot                           0x00000001057c94e7 Viewport::_vp_input(Ref<InputEvent> const&) + 247 (viewport.cpp:1316)
23  godot                           0x0000000106ad5dcb MethodBind1<Ref<InputEvent> const&>::call(Object*, Variant const**, int, Variant::CallError&) + 747 (method_bind.gen.inc:775)
24  godot                           0x0000000106920d60 Object::call(StringName const&, Variant const**, int, Variant::CallError&) + 1456 (object.cpp:940)
25  godot                           0x0000000106920660 Object::call(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) + 272 (object.cpp:865)
26  godot                           0x000000010578c829 SceneTree::call_group_flags(unsigned int, StringName const&, StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) + 1785 (scene_tree.cpp:267)
27  godot                           0x000000010578da20 SceneTree::input_event(Ref<InputEvent> const&) + 432 (scene_tree.cpp:422)
28  godot                           0x000000010386a2fa InputDefault::_parse_input_event_impl(Ref<InputEvent> const&, bool) + 7130 (input_default.cpp:442)
29  godot                           0x000000010386870f InputDefault::parse_input_event(Ref<InputEvent> const&) + 31 (input_default.cpp:260)
30  godot                           0x000000010386c24a InputDefault::flush_accumulated_events() + 90 (input_default.cpp:671)
31  godot                           0x0000000103857674 OS_OSX::process_events() + 276 (os_osx.mm:2606)
32  godot                           0x0000000103857c5f OS_OSX::run() + 175 (os_osx.mm:2682)
33  godot                           0x000000010385f814 main + 1444 (godot_main_osx.mm:100)
34  libdyld.dylib                   0x00007fff73b293d5 start + 1

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x00000001179385c0  rcx: 0x00007ffeec3b1fa8  rdx: 0x0000000000000000
  rdi: 0x0000000000000307  rsi: 0x0000000000000006  rbp: 0x00007ffeec3b1fe0  rsp: 0x00007ffeec3b1fa8
   r8: 0x00000000000130a8   r9: 0x00007fffaa209048  r10: 0x0000000000000000  r11: 0x0000000000000206
  r12: 0x0000000000000307  r13: 0x0000000000000000  r14: 0x0000000000000006  r15: 0x000000000000002d
  rip: 0x00007fff73c642c6  rfl: 0x0000000000000206  cr2: 0x00007fffaa207188

Logical CPU:     0
Error Code:      0x02000148
Trap Number:     133

I found the issue but I cannot really tell why exactly is segfaults.

The issue is this line: https://github.com/godotengine/godot/blob/master/editor/plugins/animation_player_editor_plugin.cpp#L326

Any suggestions? I can't seem to get my head around it... :sweat_smile:

probably caused by same reason.
can't control easing.

animation_inspector

Was this page helpful?
0 / 5 - 0 ratings