godotengine / godotengine/godot-cpp
Using scons in release, crash when initializing gdextension.
- Dominant language
- C++
- Stars
- 2.7k
- Forks
- 809
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
### Godot version
4.5
### godot-cpp version
4.5
### System information
Windows 10
### Issue description
I used two compilers: msvc and llvm.
Build via CMake works.
Possibly related.
https://github.com/godotengine/godot/issues/64897
My comment there:
https://github.com/godotengine/godot/issues/64897#issuecomment-3340480432
### Steps to reproduce
```
scons platform=windows target=template_release
```
Even with an empty extension, where there is only an initialization function.
```
using namespace godot;
void initialize_gdextension_types(ModuleInitializationLevel p_level) {
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
return;
}
}
void uninitialize_gdextension_types(ModuleInitializationLevel p_level) {
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
return;
}
}
extern "C" {
// Initialization
GDExtensionBool GDE_EXPORT
resouls_library_init(GDExtensionInterfaceGetProcAddress p_get_proc_address,
GDExtensionClassLibraryPtr p_library,
GDExtensionInitialization *r_initialization) {
GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library,
r_initialization);
init_obj.register_initializer(initialize_gdextension_types);
init_obj.register_terminator(uninitialize_gdextension_types);
init_obj.set_minimum_library_initialization_level(
MODULE_INITIALIZATION_LEVEL_SCENE);
// There is a crash in this function.
GDExtensionBool r = init_obj.init();
return r;
}
}
```
### Minimal reproduction project
N/A
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.