godot
godot copied to clipboard
Regression: Crash when dragging FBX into scene
Tested versions
Reproducible in: 4.3 dev5 Not reproducible in: 4.2.1
System information
Godot v4.3.dev5 - macOS 14.4.0 - Vulkan (Mobile) - integrated Apple M1 - Apple M1 (8 Threads)
Issue description
I have imported an FBX file (a demo scene from Synty) and drag it into the 3D view. Even before I release the mouse button during the D&D operation, the editor already starts beach balling and finally crashes.
Steps to reproduce
- create an empty new project
- create a new folder in the resource browser
- drag the textures and some FBX files from a Synty asset pack into the new folder
- (wait for import to finish)
- Drag an FBX onto the scene in the 3D view
- (witness the crash)
Minimal reproduction project (MRP)
The reproduction involves copyrighted materials. How can I share this?
I might be able to get access to the synty assets. Can you list the name?
I might be able to get access to the synty assets. Can you list the name?
I tried with the MINI City Pack (https://syntystore.com/products/polygon-mini-city-pack) and the Samurai Pack (https://syntystore.com/products/polygon-samurai-pack).
Related observations:
- I imported the Samurai Pack under 4.3 dev 5 and it crashes as described above. However, when I open that 4.3 project in 4.2.1 (it downgrades from 4.3 to 4.2 while it opens) then it works in 4.2.1 as expected
- I tried the Synty City Pack (not the MINI, but the regular one) which includes a ready-made Godot project. That works flawless
We're getting access to synty, but I think I'm getting con-flu and others might be slow.
FWIW, I have built the master branch with debug symbols enabled and here's the stack trace:
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.dev.custom_build (7d151c83811f8ac8873439826c16d88c83aba12f)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] 1 libsystem_platform.dylib 0x0000000183467584 _sigtramp + 56
[2] String::String(String const&) (in godot.macos.editor.dev.arm64) (ustring.h:461)
[3] String::String(String const&) (in godot.macos.editor.dev.arm64) (ustring.h:461)
[4] String::String(String const&) (in godot.macos.editor.dev.arm64) (ustring.h:461)
[5] Node::get_scene_file_path() const (in godot.macos.editor.dev.arm64) (node.cpp:2481)
[6] Node3DEditorViewport::can_drop_data_fw(Vector2 const&, Variant const&, Control*) (in godot.macos.editor.dev.arm64) (node_3d_editor_plugin.cpp:4510)
[7] void call_with_variant_args_ret_helper<Node3DEditorViewport, bool, Vector2 const&, Variant const&, Control*, 0ul, 1ul, 2ul>(Node3DEditorViewport*, bool (Node3DEditorViewport::*)(Vector2 const&, Variant const&, Control*), Variant const**, Variant&, Callable::CallError&, IndexSequence<0ul, 1ul, 2ul>) (in godot.macos.editor.dev.arm64) (binder_common.h:756)
[8] void call_with_variant_args_ret<Node3DEditorViewport, bool, Vector2 const&, Variant const&, Control*>(Node3DEditorViewport*, bool (Node3DEditorViewport::*)(Vector2 const&, Variant const&, Control*), Variant const**, int, Variant&, Callable::CallError&) (in godot.macos.editor.dev.arm64) (binder_common.h:800)
[9] CallableCustomMethodPointerRet<Node3DEditorViewport, bool, Vector2 const&, Variant const&, Control*>::call(Variant const**, int, Variant&, Callable::CallError&) const (in godot.macos.editor.dev.arm64) (callable_method_pointer.h:156)
[10] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (in godot.macos.editor.dev.arm64) (callable.cpp:58)
[11] CallableCustomBind::call(Variant const**, int, Variant&, Callable::CallError&) const (in godot.macos.editor.dev.arm64) (callable_bind.cpp:153)
[12] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (in godot.macos.editor.dev.arm64) (callable.cpp:58)
[13] Control::can_drop_data(Vector2 const&, Variant const&) const (in godot.macos.editor.dev.arm64) (control.cpp:1925)
[14] Viewport::_gui_drop(Control*, Vector2, bool) (in godot.macos.editor.dev.arm64) (viewport.cpp:1674)
[15] Viewport::_gui_input_event(Ref<InputEvent>) (in godot.macos.editor.dev.arm64) (viewport.cpp:2035)
[16] Viewport::push_input(Ref<InputEvent> const&, bool) (in godot.macos.editor.dev.arm64) (viewport.cpp:3228)
[17] Window::_window_input(Ref<InputEvent> const&) (in godot.macos.editor.dev.arm64) (window.cpp:1626)
[18] void call_with_variant_args_helper<Window, Ref<InputEvent> const&, 0ul>(Window*, void (Window::*)(Ref<InputEvent> const&), Variant const**, Callable::CallError&, IndexSequence<0ul>) (in godot.macos.editor.dev.arm64) (binder_common.h:304)
[19] void call_with_variant_args<Window, Ref<InputEvent> const&>(Window*, void (Window::*)(Ref<InputEvent> const&), Variant const**, int, Callable::CallError&) (in godot.macos.editor.dev.arm64) (binder_common.h:419)
[20] CallableCustomMethodPointer<Window, Ref<InputEvent> const&>::call(Variant const**, int, Variant&, Callable::CallError&) const (in godot.macos.editor.dev.arm64) (callable_method_pointer.h:104)
[21] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (in godot.macos.editor.dev.arm64) (callable.cpp:58)
[22] Variant Callable::call<Ref<InputEvent>>(Ref<InputEvent>) const (in godot.macos.editor.dev.arm64) (variant.h:863)
[23] DisplayServerMacOS::_dispatch_input_event(Ref<InputEvent> const&) (in godot.macos.editor.dev.arm64) (display_server_macos.mm:382)
[24] DisplayServerMacOS::_dispatch_input_events(Ref<InputEvent> const&) (in godot.macos.editor.dev.arm64) (display_server_macos.mm:354)
[25] Input::_parse_input_event_impl(Ref<InputEvent> const&, bool) (in godot.macos.editor.dev.arm64) (input.cpp:772)
[26] Input::flush_buffered_events() (in godot.macos.editor.dev.arm64) (input.cpp:1043)
[27] DisplayServerMacOS::process_events() (in godot.macos.editor.dev.arm64) (display_server_macos.mm:3007)
[28] OS_MacOS::run() (in godot.macos.editor.dev.arm64) (os_macos.mm:774)
[29] main (in godot.macos.editor.dev.arm64) (godot_main_macos.mm:84)
[30] 30 dyld 0x00000001830ae0e0 start + 2360
-- END OF BACKTRACE --
The stack isn’t in FBXDocument, so it might be in editor drag and drop?
The stack isn’t in FBXDocument, so it might be in editor drag and drop?
I did another experiment. Loaded the Synty FBX into Blender, exported it from Blender as glTF. Loaded the glTF into a Godot project. Dragged it into the 3D editor. Boom, identical stack trace. Tried the same with Godot 4.2.1 and it worked fine.
importtest.zip I reproduced a similar error using blender. Godot v4.3.dev5 - Windows Blender 4.0.2
Step 1: Create a new Godot Project Step 2: Add folder called Blender Step 3: Create a default cube in blender and save the file in Godot project
[This workflow works] Step 4: Create a new scene in Godot Step 5: Save the scene <KEY> Step 6: Drag and drop the blender file into scene [Works]
[This workflow crashes] Step 4: Create a new scene in Godot Step 5: Drag and drop the blender file into the UNSAVED scene [crashes when mouse moves into the viewport]
Project attached 2.5MB
It appears to be a regression introduced by #89204.
It seems to only crash when the scene root does not exist.
https://github.com/godotengine/godot/blob/b2f425fe680d1ed5d5b5fa9ae289ae93fd294607/editor/plugins/canvas_item_editor_plugin.cpp#L5946-L5947
https://github.com/godotengine/godot/blob/b2f425fe680d1ed5d5b5fa9ae289ae93fd294607/editor/plugins/node_3d_editor_plugin.cpp#L4509-L4510