Open derekdai opened 3 years ago
My understanding from #19686 and #32580 is that reloadable
must be disabled with a GDNative EditorPlugin or tool script. I just stumbled upon this open issue while investigating a similar issue I was experiencing.
If there is anything that will improve the situation, though, I'm all for it! For instance, a reloadable EditorPlugin could be removed from the scene tree when unloaded and fully initialized when reloaded.
Happen with Godot 4 beta 17 too. Debian 11 I use Git Plugin https://godotengine.org/asset-library/asset/1581 and when I remove it from file tab godot close aromatically without errors
Godot version: 3.2 ~ 3.3.rc.custom_build.6da21f472
OS/device including version:
Issue description: Unload and reload GDNative EditorPlugin can crashes Godot editor.
The crash occurs if EditorPlugin with
reloadable=on
, any activity which trigger plugin unloading may leave some sort of invalid references (through pointer) owned by unloaded plugin in Godot editor. If editor access any of these resources, segmentation fault.https://github.com/godotengine/godot-cpp/issues/535
I also found that the
handle
pass intogdotot_nativescript_init
andgodot_nativescript_terminate
are different. Since there are not much document about the interface of GDNative, I'm not sure it is ok or not.Steps to reproduce:
reloadable=on
in.gdnlib
The step 6 can replace with exit from Godot editor, it will terminated with segmentation fault.
Minimal reproduction project: Use
cpp/simple
project of godot-cpp as base