godotengine / godotengine/godot
GDExtension classes are reported as an empty string in the `--verbose` "Leaked instance:" output
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Tested in 4.6. Also happens in previous versions. Definitely not a regression.
### System information
Godot v4.6.stable - Debian GNU/Linux forky/sid forky on Wayland - X11 display driver, Single-window, 1 monitor - OpenGL 3 (Compatibility) - Mesa Intel(R) Iris(R) Xe Graphics (RPL-P) - 13th Gen Intel(R) Core(TM) i7-1360P (16 threads) - 15.31 GiB memory
### Issue description
When a gdextension class is leaked and you use `--verbose` to see what was leaked, instead of a class name and reference count, you get something like this, which isn't particularly helpful:
```log
Leaked instance: :9223379987644627892
Leaked instance: :9223379987795622837
Leaked instance: :9223379987745291190
Leaked instance: :9223380438884629431
Leaked instance: :9223380074483497912
Leaked instance: :9223380435713735609
Leaked instance: :9223380437206907834
Leaked instance: :9223379987376192443
Leaked instance: :9223380073476864956
Leaked instance: :9223380443297037245
Leaked instance: :9223380000277871550
Leaked instance: :9223380449034845119
Leaked instance: :9223379987426524096
```
This is because the gdextension is already unloaded by this point, so Godot doesn't know what the classes are named anymore.
### Steps to reproduce
1. Make a gdextension that registers at least one class
2. Leak instances of that class
3. Run the project with `--verbose`
### Minimal reproduction project (MRP)
N/A
Contributor guide
Assessment
This issue has not been assessed yet.