godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.28k stars 21.05k forks source link

Importing a scene twice can cause a crash #90859

Open fire opened 6 months ago

fire commented 6 months ago

Tested versions

System information

Mac Mini, Apple Silicon

Issue description

Crash.

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.dev.custom_build (d9b604a58b2fb101a339fb2a700acf7f71ce75c2)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] 1   libsystem_platform.dylib            0x000000019728b584 _sigtramp + 56
[2] Node::add_child(Node*, bool, Node::InternalMode) (in godot.macos.editor.double.arm64) (node.cpp:1573)
[3] Node::add_child(Node*, bool, Node::InternalMode) (in godot.macos.editor.double.arm64) (node.cpp:1573)
[4] EditorNode::reload_instances_with_path_in_edited_scenes(String const&) (in godot.macos.editor.double.arm64) (editor_node.cpp:5791)
[5] EditorNode::_resources_reimported(Vector<String> const&) (in godot.macos.editor.double.arm64) (editor_node.cpp:1049)
[6] void call_with_variant_args_helper<EditorNode, Vector<String> const&, 0ul>(EditorNode*, void (EditorNode::*)(Vector<String> const&), Variant const**, Callable::CallError&, IndexSequence<0ul>) (in godot.macos.editor.double.arm64) (binder_common.h:304)
[7] Object::emit_signalp(StringName const&, Variant const**, int) (in godot.macos.editor.double.arm64) (object.cpp:1202)
[8] EditorFileSystem::reimport_file_with_custom_parameters(String const&, String const&, HashMap<StringName, Variant, HashMapHasherDefault, HashMapComparatorDefault<StringName>, DefaultTypedAllocator<HashMapElement<StringName, Variant>>> const&) (in godot.macos.editor.double.arm64) (editor_file_system.cpp:2313)
[9] SceneImportSettingsDialog::_re_import() (in godot.macos.editor.double.arm64) (scene_import_settings.cpp:1232)
[10] Object::emit_signalp(StringName const&, Variant const**, int) (in godot.macos.editor.double.arm64) (object.cpp:1202)
[11] AcceptDialog::_ok_pressed() (in godot.macos.editor.double.arm64) (dialogs.cpp:123)
[12] Object::emit_signalp(StringName const&, Variant const**, int) (in godot.macos.editor.double.arm64) (object.cpp:1202)
[13] BaseButton::_pressed() (in godot.macos.editor.double.arm64) (base_button.cpp:138)
[14] BaseButton::on_action_event(Ref<InputEvent>) (in godot.macos.editor.double.arm64) (base_button.cpp:177)
[15] BaseButton::gui_input(Ref<InputEvent> const&) (in godot.macos.editor.double.arm64) (base_button.cpp:69)
[16] Control::_call_gui_input(Ref<InputEvent> const&) (in godot.macos.editor.double.arm64) (control.cpp:0)
[17] Viewport::_gui_call_input(Control*, Ref<InputEvent> const&) (in godot.macos.editor.double.arm64) (viewport.cpp:1538)
[18] Viewport::_gui_input_event(Ref<InputEvent>) (in godot.macos.editor.double.arm64) (viewport.cpp:1805)
[19] Viewport::push_input(Ref<InputEvent> const&, bool) (in godot.macos.editor.double.arm64) (viewport.cpp:3229)
[20] Window::_window_input(Ref<InputEvent> const&) (in godot.macos.editor.double.arm64) (window.cpp:0)
[21] 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.double.arm64) (binder_common.h:304)
[22] Variant Callable::call<Ref<InputEvent>>(Ref<InputEvent>) const (in godot.macos.editor.double.arm64) (variant.h:856)
[23] DisplayServerMacOS::_dispatch_input_event(Ref<InputEvent> const&) (in godot.macos.editor.double.arm64) (display_server_macos.mm:386)
[24] Input::_parse_input_event_impl(Ref<InputEvent> const&, bool) (in godot.macos.editor.double.arm64) (input.cpp:773)
[25] Input::flush_buffered_events() (in godot.macos.editor.double.arm64) (input.cpp:1044)
[26] DisplayServerMacOS::process_events() (in godot.macos.editor.double.arm64) (display_server_macos.mm:3025)
[27] OS_MacOS::run() (in godot.macos.editor.double.arm64) (os_macos.mm:776)
[28] main (in godot.macos.editor.double.arm64) (godot_main_macos.mm:89)
[29] 29  dyld                                0x0000000196ed20e0 start + 2360
-- END OF BACKTRACE --

Steps to reproduce

The bug is a bit hazy and hard to recreate.

  1. Import once in any way
  2. ???
  3. Reimport the scene
  4. it would crash

Minimal reproduction project (MRP)

I am having a hard time getting this to crash reliably.

ydeltastar commented 5 months ago

Looks similar to this crash: https://github.com/godotengine/godot/issues/91063