Repository: godot
Issue: Editor crashes when changing scenes after saving branch as scene and editing a child of the new scene
Labels: bug,topic:editor,confirmed,crash

**Godot version:** 3.3

**OS/device including version:**
Linux 5.10.34-1-MANJARO x86_64 GNU/Linux
Intel Core Processor i7-10750H
NVIDIA Quadro T1000 

**Issue description:**
I was working on a scene and decided to save a branch of that scene, i then entered that scene, made some changes, then changed back to the original scene. At which point godot froze and crashed.

It seems that when saving a branch of the scene and editing a child of the new scene then saving, then changing back and forth. That crashes the editor. I know it works if the child being edited is a Timer or HTTPRequest, and i assume it happens when editing other things too, but im not sure what.

The last output i got from godot was:

```
ERROR: get_global_class_base: Condition "!global_classes.has(p_class)" is true. Returned: String()
   At: core/script_language.cpp:244.
ERROR: get_global_class_base: Condition "!global_classes.has(p_class)" is true. Returned: String()
   At: core/script_language.cpp:244.
ERROR: _parse_connections: Condition "!common_parent" is true. Continuing.
   At: scene/resources/packed_scene.cpp:722.
ERROR: _parse_connections: Condition "!common_parent" is true. Continuing.
   At: scene/resources/packed_scene.cpp:722.
ERROR: _parse_connections: Condition "!common_parent" is true. Continuing.
   At: scene/resources/packed_scene.cpp:722.
ERROR: _parse_connections: Condition "!common_parent" is true. Continuing.
   At: scene/resources/packed_scene.cpp:722.
ERROR: _parse_connections: Condition "!common_parent" is true. Continuing.
   At: scene/resources/packed_scene.cpp:722.
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /usr/lib/libc.so.6(+0x3cf80) [0x7f09e8d1cf80] (??:0)
[2] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0xe56286] (??:0)
[3] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x24b2812] (??:0)
[4] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x24ad1e9] (??:0)
[5] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0xe4f7c6] (??:0)
[6] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x9de309] (??:0)
[7] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0xe62639] (??:0)
[8] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x1ce07fa] (??:0)
[9] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x3115ecd] (??:?)
[10] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x9a5e9d] (??:0)
[11] /usr/lib/libc.so.6(__libc_start_main+0xd5) [0x7f09e8d07b25] (??:0)
[12] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x9b471e] (??:0)
-- END OF BACKTRACE --
<REDACTED>@<REDACTED> ~/P/Godot> 
```
I've been able to reproduce it reliably with a minimal project, but i seem to get a slightly different error message:
```
<REDACTED>@<REDACTED> ~/P/Godot> handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /usr/lib/libc.so.6(+0x3cf80) [0x7f4741e8df80] (??:0)
[2] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x25d0d83] (??:0)
[3] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x257e5e6] (??:0)
[4] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x25803d0] (??:0)
[5] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x305b344] (??:?)
[6] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0xe4f7c6] (??:0)
[7] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0xdd71c3] (??:0)
[8] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0xdf0459] (??:0)
[9] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0xdf0690] (??:0)
[10] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x2501347] (??:0)
[11] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x305b344] (??:?)
[12] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0xe4f7c6] (??:0)
[13] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0xe54f96] (??:0)
[14] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0xe55e5c] (??:0)
[15] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x1b341f6] (??:0)
[16] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x1b34cdd] (??:0)
[17] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x2e5f28f] (??:?)
[18] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0xe4fb7e] (??:0)
[19] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0xe17bbd] (??:0)
[20] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x1ca9f05] (??:0)
[21] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x1cb33bd] (??:0)
[22] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x1cb4b75] (??:0)
[23] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x1cb4cc6] (??:0)
[24] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x2e5f28f] (??:?)
[25] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0xe4f7c6] (??:0)
[26] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0xe17c45] (??:0)
[27] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x1cdee67] (??:0)
[28] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x1ce1c70] (??:0)
[29] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x3122a23] (??:?)
[30] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x30c165c] (??:?)
[31] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x3125ec7] (??:?)
[32] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x9a5e8c] (??:0)
[33] /usr/lib/libc.so.6(__libc_start_main+0xd5) [0x7f4741e78b25] (??:0)
[34] /home/<REDACTED>/Programs/Godot/Godot_v3.3-stable_x11.64() [0x9b471e] (??:0)
-- END OF BACKTRACE --
```

**Steps to reproduce:**
1. Open the project
2. Open Node.tscn
3. right click InnerNode and save branch as scene
4. click open InnerNode in editor
5. turn on one shot in Timer
6. save scene
7. change scene back to node
8. change scene back to innernode
9. crash

**Minimal reproduction project:**
[MinimalExample.zip](https://github.com/godotengine/godot/files/6495014/MinimalExample.zip)