godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.81k stars 21.14k forks source link

Crashes on android reported in Google Play Console #43170

Open puthre opened 4 years ago

puthre commented 4 years ago

3.2.3-stable build by myself in order to also store the release binaries with debug info so I can use them later with ndk-stack

Samsung Galaxy A51 Android 10 (SDK 29)

This is the stack reported by google play console annotated with the function names with ndk-stack

********** Crash dump: **********
#00 0x00000000010c5d5c /data/app/com.viar.puzzle-DJKyN96QrTAHD3k8x3M14Q==/lib/arm64/libgodot_android.so
Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&)
??:0:0
#00 0x0000000000311784 /data/app/com.viar.puzzle-DJKyN96QrTAHD3k8x3M14Q==/lib/arm64/libgodot_android.so
GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*)
??:0:0
#00 0x0000000001045be0 /data/app/com.viar.puzzle-DJKyN96QrTAHD3k8x3M14Q==/lib/arm64/libgodot_android.so
Object::call(StringName const&, Variant const**, int, Variant::CallError&)
??:0:0
#00 0x00000000010c5d08 /data/app/com.viar.puzzle-DJKyN96QrTAHD3k8x3M14Q==/lib/arm64/libgodot_android.so
Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&)
??:0:0
#00 0x00000000003115f0 /data/app/com.viar.puzzle-DJKyN96QrTAHD3k8x3M14Q==/lib/arm64/libgodot_android.so
GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*)
??:0:0
#00 0x00000000002efe4c /data/app/com.viar.puzzle-DJKyN96QrTAHD3k8x3M14Q==/lib/arm64/libgodot_android.so
GDScriptInstance::call_multilevel(StringName const&, Variant const**, int)
??:0:0
#00 0x00000000006d10c4 /data/app/com.viar.puzzle-DJKyN96QrTAHD3k8x3M14Q==/lib/arm64/libgodot_android.so
Node::_notification(int)
??:0:0
#00 0x0000000000a13594 /data/app/com.viar.puzzle-DJKyN96QrTAHD3k8x3M14Q==/lib/arm64/libgodot_android.so
Node2D::_notificationv(int, bool)
??:0:0
#00 0x00000000010441ac /data/app/com.viar.puzzle-DJKyN96QrTAHD3k8x3M14Q==/lib/arm64/libgodot_android.so
Object::notification(int, bool)
??:0:0
#00 0x00000000006ef4f8 /data/app/com.viar.puzzle-DJKyN96QrTAHD3k8x3M14Q==/lib/arm64/libgodot_android.so
SceneTree::_notify_group_pause(StringName const&, int)
??:0:0
#00 0x00000000006ef9c4 /data/app/com.viar.puzzle-DJKyN96QrTAHD3k8x3M14Q==/lib/arm64/libgodot_android.so
SceneTree::idle(float)
??:0:0
#00 0x0000000000183a7c /data/app/com.viar.puzzle-DJKyN96QrTAHD3k8x3M14Q==/lib/arm64/libgodot_android.so
Main::iteration()
??:0:0
#00 0x00000000001554b4 /data/app/com.viar.puzzle-DJKyN96QrTAHD3k8x3M14Q==/lib/arm64/libgodot_android.so (Java_org_godotengine_godot_GodotLib_step+184)
                                                                                                         Java_org_godotengine_godot_GodotLib_step
                                                                                                         ??:0:0
#00 0x000000000000f1b0 /data/app/com.viar.puzzle-DJKyN96QrTAHD3k8x3M14Q==/oat/arm64/base.odex (art_jni_trampoline+144)
#00 0x0000000002002818 /memfd:/jit-cache (org.godotengine.godot.GodotRenderer.onDrawFrame+88)
#00 0x0000000002003a48 /memfd:/jit-cache (android.opengl.GLSurfaceView$GLThread.guardedRun+3976)
#00 0x000000000013763c /apex/com.android.runtime/lib64/libart.so (art_quick_osr_stub+60)
#00 0x0000000000334ba0 /apex/com.android.runtime/lib64/libart.so (art::jit::Jit::MaybeDoOnStackReplacement(art::Thread*, art::ArtMethod*, unsigned int, int, art::JValue*)+1660)
#00 0x00000000005a4ab8 /apex/com.android.runtime/lib64/libart.so (MterpMaybeDoOnStackReplacement+212)
#00 0x0000000000136350 /apex/com.android.runtime/lib64/libart.so (MterpHelpers+240)
#00 0x000000000032b3b2 /system/framework/framework.jar (android.opengl.GLSurfaceView$GLThread.guardedRun+682)
#00 0x000000000059c26c /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+1168)
#00 0x0000000000131914 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20)
#00 0x000000000032bb40 /system/framework/framework.jar (android.opengl.GLSurfaceView$GLThread.run+48)
#00 0x00000000002b13ec /apex/com.android.runtime/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.3170827901220230103)+240)
#00 0x000000000058b1d4 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1012)
#00 0x0000000000140468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88)
#00 0x0000000000137334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548)
#00 0x000000000014606c /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244)
#00 0x00000000004ab214 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#00 0x00000000004ac2a8 /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+416)
#00 0x00000000004ec5ec /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1176)
#00 0x00000000000e28d0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
#00 0x000000000008503c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

I have no idea where to go from here.

Calinou commented 4 years ago

Unfortunately, without access to the project, such backtraces are useless to us :slightly_frowning_face:

There are many other application crashes already reported, but nobody knows how to solve them.

puthre commented 4 years ago

@Calinou Well, I can give access to the project if needed but I'm more interested in what would be the way to solve it if you have access to the project.

puthre commented 4 years ago

Here is another one I just got, which is similar but not the same:

********** Crash dump: **********
#00 0x0000000001343b44 /data/app/com.viar.puzzle-Cs_H9TOhMDuoZ1VIWAAUmA==/lib/arm/libgodot_android.so
Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&)
??:0:0
#00 0x000000000029be04 /data/app/com.viar.puzzle-Cs_H9TOhMDuoZ1VIWAAUmA==/lib/arm/libgodot_android.so
GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*)
??:0:0
#00 0x00000000002730d0 /data/app/com.viar.puzzle-Cs_H9TOhMDuoZ1VIWAAUmA==/lib/arm/libgodot_android.so
GDScriptInstance::call(StringName const&, Variant const**, int, Variant::CallError&)
??:0:0
#00 0x00000000012a53c4 /data/app/com.viar.puzzle-Cs_H9TOhMDuoZ1VIWAAUmA==/lib/arm/libgodot_android.so
Object::call(StringName const&, Variant const**, int, Variant::CallError&)
??:0:0
#00 0x0000000001343af4 /data/app/com.viar.puzzle-Cs_H9TOhMDuoZ1VIWAAUmA==/lib/arm/libgodot_android.so
Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&)
??:0:0
#00 0x000000000029bc18 /data/app/com.viar.puzzle-Cs_H9TOhMDuoZ1VIWAAUmA==/lib/arm/libgodot_android.so
GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*)
??:0:0
#00 0x00000000002730d0 /data/app/com.viar.puzzle-Cs_H9TOhMDuoZ1VIWAAUmA==/lib/arm/libgodot_android.so
GDScriptInstance::call(StringName const&, Variant const**, int, Variant::CallError&)
??:0:0
#00 0x00000000012a53c4 /data/app/com.viar.puzzle-Cs_H9TOhMDuoZ1VIWAAUmA==/lib/arm/libgodot_android.so
Object::call(StringName const&, Variant const**, int, Variant::CallError&)
??:0:0
#00 0x000000000129d2cc /data/app/com.viar.puzzle-Cs_H9TOhMDuoZ1VIWAAUmA==/lib/arm/libgodot_android.so
MessageQueue::_call_function(Object*, StringName const&, Variant const*, int, bool)
??:0:0
#00 0x000000000129d5c0 /data/app/com.viar.puzzle-Cs_H9TOhMDuoZ1VIWAAUmA==/lib/arm/libgodot_android.so
MessageQueue::flush()
??:0:0
#00 0x0000000000736154 /data/app/com.viar.puzzle-Cs_H9TOhMDuoZ1VIWAAUmA==/lib/arm/libgodot_android.so
SceneTree::iteration(float)
??:0:0
#00 0x00000000000bc930 /data/app/com.viar.puzzle-Cs_H9TOhMDuoZ1VIWAAUmA==/lib/arm/libgodot_android.so
Main::iteration()
??:0:0
#00 0x0000000000084110 /data/app/com.viar.puzzle-Cs_H9TOhMDuoZ1VIWAAUmA==/lib/arm/libgodot_android.so (Java_org_godotengine_godot_GodotLib_step+228)
                                                                                                       Java_org_godotengine_godot_GodotLib_step
                                                                                                       ??:0:0
#00 0x000000000000f117 /data/app/com.viar.puzzle-Cs_H9TOhMDuoZ1VIWAAUmA==/oat/arm/base.odex (art_jni_trampoline+94)
#00 0x0000000002002555 /memfd:/jit-cache (org.godotengine.godot.GodotRenderer.onDrawFrame+84)
#00 0x00000000000d7bc5 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68)
#00 0x000000000042e9d7 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+250)
#00 0x00000000000dffb7 /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+174)
#00 0x0000000000210b21 /apex/com.android.runtime/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+280)
#00 0x000000000020c463 /apex/com.android.runtime/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+774)
#00 0x00000000004250e1 /apex/com.android.runtime/lib/libart.so (MterpInvokeInterface+736)
#00 0x00000000000d2a14 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_interface+20)
#00 0x000000000032ad3e /system/framework/framework.jar (android.opengl.GLSurfaceView$GLThread.guardedRun+1086)
#00 0x0000000000425d69 /apex/com.android.runtime/lib/libart.so (MterpInvokeDirect+980)
#00 0x00000000000d2914 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_direct+20)
#00 0x000000000032b338 /system/framework/framework.jar (android.opengl.GLSurfaceView$GLThread.run+48)
#00 0x00000000001ec39d /apex/com.android.runtime/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1730051926631533950)+192)
#00 0x00000000001f0b81 /apex/com.android.runtime/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+124)
#00 0x0000000000418549 /apex/com.android.runtime/lib/libart.so (artQuickToInterpreterBridge+808)
#00 0x00000000000dc5a1 /apex/com.android.runtime/lib/libart.so (art_quick_to_interpreter_bridge+32)
#00 0x00000000000d7bc5 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68)
#00 0x000000000042e9d7 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+250)
#00 0x00000000000dffb7 /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+174)
#00 0x00000000003704ef /apex/com.android.runtime/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+54)
#00 0x00000000003711e1 /apex/com.android.runtime/lib/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+304)
#00 0x00000000003a2177 /apex/com.android.runtime/lib/libart.so (art::Thread::CreateCallback(void*)+978)
#00 0x00000000000a75b3 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20)
#00 0x0000000000061b33 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30)

What could be the trigger for the Variant::call_ptr function to crash? Can it be a concurrency issue where an object was somehow removed from another thread and the main thread tries to call a function on it?

DrMoriarty commented 4 years ago

@puthre Hello! I have very similar crash logs in google play console, also for 3.2.3-stable. All of them for android 10 and for samsung galaxies. I tried to test on available devices and can not get the crashes. I think, that this is a vendor dependent issue so somebody need to test with the same device to discover the root of problem.