godotengine / godot

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

Editor crashes when swapping scene #54461

Closed MatteoPiovanelli-Laser closed 1 year ago

MatteoPiovanelli-Laser commented 3 years ago

Godot version

master d6f972fad45d28222b1437a047241dd74f0d5b90

System information

Windows 10

Issue description

Editor crashed while debugging a scene upon attempting to open a different scene in the editor.

The scene I was opening contained an instance of the scene I was debugging, but that doesn't seem to be a sufficient condition for this.

Backtrace:

[0] List<Object::Connection,DefaultAllocator>::erase (D:\Godot\Sources\godot\core\templates\list.h:428)
[1] Object::~Object (D:\Godot\Sources\godot\core\object\object.cpp:1879)
[2] Node::~Node (D:\Godot\Sources\godot\scene\main\node.cpp:2884)
[3] CanvasItem::~CanvasItem (D:\Godot\Sources\godot\scene\main\canvas_item.cpp:1154)
[4] Node2D::~Node2D
[5] Path2D::~Path2D
[6] Path2D::`scalar deleting destructor'
[7] memdelete<Node> (D:\Godot\Sources\godot\core\os\memory.h:111)
[8] Node::_notification (D:\Godot\Sources\godot\scene\main\node.cpp:170)
[9] Node::_notificationv (D:\Godot\Sources\godot\scene\main\node.h:48)
[10] CanvasItem::_notificationv (D:\Godot\Sources\godot\scene\main\canvas_item.h:47)
[11] Node2D::_notificationv (D:\Godot\Sources\godot\scene\2d\node_2d.h:37)
[12] Object::notification (D:\Godot\Sources\godot\core\object\object.cpp:843)
[13] Object::_predelete (D:\Godot\Sources\godot\core\object\object.cpp:355)
[14] predelete_handler (D:\Godot\Sources\godot\core\object\object.cpp:1906)
[15] memdelete<Node> (D:\Godot\Sources\godot\core\os\memory.h:104)
[16] EditorData::check_and_update_scene (D:\Godot\Sources\godot\editor\editor_data.cpp:649)
[17] EditorNode::set_current_scene (D:\Godot\Sources\godot\editor\editor_node.cpp:3448)
[18] call_with_variant_args_helper<EditorNode,int,0> (D:\Godot\Sources\godot\core\variant\binder_common.h:228)
[19] call_with_variant_args_dv<EditorNode,int> (D:\Godot\Sources\godot\core\variant\binder_common.h:371)
[20] MethodBindT<EditorNode,int>::call (D:\Godot\Sources\godot\core\object\method_bind.h:282)
[21] Object::call (D:\Godot\Sources\godot\core\object\object.cpp:832)
[22] UndoRedo::_process_operation_list (D:\Godot\Sources\godot\core\object\undo_redo.cpp:341)
[23] UndoRedo::_redo (D:\Godot\Sources\godot\core\object\undo_redo.cpp:72)
[24] UndoRedo::commit_action (D:\Godot\Sources\godot\core\object\undo_redo.cpp:309)
[25] EditorNode::_scene_tab_changed (D:\Godot\Sources\godot\editor\editor_node.cpp:5097)
[26] EditorNode::load_scene (D:\Godot\Sources\godot\editor\editor_node.cpp:3525)
[27] EditorNode::open_request (D:\Godot\Sources\godot\editor\editor_node.cpp:3676)
[28] FileSystemDock::_select_file (D:\Godot\Sources\godot\editor\filesystem_dock.cpp:982)
[29] FileSystemDock::_tree_activate_file (D:\Godot\Sources\godot\editor\filesystem_dock.cpp:1000)
[30] call_with_variant_args_helper<FileSystemDock> (D:\Godot\Sources\godot\core\variant\binder_common.h:228)
[31] call_with_variant_args<FileSystemDock> (D:\Godot\Sources\godot\core\variant\binder_common.h:338)
[32] CallableCustomMethodPointer<FileSystemDock>::call (D:\Godot\Sources\godot\core\object\callable_method_pointer.h:97)
[33] Callable::call (D:\Godot\Sources\godot\core\variant\callable.cpp:51)
[34] Object::emit_signal (D:\Godot\Sources\godot\core\object\object.cpp:1100)
[35] Object::emit_signal (D:\Godot\Sources\godot\core\object\object.cpp:1155)
[36] Tree::gui_input (D:\Godot\Sources\godot\scene\gui\tree.cpp:3363)
[37] Control::_call_gui_input (D:\Godot\Sources\godot\scene\gui\control.cpp:823)
[38] Viewport::_gui_call_input (D:\Godot\Sources\godot\scene\main\viewport.cpp:1266)
[39] Viewport::_gui_input_event (D:\Godot\Sources\godot\scene\main\viewport.cpp:1498)
[40] Viewport::push_input (D:\Godot\Sources\godot\scene\main\viewport.cpp:2681)
[41] Window::_window_input (D:\Godot\Sources\godot\scene\main\window.cpp:920)
[42] call_with_variant_args_helper<Window,Ref<InputEvent> const &,0> (D:\Godot\Sources\godot\core\variant\binder_common.h:223)
[43] call_with_variant_args<Window,Ref<InputEvent> const &> (D:\Godot\Sources\godot\core\variant\binder_common.h:338)
[44] CallableCustomMethodPointer<Window,Ref<InputEvent> const &>::call (D:\Godot\Sources\godot\core\object\callable_method_pointer.h:97)
[45] Callable::call (D:\Godot\Sources\godot\core\variant\callable.cpp:51)
[46] DisplayServerWindows::_dispatch_input_event (D:\Godot\Sources\godot\platform\windows\display_server_windows.cpp:1850)
[47] DisplayServerWindows::_dispatch_input_events (D:\Godot\Sources\godot\platform\windows\display_server_windows.cpp:1824)
[48] Input::_parse_input_event_impl (D:\Godot\Sources\godot\core\input\input.cpp:621)
[49] Input::flush_buffered_events (D:\Godot\Sources\godot\core\input\input.cpp:841)
[50] DisplayServerWindows::process_events (D:\Godot\Sources\godot\platform\windows\display_server_windows.cpp:1575)
[51] OS_Windows::run (D:\Godot\Sources\godot\platform\windows\os_windows.cpp:643)
[52] widechar_main (D:\Godot\Sources\godot\platform\windows\godot_windows.cpp:163)
[53] _main (D:\Godot\Sources\godot\platform\windows\godot_windows.cpp:185)
[54] main (D:\Godot\Sources\godot\platform\windows\godot_windows.cpp:199)
[55] __scrt_common_main_seh (d:\a01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[56] BaseThreadInitThunk

Steps to reproduce

I am still trying to come up with a minimal project to reproduce this. In the mean time, I've uploaded the project where I'm seeing the issue: I was trying to follow this tutorial (https://www.gdquest.com/tutorial/godot/2d/tactical-rpg-movement/lessons/02.the-unit/) in Godot4.

It crashes when I:

Minimal reproduction project

start-project.zip

Calinou commented 3 years ago

Minimal reproduction project

Uploading start-project.zip…

Your MRP failed to upload (likely because you clicked somewhere else while it was still uploading). Try editing your post and uploading it again.

MatteoPiovanelli-Laser commented 3 years ago

thanks. I fixed my initial post

KoBeWi commented 2 years ago

Doesn't seem to crash in 3df8296 @MatteoPiovanelli-Laser Can you confirm if this is fixed?

YuriSizov commented 1 year ago

Please let us know if this is still reproduceable, so we can reopen it.