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

Spurious nullpointer crash on app resume #1353

Closed
ghost opened this issue Sep 4, 2018 · 2 comments
Closed

Spurious nullpointer crash on app resume #1353

ghost opened this issue Sep 4, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 4, 2018

Making a new ticket for this. I previously already saw this but got it all mixed up with the orientation crashes caused by the wrong manifest / apilevel issue.

However, I'm definitely still seeing the occasional crash on resume, although not always. As usual, it appears to happen before the executing code enters back into my own app code, and it seems to be a null pointer passed to libSDL2 somewhere by the wrapper:

09-04 21:29:45.965  1821  4747 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=<removed>/org.kivy.android.PythonActivity (has extras)} from uid 10030 on display 0
09-04 21:29:46.058 23581 23581 V PythonActivity: My oncreate running
09-04 21:29:46.058 23581 23581 V PythonActivity: About to do super onCreate
09-04 21:29:46.058 23581 23581 V SDL     : Device: serranoltexx
09-04 21:29:46.059 23581 23581 V SDL     : Model: GT-I9195
09-04 21:29:46.059 23581 23581 V SDL     : onCreate():org.kivy.android.PythonActivity@44d09ff
09-04 21:29:46.059 23581 23581 V PythonActivity: Did super onCreate
09-04 21:29:46.059 23581 23581 V SDL     : getting identifier
09-04 21:29:46.059 23581 23581 V SDL     : kind is drawable and name presplash
09-04 21:29:46.059 23581 23581 V SDL     : result is 2130837506
09-04 21:29:46.079 23581 23581 V SDL     : asked to get string presplash_color
09-04 21:29:46.079 23581 23581 V SDL     : getting identifier
09-04 21:29:46.079 23581 23581 V SDL     : kind is string and name presplash_color
09-04 21:29:46.079 23581 23581 V SDL     : result is 2130968577
09-04 21:29:46.099 23581 23581 V PythonActivity: onResume()
09-04 21:29:46.100 23581 23581 V SDL     : onResume()
09-04 21:29:46.146 23581 23598 I OpenGLRenderer: Initialized EGL, version 1.4
09-04 21:29:46.146 23581 23598 D OpenGLRenderer: Swap behavior 1
09-04 21:29:46.152  1821  1857 D Sensors : LightSensor readEvents x = 15.000000, raw = 15
09-04 21:29:46.165 23581 23581 V SDL     : onWindowFocusChanged(): true
09-04 21:29:46.172 23581 24009 V PythonActivity: Ready to unpack
09-04 21:29:46.217 23581 24009 V PythonActivity: UNPACKING!!! private app
09-04 21:29:46.217 23581 24009 V SDL     : asked to get string private_version
09-04 21:29:46.217 23581 24009 V SDL     : getting identifier
09-04 21:29:46.251 23581 24009 V SDL     : kind is string and name private_version
09-04 21:29:46.284  1821  1842 I ActivityManager: Displayed <removed>/org.kivy.android.PythonActivity: +255ms (total +19s423ms)
09-04 21:29:46.298 23581 24009 V SDL     : result is 2130968578
09-04 21:29:46.299 23581 24009 V PythonActivity: Data version is 1536088926.6077693
09-04 21:29:46.347 23581 23581 V pythonutil: Checking pattern libcrystax\.so against libSDL2_mixer.so
09-04 21:29:46.347 23581 23581 V pythonutil: Checking pattern libcrystax\.so against libSDL2_ttf.so
09-04 21:29:46.347 23581 23581 V pythonutil: Checking pattern libcrystax\.so against libmain.so
09-04 21:29:46.347 23581 23581 V pythonutil: Checking pattern libcrystax\.so against libSDL2.so
09-04 21:29:46.347 23581 23581 V pythonutil: Checking pattern libcrystax\.so against libcrystax.so
09-04 21:29:46.348 23581 23581 V pythonutil: Pattern libcrystax\.so matched file libcrystax.so
09-04 21:29:46.348 23581 23581 V pythonutil: Checking pattern libcrystax\.so against libSDL2_image.so
09-04 21:29:46.348 23581 23581 V pythonutil: Checking pattern libcrystax\.so against libpython3.5m.so
09-04 21:29:46.348 23581 23581 V pythonutil: Checking pattern libsqlite3\.so against libSDL2_mixer.so
09-04 21:29:46.348 23581 23581 V pythonutil: Checking pattern libsqlite3\.so against libSDL2_ttf.so
09-04 21:29:46.348 23581 23581 V pythonutil: Checking pattern libsqlite3\.so against libmain.so
09-04 21:29:46.348 23581 23581 V pythonutil: Checking pattern libsqlite3\.so against libSDL2.so
09-04 21:29:46.349 23581 23581 V pythonutil: Checking pattern libsqlite3\.so against libcrystax.so
09-04 21:29:46.349 23581 23581 V pythonutil: Checking pattern libsqlite3\.so against libSDL2_image.so
09-04 21:29:46.349 23581 23581 V pythonutil: Checking pattern libsqlite3\.so against libpython3.5m.so
09-04 21:29:46.349 23581 23581 V pythonutil: Checking pattern libssl.*\.so against libSDL2_mixer.so
09-04 21:29:46.349 23581 23581 V pythonutil: Checking pattern libssl.*\.so against libSDL2_ttf.so
09-04 21:29:46.349 23581 23581 V pythonutil: Checking pattern libssl.*\.so against libmain.so
09-04 21:29:46.350 23581 23581 V pythonutil: Checking pattern libssl.*\.so against libSDL2.so
09-04 21:29:46.350 23581 23581 V pythonutil: Checking pattern libssl.*\.so against libcrystax.so
09-04 21:29:46.350 23581 23581 V pythonutil: Checking pattern libssl.*\.so against libSDL2_image.so
09-04 21:29:46.350 23581 23581 V pythonutil: Checking pattern libssl.*\.so against libpython3.5m.so
09-04 21:29:46.350 23581 23581 V pythonutil: Checking pattern libcrypto.*\.so against libSDL2_mixer.so
09-04 21:29:46.350 23581 23581 V pythonutil: Checking pattern libcrypto.*\.so against libSDL2_ttf.so
09-04 21:29:46.351 23581 23581 V pythonutil: Checking pattern libcrypto.*\.so against libmain.so
09-04 21:29:46.351 23581 23581 V pythonutil: Checking pattern libcrypto.*\.so against libSDL2.so
09-04 21:29:46.353 23581 23581 V pythonutil: Checking pattern libcrypto.*\.so against libcrystax.so
09-04 21:29:46.353 23581 23581 V pythonutil: Checking pattern libcrypto.*\.so against libSDL2_image.so
09-04 21:29:46.353 23581 23581 V pythonutil: Checking pattern libcrypto.*\.so against libpython3.5m.so
09-04 21:29:46.353 23581 23581 V pythonutil: Loading library: crystax
09-04 21:29:46.354 23581 23581 V pythonutil: Loading library: SDL2
09-04 21:29:46.354 23581 23581 V pythonutil: Loading library: SDL2_image
09-04 21:29:46.354 23581 23581 V pythonutil: Loading library: SDL2_mixer
09-04 21:29:46.355 23581 23581 V pythonutil: Loading library: SDL2_ttf
09-04 21:29:46.355 23581 23581 V pythonutil: Loading library: python2.7
09-04 21:29:46.357 23581 23581 V pythonutil: Library loading error: dalvik.system.PathClassLoader[DexPathList[[zip file "/mnt/expand/ccbe4e94-5878-4053-8382-d825486cc844/app/<removed>/base.apk"],nativeLibraryDirectories=[/mnt/expand/ccbe4e94-5878-4053-8382-d825486cc844/app/<removed>/lib/arm, /system/fake-libs, /mnt/expand/ccbe4e94-5878-4053-8382-d825486cc844/app/<removed>/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]] couldn't find "libpython2.7.so"
09-04 21:29:46.357 23581 23581 V pythonutil: Loading library: python3.5m
09-04 21:29:46.357 23581 23581 V pythonutil: Loading library: main
09-04 21:29:46.358 23581 23581 V pythonutil: Failed to load _io.so or unicodedata.so...but that's okay.
09-04 21:29:46.359 23581 23581 V pythonutil: Unsatisfied linker when loading ctypes
09-04 21:29:46.359 23581 23581 V pythonutil: Loaded everything!
09-04 21:29:46.365 23581 23581 V PythonActivity: Setting env vars for start.c and Python to use
09-04 21:29:46.365 23581 23581 V PythonActivity: Access to our meta-data...
09-04 21:29:46.368 23581 23581 I PythonActivity: Surface will NOT be transparent
09-04 21:29:46.442 23581 23581 V SDL     : surfaceCreated()
09-04 21:29:46.442 23581 23581 V SDL     : surfaceChanged()
09-04 21:29:46.442 23581 23581 V SDL     : pixel format RGB_565
09-04 21:29:46.443 23581 23581 V SDL     : Window size:540x924
09-04 21:29:46.447  1821  2416 D Sensors : setDelay: acc_delay=20000000, mag_delay=200000000
09-04 21:29:46.447  1821  2416 D Sensors : setDelay: handle=0, delay=20000000
09-04 21:29:46.449 23581 24019 I SDL     : SDL_Android_Init()
09-04 21:29:46.449 23581 24019 I SDL     : SDL_Android_Init() finished!
09-04 21:29:46.449 23581 24019 I python  : Initialize Python for Android
09-04 21:29:46.449 23581 24019 I python  : Changing directory to the one provided by ANDROID_ARGUMENT
09-04 21:29:46.449 23581 24019 I python  : /mnt/expand/ccbe4e94-5878-4053-8382-d825486cc844/user/0/<removed>/files/app
09-04 21:29:46.449 23581 24019 I python  : Preparing to initialize python
09-04 21:29:46.450 23581 24019 I python  : crystax_python exists
09-04 21:29:46.450 23581 24019 I python  : calculated paths to be...
09-04 21:29:46.450 23581 24019 I python  : /mnt/expand/ccbe4e94-5878-4053-8382-d825486cc844/user/0/<removed>/files/app/crystax_python/stdlib.zip:/mnt/expand/ccbe4e94-5878-4053-8382-d825486cc844/user/0/<removed>/files/app/crystax_python/modules
09-04 21:29:46.450 23581 24019 I python  : set wchar paths...
09-04 21:29:46.450 23581 24019 I python  : Initialized python
09-04 21:29:46.450 23581 24019 I python  : AND: Init threads
--------- beginning of crash
09-04 21:29:46.454 23581 24019 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 24019 (SDLThread)
09-04 21:29:46.457   176   176 W         : debuggerd: handling request: pid=23581 uid=10183 gid=10183 tid=24019
09-04 21:29:46.479 24021 24021 W debuggerd: type=1400 audit(0.0:28): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.479 24021 24021 W debuggerd: type=1400 audit(0.0:29): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.479 24021 24021 W debuggerd: type=1400 audit(0.0:30): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.479 24021 24021 W debuggerd: type=1400 audit(0.0:31): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.479 24021 24021 W debuggerd: type=1400 audit(0.0:32): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.479 24021 24021 W debuggerd: type=1400 audit(0.0:33): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.489 24021 24021 W debuggerd: type=1400 audit(0.0:34): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.489 24021 24021 W debuggerd: type=1400 audit(0.0:35): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.489 24021 24021 W debuggerd: type=1400 audit(0.0:36): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.489 24021 24021 W debuggerd: type=1400 audit(0.0:37): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.489 24021 24021 W debuggerd: type=1400 audit(0.0:38): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.519 24021 24021 W debuggerd: type=1400 audit(0.0:39): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.529 24021 24021 W debuggerd: type=1400 audit(0.0:40): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.699 24021 24021 W debuggerd: type=1400 audit(0.0:41): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.705 24021 24021 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-04 21:29:46.706 24021 24021 F DEBUG   : LineageOS Version: '14.1-20180624-NIGHTLY-serranoltexx'
09-04 21:29:46.706 24021 24021 F DEBUG   : Build fingerprint: 'samsung/serranoltexx/serranolte:4.4.2/KOT49H/I9195XXUCNE6:user/release-keys'
09-04 21:29:46.706 24021 24021 F DEBUG   : Revision: '0'
09-04 21:29:46.706 24021 24021 F DEBUG   : ABI: 'arm'
09-04 21:29:46.707 24021 24021 F DEBUG   : pid: 23581, tid: 24019, name: SDLThread  >>> <removed> <<<
09-04 21:29:46.707 24021 24021 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
09-04 21:29:46.707 24021 24021 F DEBUG   :     r0 9ab5cb60  r1 00000008  r2 8b7debb5  r3 00000000
09-04 21:29:46.707 24021 24021 F DEBUG   :     r4 aa01b4a6  r5 9ab5cb60  r6 b45d5008  r7 9c8ebe0c
09-04 21:29:46.707 24021 24021 F DEBUG   :     r8 9c8ebf0c  r9 9b2e5f00  sl 00000000  fp 9c8ec080
09-04 21:29:46.707 24021 24021 F DEBUG   :     ip 9d052bdc  sp 9c8ebdc0  lr 9ce810d5  pc 9ce80b7e  cpsr 600e0030
09-04 21:29:46.709 24021 24021 W debuggerd: type=1400 audit(0.0:42): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.719 24021 24021 W debuggerd: type=1400 audit(0.0:43): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:46.722 24021 24021 F DEBUG   : 
09-04 21:29:46.722 24021 24021 F DEBUG   : backtrace:
09-04 21:29:46.722 24021 24021 F DEBUG   :     #00 pc 0004cb7e  /mnt/expand/ccbe4e94-5878-4053-8382-d825486cc844/app/<removed>/lib/arm/libpython3.5m.so
09-04 21:29:46.722 24021 24021 F DEBUG   :     #01 pc 0004d0d1  /mnt/expand/ccbe4e94-5878-4053-8382-d825486cc844/app/<removed>/lib/arm/libpython3.5m.so
09-04 21:29:46.722 24021 24021 F DEBUG   :     #02 pc 0004d3cb  /mnt/expand/ccbe4e94-5878-4053-8382-d825486cc844/app/<removed>/lib/arm/libpython3.5m.so
09-04 21:29:46.722 24021 24021 F DEBUG   :     #03 pc 00060b27  /mnt/expand/ccbe4e94-5878-4053-8382-d825486cc844/app/<removed>/lib/arm/libpython3.5m.so
09-04 21:29:46.722 24021 24021 F DEBUG   :     #04 pc 00001045  /mnt/expand/ccbe4e94-5878-4053-8382-d825486cc844/app/<removed>/lib/arm/libmain.so
09-04 21:29:46.722 24021 24021 F DEBUG   :     #05 pc 00000dfd  /mnt/expand/ccbe4e94-5878-4053-8382-d825486cc844/app/<removed>/lib/arm/libmain.so
09-04 21:29:46.722 24021 24021 F DEBUG   :     #06 pc 00000a41  /mnt/expand/ccbe4e94-5878-4053-8382-d825486cc844/app/<removed>/oat/arm/base.odex (offset 0x16000)
09-04 21:29:47.153  1821  1857 D Sensors : LightSensor readEvents x = 8.000000, raw = 8
09-04 21:29:47.160  1821  1844 D LuxLevels: bright hysteresis constant= 0.1, threshold=14.036187, lux=12.76017
09-04 21:29:47.160  1821  1844 D LuxLevels: dark hysteresis constant= 0.2, threshold=10.208137, lux=12.76017
09-04 21:29:47.751 24021 24021 W debuggerd: type=1400 audit(0.0:44): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:47.761 24021 24021 W debuggerd: type=1400 audit(0.0:45): avc: denied { search } for name="expand" dev="tmpfs" ino=6594 scontext=u:r:debuggerd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
09-04 21:29:48.107   176   176 W         : debuggerd: resuming target 23581
09-04 21:29:48.122  1821  1839 I BootReceiver: Copying /data/tombstones/tombstone_01 to DropBox (SYSTEM_TOMBSTONE)
09-04 21:29:48.153  1821  1857 D Sensors : LightSensor readEvents x = 8.000000, raw = 8
09-04 21:29:48.173  1821  5933 I WindowManager: WIN DEATH: Window{1082b0f u0 <removed>/org.kivy.android.PythonActivity}
09-04 21:29:48.173  1821  5933 W WindowManager: Force-removing child win Window{79ac5a5 u0 SurfaceView - <removed>/org.kivy.android.PythonActivity} from container Window{1082b0f u0 <removed>/org.kivy.android.PythonActivity}
09-04 21:29:48.173  1821  2416 D GraphicsStats: Buffer count: 11
09-04 21:29:48.185  1821 24026 W ActivityManager:   Force finishing activity <removed>/org.kivy.android.PythonActivity
09-04 21:29:48.195  1821  1856 D Sensors : setDelay: acc_delay=66667000, mag_delay=200000000
09-04 21:29:48.195  1821  1875 W InputDispatcher: channel '7581a2f <removed>/org.kivy.android.PythonActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
09-04 21:29:48.195  1821  1856 D Sensors : setDelay: handle=0, delay=66667000
09-04 21:29:48.195  1821  1875 E InputDispatcher: channel '7581a2f <removed>/org.kivy.android.PythonActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
09-04 21:29:48.198  1457  1457 I Zygote  : Process 23581 exited due to signal (11)
09-04 21:29:48.205  1821  4747 W WindowManager: Failed looking up window
09-04 21:29:48.205  1821  4747 W WindowManager: java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@a33179c does not exist
09-04 21:29:48.205  1821  4747 W WindowManager: 	at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9469)
09-04 21:29:48.205  1821  4747 W WindowManager: 	at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9460)
09-04 21:29:48.205  1821  4747 W WindowManager: 	at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1807)
09-04 21:29:48.205  1821  4747 W WindowManager: 	at android.os.BinderProxy.sendDeathNotice(Binder.java:688)
09-04 21:29:48.205  1821  4747 I WindowManager: WIN DEATH: null
09-04 21:29:48.205  1821  5122 I WindowManager: WIN DEATH: Window{74a8be u0 SurfaceView - <removed>/org.kivy.android.PythonActivity}
09-04 21:29:48.209  1821  5066 I WindowManager: WIN DEATH: Window{7581a2f u0 <removed>/org.kivy.android.PythonActivity}
09-04 21:29:48.209  1821  5066 W InputDispatcher: Attempted to unregister already unregistered input channel '7581a2f <removed>/org.kivy.android.PythonActivity (server)'
09-04 21:29:48.238  1821 24026 W ActivityManager: Exception thrown during pause
09-04 21:29:48.238  1821 24026 W ActivityManager: android.os.DeadObjectException
09-04 21:29:48.238  1821 24026 W ActivityManager: 	at android.os.BinderProxy.transactNative(Native Method)
09-04 21:29:48.238  1821 24026 W ActivityManager: 	at android.os.BinderProxy.transact(Binder.java:615)
09-04 21:29:48.238  1821 24026 W ActivityManager: 	at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:785)
09-04 21:29:48.238  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:1148)
09-04 21:29:48.238  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3585)
09-04 21:29:48.238  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:3421)
09-04 21:29:48.238  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:1860)
09-04 21:29:48.238  1821 24026 W ActivityManager: 	at com.android.server.am.AppErrors.handleAppCrashLocked(AppErrors.java:625)
09-04 21:29:48.238  1821 24026 W ActivityManager: 	at com.android.server.am.AppErrors.makeAppCrashingLocked(AppErrors.java:483)
09-04 21:29:48.238  1821 24026 W ActivityManager: 	at com.android.server.am.AppErrors.crashApplicationInner(AppErrors.java:358)
09-04 21:29:48.238  1821 24026 W ActivityManager: 	at com.android.server.am.AppErrors.crashApplication(AppErrors.java:309)
09-04 21:29:48.238  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:13694)
09-04 21:29:48.238  1821 24026 W ActivityManager: 	at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
09-04 21:29:48.243  1821 24026 I ActivityManager: Restarting because process died: ActivityRecord{2049812 u0 <removed>/org.kivy.android.PythonActivity t3528}
09-04 21:29:48.247  1821 24026 W ActivityManager: Exception when starting activity <removed>/org.kivy.android.PythonActivity
09-04 21:29:48.247  1821 24026 W ActivityManager: android.os.DeadObjectException
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at android.os.BinderProxy.transactNative(Native Method)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at android.os.BinderProxy.transact(Binder.java:615)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at android.app.ApplicationThreadProxy.scheduleLaunchActivity(ApplicationThreadNative.java:884)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityStackSupervisor.realStartActivityLocked(ActivityStackSupervisor.java:1314)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityStackSupervisor.startSpecificActivityLocked(ActivityStackSupervisor.java:1413)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityStack.resumeTopActivityInnerLocked(ActivityStack.java:2573)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityStack.resumeTopActivityUncheckedLocked(ActivityStack.java:2137)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityStackSupervisor.resumeFocusedStackTopActivityLocked(ActivityStackSupervisor.java:1838)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityStackSupervisor.resumeFocusedStackTopActivityLocked(ActivityStackSupervisor.java:1828)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:1203)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3585)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:3421)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:1860)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.AppErrors.handleAppCrashLocked(AppErrors.java:625)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.AppErrors.makeAppCrashingLocked(AppErrors.java:483)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.AppErrors.crashApplicationInner(AppErrors.java:358)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.AppErrors.crashApplication(AppErrors.java:309)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:13694)
09-04 21:29:48.247  1821 24026 W ActivityManager: 	at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
09-04 21:29:48.247  1821 24026 D ActivityManager: cleanUpApplicationRecord -- 23581
09-04 21:29:48.260  1821 24026 I ActivityManager: Start proc 24029:<removed>/u0a183 for activity <removed>/org.kivy.android.PythonActivity
09-04 21:29:48.260  1821  4748 W ActivityManager: Spurious death for ProcessRecord{1ed61d2 24029:<removed>/u0a183}, curProc for 23581: null
@ghost
Copy link
Author

ghost commented Oct 20, 2018

Ok, a little bit of follow up:

  • It's probably not memory corruption. I used valgrind (the app runs with the same codebase on desktop) and lots of managed wrappers and such with a significant time investment to be relatively certain I'm not doing anything bad or memory corrupting with the textures. Also since the crash is always address 0x8 and never different, it seems to be always the same NULL pointer access

  • It's probably the wrapper crashing. I have a print when my app resumes and when the crash happens, I don't see it. I'm pretty certain after poking around this for a while that this happens still in the wrapper before the code even returns into my app.

  • It's device independent. I have a new phone now, different Android ROM vendor, different hardware, different chipset. Same story. So I don't think it's a GL graphics driver bug or something.

  • I'm not deleting the window or anything. The window is still there. I dump the SDL_Renderer though, and I suspect this might be what it's trying to access. (since the renderer drop & recreation is something I'm pretty certain kivy doesn't do, so that would explain why nobody else is running into this.) However, the renderer is created in the scope my code, and deletion & recreation works perfectly fine on desktop, and is something that really should work! Of course it could be something else though, I'm just guessing.

  • The crash happens almost every time, but once it doesn't, it stays away. I found this observation to be interesting: the crash happens >80% of the time, I tested this on different devices and Android ROMs, but if I get lucky and it doesn't - then I can tab in & out of the tab forever with no issue, ever. So maybe it's some initial race condition on the first resume, and once you get lucky, it works nicely.

If I get around to gdb debug this, I'll try to poke into the code. However, this might not be the next days and I don't know much about the wrapper, so anyone knowledgeable is invited to debug this! I can send an .apk (or the docker image to build it although that one is rather complicated due to the messy recipe limitations p4a has right now...) which crashes things. It's not a minimal reproduction case but it's at a very defined point (between the SDL background app event, and before the SDL resume app event) and in the wrapper, so it shouldn't matter much.

@ghost
Copy link
Author

ghost commented Oct 21, 2018

Okay, made #1424 now that I finally know what it is. Sorry for the ticket spam.

@ghost ghost closed this as completed Oct 21, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants