godotengine / godotengine/godot

Inspecting a scene's resource and closing the scene causes a segmentation fault

Open
#122,016 0 comments 0 reactions 0 assignees View on GitHub
bug crash topic:editor
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in 4.8.dev 159701651ad44335691dcbd632d8074307074c7b

### System information

Fedora Linux 43 (Workstation Edition), zink Vulkan 1.4(NVIDIA GeForce GTX 1650 SUPER (NVK TU116)), Wayland, 16.0 GiB RAM

### Issue description

This issue happens with PR #97127 MRP, when closing `cube.tscn` after opening `cube_integrity.tres` in the Inspector.

STACK TRACE
```
Object::derives_from<…> object.h:875
Object::cast_to<…> object.h:656
EditorNode::push_node_item editor_node.cpp:3057
SceneTreeDock::_push_item scene_tree_dock.cpp:1919
SceneTreeDock::_selection_changed scene_tree_dock.cpp:3038
call_with_variant_args_helper<…>(SceneTreeDock , void (SceneTreeDock::)(), const Variant **, Callable::CallError &, IndexSequence<…>) binder_common.h:58
call_with_variant_args<…> binder_common.h:172
CallableCustomMethodPointer::call callable_mp.h:103
Callable::callp callable.cpp:58
Object::emit_signalp object.cpp:1290
Object::emit_signal<…>(const StringName &) object.h:779
EditorSelection::_emit_change editor_data.cpp:1396
call_with_variant_args_helper<…>(EditorSelection , void (EditorSelection::)(), const Variant **, Callable::CallError &, IndexSequence<…>) binder_common.h:58
call_with_variant_args<…> binder_common.h:172
CallableCustomMethodPointer::call callable_mp.h:103
Callable::callp callable.cpp:58
CallQueue::_call_function message_queue.cpp:218
CallQueue::flush message_queue.cpp:266
SceneTree::process scene_tree.cpp:722
Main::iteration main.cpp:4958
OS_LinuxBSD::run os_linuxbsd.cpp:999
main godot_linuxbsd.cpp:122
```

https://github.com/user-attachments/assets/f209f2ac-12bc-4345-bcf8-64ea833f2ad7

### Steps to reproduce

- Download the MRP
- Open `cube.tscn`
- Click `cube_integrity.tres` on the File System in order to view it in the Inspector
- Close `cube.tscn`
- Segmentation fault.

### Minimal reproduction project (MRP)

Is the same MRP as the one in PR #97127

[load-external-resource-as-local.zip](https://github.com/user-attachments/files/30623118/load-external-resource-as-local.zip)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the crash with the attached load-external-resource-as-local.zip project, following the listed steps. Read the stack frames in editor_node.cpp, scene_tree_dock.cpp, and editor_data.cpp, beginning at EditorNode::push_node_item and the selection-change path. Done means closing cube.tscn after inspecting cube_integrity.tres no longer causes a segmentation fault.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.