Skip to content
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

Godot crashes with --gdnative-generate-json-api flag #48020

Closed
devolonter opened this issue Apr 19, 2021 · 3 comments · Fixed by #48081
Closed

Godot crashes with --gdnative-generate-json-api flag #48020

devolonter opened this issue Apr 19, 2021 · 3 comments · Fixed by #48081

Comments

@devolonter
Copy link
Contributor

devolonter commented Apr 19, 2021

Godot version:
3.3 RC9

OS/device including version:
OSX 11.2.3

Issue description:
When I try to run run godot --gdnative-generate-json-api api.json it outputs the following:

arguments
0: godot
1: --gdnative-generate-json-api
2: api.json

Godot Engine v3.3.rc9.official - https://godotengine.org
OpenGL ES 3.0 Renderer: AMD Radeon Pro 580X OpenGL Engine
OpenGL ES Batching: ON

Registered camera HD- FaceTime () with id 1 position 0 at index 0
libc++abi.dylib: terminating with uncaught exception of type std::__1::system_error: recursive_mutex lock failed: Invalid argument
Abort trap: 6

Steps to reproduce:
run godot --gdnative-generate-json-api api.json

@devolonter devolonter changed the title Godot crash woth --gdnative-generate-json-api seems doesn't work Godot crash with --gdnative-generate-json-api flag Apr 19, 2021
@devolonter devolonter changed the title Godot crash with --gdnative-generate-json-api flag Godot crashes with --gdnative-generate-json-api flag Apr 19, 2021
@akien-mga akien-mga added this to the 3.3 milestone Apr 19, 2021
@akien-mga
Copy link
Member

I can't seem to reproduce it on Linux, might be macOS-specific. CC @godotengine/macos @godotengine/gdnative. Possibly related to #45618.

@bruvzg
Copy link
Member

bruvzg commented Apr 22, 2021

I can confirm this, api.json is generated, crash is triggered by exit(0) call.

libsystem_kernel.dylib!__pthread_kill (Unknown Source:0)
libsystem_pthread.dylib!pthread_kill (Unknown Source:0)
libsystem_c.dylib!abort (Unknown Source:0)
libc++abi.dylib!abort_message (Unknown Source:0)
libc++abi.dylib!demangling_terminate_handler() (Unknown Source:0)
libobjc.A.dylib!_objc_terminate() (Unknown Source:0)
libc++abi.dylib!std::__terminate(void (*)()) (Unknown Source:0)
libc++abi.dylib!std::terminate() (Unknown Source:0)
godot.osx.tools.x86_64!__clang_call_terminate (Unknown Source:0)
godot.osx.tools.x86_64!StringName::~StringName() (core/string_name.cpp:418)
godot.osx.tools.x86_64!StringName::~StringName() (core/string_name.cpp:416)
godot.osx.tools.x86_64!_GlobalConstant::~_GlobalConstant() (core/global_constants.cpp:38)
godot.osx.tools.x86_64!_GlobalConstant::~_GlobalConstant() (core/global_constants.cpp:38)
godot.osx.tools.x86_64!CowData<_GlobalConstant>::_unref(void*) (core/cowdata.h:212)
godot.osx.tools.x86_64!CowData<_GlobalConstant>::~CowData() (core/cowdata.h:388)
godot.osx.tools.x86_64!CowData<_GlobalConstant>::~CowData() (core/cowdata.h:386)
godot.osx.tools.x86_64!Vector<_GlobalConstant>::~Vector() (core/vector.h:126)
godot.osx.tools.x86_64!Vector<_GlobalConstant>::~Vector() (core/vector.h:126)
libsystem_c.dylib!__cxa_finalize_ranges (Unknown Source:0)
libsystem_c.dylib!exit (Unknown Source:0)
godot.osx.tools.x86_64!NativeScriptLanguage::init() (modules/gdnative/nativescript/nativescript.cpp:1058)
godot.osx.tools.x86_64!ScriptServer::init_languages() (core/script_language.cpp:177)
godot.osx.tools.x86_64!Main::setup2(unsigned long long) (main/main.cpp:1466)
godot.osx.tools.x86_64!Main::setup(char const*, int, char**, bool) (main/main.cpp:1229)
godot.osx.tools.x86_64!main (platform/osx/godot_main_osx.mm:64)
libdyld.dylib!start (Unknown Source:0)
libdyld.dylib!start (Unknown Source:0)

@bruvzg
Copy link
Member

bruvzg commented Apr 22, 2021

Probably it should have Main::cleanup(true); call before calling exit(0);.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants