0
votes

I'm working on and Android game in Unity 2018.1.0f2. Some builds of the App lead to a crash. The log contains then the following:

05-20 18:52:17.993: A/libc(26270): Fatal signal 11 (SIGSEGV), code 2, fault addr 0xef97cffc in tid 26284 (UnityMain)
05-20 18:52:17.993: A/libc(26270): [ 05-20 18:52:17.993  3095: 3095 W/         ]
05-20 18:52:17.993: A/libc(26270): debuggerd: handling request: pid=26270 uid=10367 gid=10367 tid=26284
05-20 18:52:18.094: A/DEBUG(26286): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-20 18:52:18.094: A/DEBUG(26286): Build fingerprint: 'samsung/heroltexx/herolte:7.0/NRD90M/G930FXXS2DRDI:user/release-keys'
05-20 18:52:18.094: A/DEBUG(26286): Revision: '8'
05-20 18:52:18.094: A/DEBUG(26286): ABI: 'arm'
05-20 18:52:18.095: A/DEBUG(26286): pid: 26270, tid: 26284, name: UnityMain  >>> de.zoomapp.zoom <<<
05-20 18:52:18.095: A/DEBUG(26286): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xef97cffc
05-20 18:52:18.095: A/DEBUG(26286):     r0 e9c93908  r1 f0f805c0  r2 e42c70e0  r3 00000008
05-20 18:52:18.095: A/DEBUG(26286):     r4 00000000  r5 e42c70e0  r6 00000010  r7 00000008
05-20 18:52:18.095: A/DEBUG(26286):     r8 e42c7000  r9 e9c93908  sl f0f805c0  fp 00000000
05-20 18:52:18.095: A/DEBUG(26286):     ip f1200948  sp ef97d020  lr f11e6bc1  pc f11cbf00  cpsr 60070030
05-20 18:52:18.098: A/DEBUG(26286): backtrace:
05-20 18:52:18.098: A/DEBUG(26286):     #00 pc 00053f00  /system/lib/libc.so (arena_purge_to_limit+1151)
05-20 18:52:18.098: A/DEBUG(26286):     #01 pc 00064095  /system/lib/libc.so (imemalign+428)
05-20 18:52:18.098: A/DEBUG(26286):     #02 pc 0000002f  <unknown>
05-20 18:52:19.028: E/audit(4563): type=1701 audit(1526835139.011:7135): auid=4294967295 uid=10367 gid=10367 ses=4294967295 subj=u:r:untrusted_app:s0:c512,c768 pid=26284 comm="UnityMain" exe="/system/bin/app_process32" sig=11
05-20 18:52:19.054: E/lowmemorykiller(3180): Error writing /proc/26270/oom_score_adj; errno=22
05-20 18:52:19.059: E/InputDispatcher(4902): channel ~ Channel is unrecoverably broken and will be disposed!
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL

As I said, I don't get this problem every time, only in some builds. The crash occurs even before the Unity splash screen is shown. It seems like none of my scripts is called (not even Awake()) before it crashes. Also it only occured in the release build which I wanted to upload into the Google Play Store. This release build is splitted into APK and OBB file by Unity, so maybe there is some kind of problem? I don't know if there is much I can do to avoid this, as I don't see how my code or scene might lead to this error.

Maybe someone saw this kind of error before or even had some similiar problem and can give me a hint on how to fix this.

Thank you guys.

Regards, Michael

1

1 Answers

0
votes

Any crash inside malloc, realloc, free, or memalign is a 99.99% indication that you have heap corruption (which is the result of overflowing a heap-allocated buffer, freeing unallocated memory, freeing memory twice, etc. etc.)

I don't get this problem every time, only in some builds

Yes: these are all quite characteristic of heap corruption problems.

I don't see how my code or scene might lead to this error.

Unfortunately, heap corruption errors are often very hard to debug without tool support.

On Linux and Mac OSX, you could use valgrind or (better) Address Sanitizer. Looks like the Address Sanitizer is available on Android as well.