You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a CharString variable is declared in a C++ method called by GDScript, Godot will crash shortly after, possibly during, the return from the called C++ method.
I think this was crashing under linux as well, but most of my testing and debugging of this crash was performed under windoze.
I ran into the problem on another project where I was initially using a CharString to convert a Godot::String to a C/C++ string before I found String::alloc_c_string(). However, I left the CharString declaration in that code and was getting random crashes on the first call, unless I had a print() statement immediately before it in the calling GDScript code. Once I removed the declaration of the unused CharString variable, the crashes stopped.
To verify that removing the CharString variable declaration was really a fix, I added one to the GDNative C++ Example code. That code now crashes as well.
Steps to reproduce
Start with the GDExample class in the GDNative C++ Example tutorial. Declare a CharString variable in the _process() method:
Godot version
3.5.1.stable
System information
WIndows 10
Issue description
When a CharString variable is declared in a C++ method called by GDScript, Godot will crash shortly after, possibly during, the return from the called C++ method.
I think this was crashing under linux as well, but most of my testing and debugging of this crash was performed under windoze.
I ran into the problem on another project where I was initially using a CharString to convert a Godot::String to a C/C++ string before I found String::alloc_c_string(). However, I left the CharString declaration in that code and was getting random crashes on the first call, unless I had a print() statement immediately before it in the calling GDScript code. Once I removed the declaration of the unused CharString variable, the crashes stopped.
To verify that removing the CharString variable declaration was really a fix, I added one to the GDNative C++ Example code. That code now crashes as well.
Steps to reproduce
Start with the GDExample class in the GDNative C++ Example tutorial. Declare a CharString variable in the _process() method:
Build the code.
Run the main.tscn scene.
It should crash.
Minimal reproduction project
GDNative C++ Example
The text was updated successfully, but these errors were encountered: