RetroAchievements / rcheevos

Library to parse and evaluate achievements and leaderboards for RetroAchievements
MIT License
88 stars 34 forks source link

RetroAchievement related crashes on android #3

Closed andres-asm closed 5 years ago

andres-asm commented 6 years ago

Hey @leiradel I started testing RA with the new implementation and I found it quite crashy so far All these tests were on ARMv7e RA commit 4f2c108 https://github.com/libretro/RetroArch/commit/4f2c108088f8f2c62ed470331d239257d696e6d0

Example 1: Snes9x with Super Mario All-Stars

Crashes right after logging in

09-30 23:03:55.018  1795  1848 I RetroArch: [autoconf]: selected configuration: /storage/emulated/0/RetroArch/userdata/profiles/android/NVIDIA_SHIELD_Portable_X1_Custom.cfg
09-30 23:03:57.763  1795  1823 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 1823 (Thread-2)
09-30 23:03:57.763   234   234 W         : debuggerd: handling request: pid=1795 uid=10074 gid=10074 tid=1823
09-30 23:03:57.763  1861  1861 W debuggerd: type=1400 audit(0.0:774): avc: denied { search } for name="com.retroarch" dev="mmcblk0p29" ino=509467 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
09-30 23:03:57.801   317   455 W nvaudio_hw: UNDERRUN DETECTED for music-playback ret -1 avail 0
09-30 23:03:57.828  1861  1861 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-30 23:03:57.828  1861  1861 F DEBUG   : LineageOS Version: '14.1-20180328-NIGHTLY-foster'
09-30 23:03:57.828  1861  1861 F DEBUG   : Build fingerprint: 'NVIDIA/loki_e_wifi/foster:7.0/NRD90M/2427173_1038.2788:user/release-keys'
09-30 23:03:57.828  1861  1861 F DEBUG   : Revision: '0'
09-30 23:03:57.828  1861  1861 F DEBUG   : ABI: 'arm'
09-30 23:03:57.828  1861  1861 F DEBUG   : pid: 1795, tid: 1823, name: Thread-2  >>> com.retroarch <<<
09-30 23:03:57.828  1861  1861 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
09-30 23:03:57.828  1861  1861 F DEBUG   :     r0 00000000  r1 00000000  r2 66c6db00  r3 00007ff2
09-30 23:03:57.828  1861  1861 F DEBUG   :     r4 00000001  r5 00000005  r6 00000000  r7 520ba1b8
09-30 23:03:57.828  1861  1861 F DEBUG   :     r8 00000000  r9 00000000  sl 6605084c  fp 4af832d0
09-30 23:03:57.828  1861  1861 F DEBUG   :     ip 6656b828  sp 4af832c8  lr 65e99898  pc 660508a4  cpsr 600e0010
09-30 23:03:57.832  1861  1861 F DEBUG   :
09-30 23:03:57.832  1861  1861 F DEBUG   : backtrace:
09-30 23:03:57.833  1861  1861 F DEBUG   :     #00 pc 0031d8a4  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so
09-30 23:03:57.833  1861  1861 F DEBUG   :     #01 pc 00167f44  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so (rc_evaluate_operand+344)
09-30 23:03:57.833  1861  1861 F DEBUG   :     #02 pc 00168364  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so
09-30 23:03:57.833  1861  1861 F DEBUG   :     #03 pc 0016961c  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so (rc_test_trigger+136)
09-30 23:03:57.833  1861  1861 F DEBUG   :     #04 pc 00162144  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so
09-30 23:03:57.833  1861  1861 F DEBUG   :     #05 pc 001618d4  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so (cheevos_test+24)
09-30 23:03:57.833  1861  1861 F DEBUG   :     #06 pc 00207438  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so (runloop_iterate+10968)
09-30 23:03:57.833  1861  1861 F DEBUG   :     #07 pc 002047ec  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so (rarch_main+296)
09-30 23:03:57.833  1861  1861 F DEBUG   :     #08 pc 00346044  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so
09-30 23:03:57.833  1861  1861 F DEBUG   :     #09 pc 0024ff70  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so
09-30 23:03:57.833  1861  1861 F DEBUG   :     #10 pc 00047bf3  /system/lib/libc.so (_ZL15__pthread_startPv+22)
09-30 23:03:57.833  1861  1861 F DEBUG   :     #11 pc 00019f1d  /system/lib/libc.so (__start_thread+6)
09-30 23:03:57.860   317   455 W nvaudio_hw: UNDERRUN DETECTED for music-playback ret -1 avail 0
09-30 23:03:57.823  1861  1861 W debuggerd: type=1400 audit(0.0:775): avc: denied { search } for name="com.retroarch" dev="mmcblk0p29" ino=509467 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
09-30 23:03:58.041   699  1868 W ActivityManager:   Force finishing activity com.retroarch/.browser.retroactivity.RetroActivityFuture
09-30 23:03:58.044   699  1868 I WindowManager: setFocusedApp token: Token{da101d5 ActivityRecord{298e68c u0 com.awe.dev.pro.tv/.Launcher t1846}} requestedOrientation: 6
09-30 23:03:58.056  1554  1554 I CmaSystemUpdateService: ActiveReceiver: Intent { act=android.os.UpdateLock.UPDATE_LOCK_CHANGED flg=0x4000010 cmp=com.google.android.gms/.update.SystemUpdateServiceActiveReceiver (has extras) }
09-30 23:03:58.056  1554  1554 I CmaSystemUpdateService: receiver: Intent { act=android.os.UpdateLock.UPDATE_LOCK_CHANGED flg=0x4000
andres-asm commented 6 years ago

Example 2: Chrono Trigger: Same settings, same issue exactly

09-30 23:05:34.900  1975  1995 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 1995 (Thread-2)
09-30 23:05:34.900   234   234 W         : debuggerd: handling request: pid=1975 uid=10074 gid=10074 tid=1995
09-30 23:05:34.943   317   455 W nvaudio_hw: UNDERRUN DETECTED for music-playback ret -1 avail 0
09-30 23:05:34.913  2023  2023 W debuggerd: type=1400 audit(0.0:778): avc: denied { search } for name="com.retroarch" dev="mmcblk0p29" ino=509467 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
09-30 23:05:34.972  2023  2023 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-30 23:05:34.972  2023  2023 F DEBUG   : LineageOS Version: '14.1-20180328-NIGHTLY-foster'
09-30 23:05:34.973  2023  2023 F DEBUG   : Build fingerprint: 'NVIDIA/loki_e_wifi/foster:7.0/NRD90M/2427173_1038.2788:user/release-keys'
09-30 23:05:34.973  2023  2023 F DEBUG   : Revision: '0'
09-30 23:05:34.973  2023  2023 F DEBUG   : ABI: 'arm'
09-30 23:05:34.973  2023  2023 F DEBUG   : pid: 1975, tid: 1995, name: Thread-2  >>> com.retroarch <<<
09-30 23:05:34.973  2023  2023 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
09-30 23:05:34.973  2023  2023 F DEBUG   :     r0 00000000  r1 00000000  r2 5216dc00  r3 00007fe2
09-30 23:05:34.973  2023  2023 F DEBUG   :     r4 00000001  r5 00000005  r6 00000000  r7 674fd438
09-30 23:05:34.973  2023  2023 F DEBUG   :     r8 00000000  r9 00000000  sl 6605084c  fp 4aadc2d0
09-30 23:05:34.973  2023  2023 F DEBUG   :     ip 6656b828  sp 4aadc2c8  lr 65e99898  pc 660508a4  cpsr 600e0010
09-30 23:05:34.977  2023  2023 F DEBUG   :
09-30 23:05:34.977  2023  2023 F DEBUG   : backtrace:
09-30 23:05:34.977  2023  2023 F DEBUG   :     #00 pc 0031d8a4  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so
09-30 23:05:34.977  2023  2023 F DEBUG   :     #01 pc 00167f44  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so (rc_evaluate_operand+344)
09-30 23:05:34.977  2023  2023 F DEBUG   :     #02 pc 00168364  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so
09-30 23:05:34.977  2023  2023 F DEBUG   :     #03 pc 0016961c  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so (rc_test_trigger+136)
09-30 23:05:34.977  2023  2023 F DEBUG   :     #04 pc 00162144  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so
09-30 23:05:34.977  2023  2023 F DEBUG   :     #05 pc 001618d4  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so (cheevos_test+24)
09-30 23:05:34.977  2023  2023 F DEBUG   :     #06 pc 00207438  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so (runloop_iterate+10968)
09-30 23:05:34.978  2023  2023 F DEBUG   :     #07 pc 002047ec  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so (rarch_main+296)
09-30 23:05:34.978  2023  2023 F DEBUG   :     #08 pc 00346044  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so
09-30 23:05:34.978  2023  2023 F DEBUG   :     #09 pc 0024ff70  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so
09-30 23:05:34.978  2023  2023 F DEBUG   :     #10 pc 00047bf3  /system/lib/libc.so (_ZL15__pthread_startPv+22)
09-30 23:05:34.978  2023  2023 F DEBUG   :     #11 pc 00019f1d  /system/lib/libc.so (__start_thread+6)
09-30 23:05:34.973  2023  2023 W debuggerd: type=1400 audit(0.0:779): avc: denied { search } for name="com.retroarch" dev="mmcblk0p29" ino=509467 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
09-30 23:05:35.160   234   234 W         : debuggerd: resuming target 1975
andres-asm commented 6 years ago

Super Mario World Works, but it crashes when I enable leaderboards:

09-30 23:07:24.142   699   817 W HdmiCecController: Failed to send <Give Device Power Status> src: 4, dst: 0
09-30 23:07:25.090  2172  2193 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 2193 (Thread-2)
09-30 23:07:25.090   234   234 W         : debuggerd: handling request: pid=2172 uid=10074 gid=10074 tid=2193
09-30 23:07:25.083  2230  2230 W debuggerd: type=1400 audit(0.0:780): avc: denied { search } for name="com.retroarch" dev="mmcblk0p29" ino=509467 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
09-30 23:07:25.124   317   455 W nvaudio_hw: UNDERRUN DETECTED for music-playback ret -1 avail 0
09-30 23:07:25.151  2230  2230 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-30 23:07:25.151  2230  2230 F DEBUG   : LineageOS Version: '14.1-20180328-NIGHTLY-foster'
09-30 23:07:25.151  2230  2230 F DEBUG   : Build fingerprint: 'NVIDIA/loki_e_wifi/foster:7.0/NRD90M/2427173_1038.2788:user/release-keys'
09-30 23:07:25.151  2230  2230 F DEBUG   : Revision: '0'
09-30 23:07:25.151  2230  2230 F DEBUG   : ABI: 'arm'
09-30 23:07:25.152  2230  2230 F DEBUG   : pid: 2172, tid: 2193, name: Thread-2  >>> com.retroarch <<<
09-30 23:07:25.152  2230  2230 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
09-30 23:07:25.152  2230  2230 F DEBUG   :     r0 00000000  r1 00000000  r2 5216dc00  r3 0000608c
09-30 23:07:25.152  2230  2230 F DEBUG   :     r4 00000001  r5 00000005  r6 00000000  r7 4ac9f238
09-30 23:07:25.152  2230  2230 F DEBUG   :     r8 00000000  r9 00000000  sl 6605084c  fp 4b07e538
09-30 23:07:25.152  2230  2230 F DEBUG   :     ip 6656b828  sp 4b07e530  lr 65e99898  pc 660508a4  cpsr 600e0010
09-30 23:07:25.155  2230  2230 F DEBUG   :
09-30 23:07:25.155  2230  2230 F DEBUG   : backtrace:
09-30 23:07:25.155  2230  2230 F DEBUG   :     #00 pc 0031d8a4  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so
09-30 23:07:25.155  2230  2230 F DEBUG   :     #01 pc 00167f44  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so (rc_evaluate_operand+344)
09-30 23:07:25.155  2230  2230 F DEBUG   :     #02 pc 00168364  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so
09-30 23:07:25.155  2230  2230 F DEBUG   :     #03 pc 0016961c  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so (rc_test_trigger+136)
09-30 23:07:25.155  2230  2230 F DEBUG   :     #04 pc 00161b88  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so (cheevos_test+716)
09-30 23:07:25.155  2230  2230 F DEBUG   :     #05 pc 00207438  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so (runloop_iterate+10968)
09-30 23:07:25.156  2230  2230 F DEBUG   :     #06 pc 002047ec  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so (rarch_main+296)
09-30 23:07:25.156  2230  2230 F DEBUG   :     #07 pc 00346044  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so
09-30 23:07:25.156  2230  2230 F DEBUG   :     #08 pc 0024ff70  /data/app/com.retroarch-2/lib/arm/libretroarch-activity.so
09-30 23:07:25.156  2230  2230 F DEBUG   :     #09 pc 00047bf3  /system/lib/libc.so (_ZL15__pthread_startPv+22)
09-30 23:07:25.156  2230  2230 F DEBUG   :     #10 pc 00019f1d  /system/lib/libc.so (__start_thread+6)
09-30 23:07:25.346   317   455 W nvaudio_hw: UNDERRUN DETECTED for music-playback ret -1 avail 0
09-30 23:07:25.369   699  2236 W ActivityManager:   Force finishing activity com.retroarch/.browser.retroactivity.RetroActivityFuture
09-30 23:07:25.372   699  2236 I WindowManager: setFocusedApp token: Token{da101d5 Activity
leiradel commented 6 years ago

Is it possible to get a stack trace with addr2line?

andres-asm commented 6 years ago

Not sure I really don't know how to debug on Android, but just to clarify.

Armv7e works with crashes Armv8a (AARCH64) never loads, leads to a lockup in close content

On Mon, Oct 1, 2018, 1:58 AM Andre Leiradella notifications@github.com wrote:

Is it possible to get a stack trace with addr2line?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RetroAchievements/rcheevos/issues/3#issuecomment-425807283, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpC0NHpDXPceqOz7IL1_YHqUTherY3Uks5ugbz-gaJpZM4XBWM2 .

leiradel commented 6 years ago

Ok, I'll download the armv7e build and get the stack trace.

Jamiras commented 5 years ago

As requested by meleu, here's an apk built using latest master (post 1.7.6) (83497d5) and the HAS_NEW_CHEEVOS flag. It loads the achievements for Super Mario World, Super Mario All-Stars, and Chrono Trigger with leaderboards enabled, but is too slow within the android emulator for me to test triggering. Also attached are the steps I took to build the apk, including the changes necessary to get it to build (both with and without the HAS_NEW_CHEEVOS flag) if someone else wants to try it themselves.

Building RetroArch for Android.txt

retroarch-activity-rcheevos.zip

meleu commented 5 years ago

@fr500 I've tested the .apk (installed it on my Android phone) built by Jamiras and tried to reproduce the issue described by you, and everything works as expected.

Does the fact that the .apk was built on Windows+VisualStudio (differently than by the buildbot) invalidates the test?

meleu commented 5 years ago

this doesn't seem to be an issue anymore. closing.