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

Fix crash that occurs on termination of the Godot engine on Android #94923

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

m4gr3d
Copy link
Contributor

@m4gr3d m4gr3d commented Jul 29, 2024

This PR + #85955 should address the last of the crashes visible in the logs when the Godot engine is destroyed on Android.

09:30:58.768 libc                     A  FORTIFY: pthread_mutex_destroy called on a destroyed mutex (0xb4000078f6a41bc4)
09:30:58.768 libc                     A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 13049 (GLThread 524), pid 13006 (e.editor.v4.dev)
09:30:59.018 DEBUG                    A  Cmdline: org.godotengine.editor.v4.dev
09:30:59.018 DEBUG                    A  pid: 13006, tid: 13049, name: GLThread 524  >>> org.godotengine.editor.v4.dev <<<
09:30:59.018 DEBUG                    A        #04 pc 00000000000c339c  /data/app/~~Ec9iAIQ5fzLqEPPNImdlBQ==/org.godotengine.editor.v4.dev-SqKR3gzRh7N7i790JSQ_Zg==/lib/arm64/libc++_shared.so (std::__ndk1::mutex::~mutex()+12) (BuildId: d7ce478d849eba1d3e692ae740f6c04a08fb8fab)
09:30:59.018 DEBUG                    A        #05 pc 00000000046c70f4  /data/app/~~Ec9iAIQ5fzLqEPPNImdlBQ==/org.godotengine.editor.v4.dev-SqKR3gzRh7N7i790JSQ_Zg==/lib/arm64/libgodot_android.so (MutexImpl<std::__ndk1::mutex>::~MutexImpl()+20)
09:30:59.018 DEBUG                    A        #06 pc 00000000082d8a9c  /data/app/~~Ec9iAIQ5fzLqEPPNImdlBQ==/org.godotengine.editor.v4.dev-SqKR3gzRh7N7i790JSQ_Zg==/lib/arm64/libgodot_android.so (Object::~Object()+1252)
09:30:59.018 DEBUG                    A        #07 pc 0000000002f952f4  /data/app/~~Ec9iAIQ5fzLqEPPNImdlBQ==/org.godotengine.editor.v4.dev-SqKR3gzRh7N7i790JSQ_Zg==/lib/arm64/libgodot_android.so (void memdelete<JavaClassWrapper>(JavaClassWrapper*)+44)
09:30:59.018 DEBUG                    A        #08 pc 0000000002f92b6c  /data/app/~~Ec9iAIQ5fzLqEPPNImdlBQ==/org.godotengine.editor.v4.dev-SqKR3gzRh7N7i790JSQ_Zg==/lib/arm64/libgodot_android.so (_terminate(_JNIEnv*, bool)+84)
09:30:59.018 DEBUG                    A        #09 pc 0000000002f92b08  /data/app/~~Ec9iAIQ5fzLqEPPNImdlBQ==/org.godotengine.editor.v4.dev-SqKR3gzRh7N7i790JSQ_Zg==/lib/arm64/libgodot_android.so (Java_org_godotengine_godot_GodotLib_ondestroy+32)
09:30:59.018 DEBUG                    A        #15 pc 0000000000004ef4  [anon:dalvik-classes12.dex extracted in memory from /data/app/~~Ec9iAIQ5fzLqEPPNImdlBQ==/org.godotengine.editor.v4.dev-SqKR3gzRh7N7i790JSQ_Zg==/base.apk!classes12.dex] (org.godotengine.godot.gl.GodotRenderer.onRenderThreadExiting+0)
09:30:59.018 DEBUG                    A        #24 pc 0000000000003c94  [anon:dalvik-classes12.dex extracted in memory from /data/app/~~Ec9iAIQ5fzLqEPPNImdlBQ==/org.godotengine.editor.v4.dev-SqKR3gzRh7N7i790JSQ_Zg==/base.apk!classes12.dex] (org.godotengine.godot.gl.GLSurfaceView$GLThread.guardedRun+0)
09:30:59.018 DEBUG                    A        #29 pc 00000000000045a8  [anon:dalvik-classes12.dex extracted in memory from /data/app/~~Ec9iAIQ5fzLqEPPNImdlBQ==/org.godotengine.editor.v4.dev-SqKR3gzRh7N7i790JSQ_Zg==/base.apk!classes12.dex] (org.godotengine.godot.gl.GLSurfaceView$GLThread.run+0)

Those crashes have been ongoing for some time but were made more visible by #94661.

@m4gr3d m4gr3d added this to the 4.3 milestone Jul 29, 2024
@m4gr3d m4gr3d requested a review from a team as a code owner July 29, 2024 16:40
@m4gr3d m4gr3d changed the title Fix one crash that occurs on termination of the Godot engine on Android Fix crash that occurs on termination of the Godot engine on Android Jul 29, 2024
@akien-mga akien-mga merged commit 862d881 into godotengine:master Jul 30, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@m4gr3d m4gr3d deleted the fix_crash_on_android_terminate branch July 30, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants