Repository: godot
Issue: [Godot 4] Debug window silently crashes
Labels: bug,topic:gdscript,needs testing,crash

### Godot version

v4.0.beta8.official.45cac42c0

### System information

Manjaro Linux, GTX 1080, Nvidia 525.60.11-1 drivers

### Issue description

In the attached example: In client/client_player.gd when any function has a call to any inherited function without the `self.` prefix the debug window will crashed silently(unless you originally opened Godot in a terminal)

```
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:75)
ERROR: res://client/player/client_player.tscn:21 - Parse Error: [ext_resource] referenced non-loaded resource at: res://client/player/client_player.gd
   at: _parse_ext_resource (scene/resources/resource_format_text.cpp:178)
Running: /home/biom4st3r/scripts/bin/godot40b8 --path /home/biom4st3r/minimal%20test%20case --remote-debug tcp://127.0.0.1:6007 --editor-pid 41796 --position 2304,216 res://DummyMainScene.tscn
Godot Engine v4.0.beta8.official.45cac42c0 - https://godotengine.org
Vulkan API 1.3.224 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1080
 
Running: /home/biom4st3r/scripts/bin/godot40b8 --path /home/biom4st3r/minimal%20test%20case --remote-debug tcp://127.0.0.1:6007 --editor-pid 41796 --position 2304,216 res://DummyMainScene.tscn
Godot Engine v4.0.beta8.official.45cac42c0 - https://godotengine.org
Vulkan API 1.3.224 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1080
 
Running: /home/biom4st3r/scripts/bin/godot40b8 --path /home/biom4st3r/minimal%20test%20case --remote-debug tcp://127.0.0.1:6007 --editor-pid 41796 --position 2304,216 res://DummyMainScene.tscn
Godot Engine v4.0.beta8.official.45cac42c0 - https://godotengine.org
Vulkan API 1.3.224 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1080
 

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.beta8.official (45cac42c0b511672240c1fcccecfd3cc0580edcb)
Dumping the backtrace. Please include this when reporting the bug on: https://github.com/godotengine/godot/issues
[1] /usr/lib/libc.so.6(+0x38a00) [0x7fdd198d7a00] (??:0)
[2] /home/biom4st3r/scripts/bin/godot40b8() [0x434d7be] (??:0)
[3] /home/biom4st3r/scripts/bin/godot40b8() [0x47373c5] (??:0)
[4] /home/biom4st3r/scripts/bin/godot40b8() [0x1124100] (??:0)
[5] /home/biom4st3r/scripts/bin/godot40b8() [0x1147731] (??:0)
[6] /home/biom4st3r/scripts/bin/godot40b8() [0x11495b6] (??:0)
[7] /home/biom4st3r/scripts/bin/godot40b8() [0x110c9b1] (??:0)
[8] /home/biom4st3r/scripts/bin/godot40b8() [0x10f0818] (??:0)
[9] /home/biom4st3r/scripts/bin/godot40b8() [0x10f0a6e] (??:0)
[10] /home/biom4st3r/scripts/bin/godot40b8() [0x411c9a5] (??:0)
[11] /home/biom4st3r/scripts/bin/godot40b8() [0x411cfd9] (??:0)
[12] /home/biom4st3r/scripts/bin/godot40b8() [0x4137f1f] (??:0)
[13] /home/biom4st3r/scripts/bin/godot40b8() [0x33cfbec] (??:0)
[14] /home/biom4st3r/scripts/bin/godot40b8() [0x411c9a5] (??:0)
[15] /home/biom4st3r/scripts/bin/godot40b8() [0x4137aab] (??:0)
[16] /home/biom4st3r/scripts/bin/godot40b8() [0x3320143] (??:0)
[17] /home/biom4st3r/scripts/bin/godot40b8() [0x1119776] (??:0)
[18] /home/biom4st3r/scripts/bin/godot40b8() [0x10fc9ba] (??:0)
[19] /home/biom4st3r/scripts/bin/godot40b8() [0x1105639] (??:0)
[20] /home/biom4st3r/scripts/bin/godot40b8() [0x10f7f89] (??:0)
[21] /home/biom4st3r/scripts/bin/godot40b8() [0x10fd72d] (??:0)
[22] /home/biom4st3r/scripts/bin/godot40b8() [0x1109c4f] (??:0)
[23] /home/biom4st3r/scripts/bin/godot40b8() [0x110c623] (??:0)
[24] /home/biom4st3r/scripts/bin/godot40b8() [0x10f0818] (??:0)
[25] /home/biom4st3r/scripts/bin/godot40b8() [0x10f0a6e] (??:0)
[26] /home/biom4st3r/scripts/bin/godot40b8() [0x411c9a5] (??:0)
[27] /home/biom4st3r/scripts/bin/godot40b8() [0x411cfd9] (??:0)
[28] /home/biom4st3r/scripts/bin/godot40b8() [0x4137f1f] (??:0)
[29] /home/biom4st3r/scripts/bin/godot40b8() [0x33cfbec] (??:0)
[30] /home/biom4st3r/scripts/bin/godot40b8() [0x411c9a5] (??:0)
[31] /home/biom4st3r/scripts/bin/godot40b8() [0x4137aab] (??:0)
[32] /home/biom4st3r/scripts/bin/godot40b8() [0x3320143] (??:0)
[33] /home/biom4st3r/scripts/bin/godot40b8() [0x1119776] (??:0)
[34] /home/biom4st3r/scripts/bin/godot40b8() [0x10fc9ba] (??:0)
[35] /home/biom4st3r/scripts/bin/godot40b8() [0x1109c4f] (??:0)
[36] /home/biom4st3r/scripts/bin/godot40b8() [0x110c623] (??:0)
[37] /home/biom4st3r/scripts/bin/godot40b8() [0x10f0818] (??:0)
[38] /home/biom4st3r/scripts/bin/godot40b8() [0x10f0a6e] (??:0)
[39] /home/biom4st3r/scripts/bin/godot40b8() [0x411c9a5] (??:0)
[40] /home/biom4st3r/scripts/bin/godot40b8() [0x411cfd9] (??:0)
[41] /home/biom4st3r/scripts/bin/godot40b8() [0x4137f1f] (??:0)
[42] /home/biom4st3r/scripts/bin/godot40b8() [0x33cfbec] (??:0)
[43] /home/biom4st3r/scripts/bin/godot40b8() [0x411c9a5] (??:0)
[44] /home/biom4st3r/scripts/bin/godot40b8() [0x411cfd9] (??:0)
[45] /home/biom4st3r/scripts/bin/godot40b8() [0x4137f1f] (??:0)
[46] /home/biom4st3r/scripts/bin/godot40b8() [0xe3a4ae] (??:0)
[47] /home/biom4st3r/scripts/bin/godot40b8() [0xd9f102] (??:0)
[48] /usr/lib/libc.so.6(+0x23290) [0x7fdd198c2290] (??:0)
[49] /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7fdd198c234a] (??:0)
[50] /home/biom4st3r/scripts/bin/godot40b8() [0xdc095e] (??:0)
-- END OF BACKTRACE --
================================================================
```

### Steps to reproduce

1. Launch the supplied project
2. open the `client/client_player.tscn`
3. attach `client/client_player.gd` to the root node of `client_player.tscn`

Note: This must be done every time you reopen the project. For some reason `client_player.tscn` loses its script on every launch. If the script is attached in gdscript via `set_script` it doesn't crash.

4. Debug/Launch DummyMainScene


### Minimal reproduction project

This is a minimal test case.
In `player.gd`: if `var dummy` is removed or has it's type removed it doesn't crash.
In `client_player.gd`: if it doesn't extend `player.gd` it doesn't crash.
In `client_player.gd`: If it doesn't call an inherited function without `self.` it doesn't crash.
In `DummyMainScene`: if it doesn't preload both `player.tscn` and `client_player.tscn` it doesn't crash.

[minimal test case.zip](https://github.com/godotengine/godot/files/10247784/minimal.test.case.zip)