-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
double free or corruption (!prev) error on exit (GDNative c++) #47607
Comments
Probably caused by #46844, CC @geekrelief @toasteater @Bromeon @godotengine/gdnative |
Just tried latest versions:
I can reproduce it with the for (Map<StringName, NativeScriptDesc>::Element *C = classes.front(); C; C = C->next()) {
// free property stuff first
for (OrderedHashMap<StringName, NativeScriptDesc::Property>::Element P = C->get().properties.front(); P; P = P.next()) {
if (P.get().getter.free_func)
P.get().getter.free_func(P.get().getter.method_data);
if (P.get().setter.free_func)
P.get().setter.free_func(P.get().setter.method_data);
} Unfortunately I wasn't able to set a breakpoint early enough to see where this comes from. If anyone knows how to launch an external process with debugger attached (not attach to existing one) using CLion, let me know 🙂 |
Not really. Stateless methods are ZSTs in Rust so |
Got the Debugger working (normal C++ project, select executable for a CMake run configuration). I can confirm that the [Edit] debug expression of interest: |
Hey guys, trying to help with debugging the issue, but I can't even get the godot-cpp sample https://github.com/BastiaanOlij/gdnative_cpp_example to compile on Windows. I get errors in
Not sure if it helps, but one thing I did notice was that the merge in #46844 removed the |
What statement exactly? I don't see any removal in https://github.com/godotengine/godot/pull/46844/files |
Co-authored-by: geekrelief <geekrelief@gmail.com>
Huh.. So sorry! I guess it must have been my fault. geekrelief@410ae52 |
Co-authored-by: geekrelief <geekrelief@gmail.com>
Thanks @geekrelief! The changes in #47623 seem to fix the issue for godot-rust. @sash-rc Not sure if you would be willing to recompile Godot based on my PR and see if that fixes the issue on your system, too? |
@Bromeon, why not, just another 30 minutes in background terminal :-) Thanks. |
Not very familiar with issues workflow, but probably this one could be closed. |
We should leave this issue open until #47623 is merged 🙂 |
@sash-rc thank you very much for the invested time to check this, it's really appreciated! |
Co-authored-by: geekrelief <geekrelief@gmail.com> (cherry picked from commit 0fe851d)
Co-authored-by: geekrelief <geekrelief@gmail.com> (cherry picked from commit 0fe851d)
Godot version:
Godot Engine v3.3.rc7.official
OS/device including version:
Linux Ubuntu 20.04
Issue description:
GDnative C++ application runs fine, but throws error in console:
double free or corruption (!prev)
on normal application exit.Not visible when run from editor.
Steps to reproduce:
Any GDnative C++ project, start and exit.
Minimal reproduction project:
Any project, like this one https://github.com/BastiaanOlij/gdnative_cpp_example
Error happens somewhere after
Godot::gdnative_terminate(o);
The text was updated successfully, but these errors were encountered: