Open 0x0ACB opened 2 years ago
More info here: https://github.com/godotengine/godot-cpp/issues/348#issuecomment-742084113 I'm curious if GDExtensions also have this. The likely do, since the technique used for wrapper classes didnt change AFAIK.
Note: C++ in general silently crashes for plenty other reasons, if you run it without a debugger. It ain't like GDScript where a debugger is always running in the editor. Using a debugger will almost never let crashes happen silently.
Godot version
Godot_v3.3.3-stable_win64
System information
Windows 10
Issue description
It is perfectly possible to compile a GDNative C++ class that does not define a
_init
method without any warnings or compile errors. However once the class gets instantiated like this:onready var test = preload("res://bin/test.gdns").new()
the game will just silently exit without any warnings, logs or errors to indicate a crash. The crash happens in this method in Object.cpp
where
___mb
is a nullptr resulting in an obvious nullptr exception that (without a debugger attached) gets silently discarded and crashes the engine.Steps to reproduce
Create GDNative class without
_init
method and then try to instantiate it.Minimal reproduction project
No response