khairul169 / gdsqlite-native

SQLite module for Godot 3.x
MIT License
219 stars 41 forks source link

Crash on android when compiling on release with apk expansion on #44

Open puthre opened 4 years ago

puthre commented 4 years ago

Using the latest binaries from https://github.com/TGRCdev/gdsqlite-native/releases with Godot v3.2.1.stable.official db.open() crashes on android when compiled on release with apk expansion turned on.

I've attached a minimal reproduction project just open, set your release key, apk expansion salt and public key, export without debug, install on device, copy main.1.org.godotengine.androidobbgdn.obb to /sdcard/Android/obb/org.godotengine.androidobbgdn/

adb push main.1.org.godotengine.androidobbgdn.obb /sdcard/Android obb/org.godotengine.androidobbgdn

The app will crash on startup at db.open()

04-08 14:01:17.628  9765  9765 F DEBUG   : 
04-08 14:01:17.628  9765  9765 F DEBUG   : backtrace:
04-08 14:01:17.628  9765  9765 F DEBUG   :       #00 pc 000000000109dce8  /data/app/org.godotengine.androidobbgdn-1fHTfHNQvrpE_YbU1-2Ntg==/lib/arm64/libgodot_android.so
04-08 14:01:17.628  9765  9765 F DEBUG   :       #01 pc 0000000000307840  /data/app/org.godotengine.androidobbgdn-1fHTfHNQvrpE_YbU1-2Ntg==/lib/arm64/libgodot_android.so
04-08 14:01:17.628  9765  9765 F DEBUG   :       #02 pc 00000000002e64f8  /data/app/org.godotengine.androidobbgdn-1fHTfHNQvrpE_YbU1-2Ntg==/lib/arm64/libgodot_android.so
04-08 14:01:17.628  9765  9765 F DEBUG   :       #03 pc 00000000006bd6dc  /data/app/org.godotengine.androidobbgdn-1fHTfHNQvrpE_YbU1-2Ntg==/lib/arm64/libgodot_android.so
04-08 14:01:17.628  9765  9765 F DEBUG   :       #04 pc 00000000009fbcec  /data/app/org.godotengine.androidobbgdn-1fHTfHNQvrpE_YbU1-2Ntg==/lib/arm64/libgodot_android.so
04-08 14:01:17.628  9765  9765 F DEBUG   :       #05 pc 000000000101d040  /data/app/org.godotengine.androidobbgdn-1fHTfHNQvrpE_YbU1-2Ntg==/lib/arm64/libgodot_android.so
04-08 14:01:17.628  9765  9765 F DEBUG   :       #06 pc 00000000006be924  /data/app/org.godotengine.androidobbgdn-1fHTfHNQvrpE_YbU1-2Ntg==/lib/arm64/libgodot_android.so
04-08 14:01:17.628  9765  9765 F DEBUG   :       #07 pc 00000000006be8d4  /data/app/org.godotengine.androidobbgdn-1fHTfHNQvrpE_YbU1-2Ntg==/lib/arm64/libgodot_android.so
04-08 14:01:17.628  9765  9765 F DEBUG   :       #08 pc 00000000006c29a4  /data/app/org.godotengine.androidobbgdn-1fHTfHNQvrpE_YbU1-2Ntg==/lib/arm64/libgodot_android.so
04-08 14:01:17.628  9765  9765 F DEBUG   :       #09 pc 00000000006db140  /data/app/org.godotengine.androidobbgdn-1fHTfHNQvrpE_YbU1-2Ntg==/lib/arm64/libgodot_android.so
04-08 14:01:17.628  9765  9765 F DEBUG   :       #10 pc 0000000000153684  /data/app/org.godotengine.androidobbgdn-1fHTfHNQvrpE_YbU1-2Ntg==/lib/arm64/libgodot_android.so (Java_org_godotengine_godot_GodotLib_step+80)
04-08 14:01:17.628  9765  9765 F DEBUG   :       #11 pc 00000000000061b0  /data/app/org.godotengine.androidobbgdn-1fHTfHNQvrpE_YbU1-2Ntg==/oat/arm64/base.odex (art_jni_trampoline+144)
04-08 14:01:17.628  9765  9765 F DEBUG   :       #12 pc 00000000001375b8  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.629  9765  9765 F DEBUG   :       #13 pc 00000000001460cc  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+276) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.629  9765  9765 F DEBUG   :       #14 pc 00000000002e3be8  /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.629  9765  9765 F DEBUG   :       #15 pc 00000000002dec74  /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+900) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.629  9765  9765 F DEBUG   :       #16 pc 00000000005a5340  /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+368) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.629  9765  9765 F DEBUG   :       #17 pc 0000000000131994  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.629  9765  9765 F DEBUG   :       #18 pc 0000000000078934  /data/app/org.godotengine.androidobbgdn-1fHTfHNQvrpE_YbU1-2Ntg==/oat/arm64/base.vdex (org.godotengine.godot.GodotRenderer.onDrawFrame+20)
04-08 14:01:17.629  9765  9765 F DEBUG   :       #19 pc 00000000005a429c  /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1740) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.629  9765  9765 F DEBUG   :       #20 pc 0000000000131a14  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.629  9765  9765 F DEBUG   :       #21 pc 0000000000330152  /system/framework/framework.jar (android.opengl.GLSurfaceView$GLThread.guardedRun+1086)
04-08 14:01:17.629  9765  9765 F DEBUG   :       #22 pc 00000000005a4e38  /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+1168) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.629  9765  9765 F DEBUG   :       #23 pc 0000000000131914  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.629  9765  9765 F DEBUG   :       #24 pc 000000000033074c  /system/framework/framework.jar (android.opengl.GLSurfaceView$GLThread.run+48)
04-08 14:01:17.629  9765  9765 F DEBUG   :       #25 pc 00000000002b4518  /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.13687477141160745009+240) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.629  9765  9765 F DEBUG   :       #26 pc 0000000000593c38  /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1024) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.630  9765  9765 F DEBUG   :       #27 pc 0000000000140468  /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.630  9765  9765 F DEBUG   :       #28 pc 0000000000137334  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.630  9765  9765 F DEBUG   :       #29 pc 00000000001460ac  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.630  9765  9765 F DEBUG   :       #30 pc 00000000004b2aa0  /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) (BuildId: fed08c41
d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.630  9765  9765 F DEBUG   :       #31 pc 00000000004b3b50  /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+416) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.630  9765  9765 F DEBUG   :       #32 pc 00000000004f4600  /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1176) (BuildId: fed08c41d7c3e48aa1f57e5665ef3ddc)
04-08 14:01:17.630  9765  9765 F DEBUG   :       #33 pc 00000000000e3b14  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: 220051b49364b1c2da3adf10c30832cc)
04-08 14:01:17.630  9765  9765 F DEBUG   :       #34 pc 0000000000085330  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 220051b49364b1c2da3adf10c30832cc)

android-obb-gdn.tar.gz

puthre commented 4 years ago

Seems to me that this is a godot issue as I reproduced it with other test gdnative library. I've opened a godot issue - https://github.com/godotengine/godot/issues/37695