question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android Crashes on App Resume

See original GitHub issue
  • Install plugin into demo app using demo code.
  • Run the app
  • Pause (minimize the app)
  • Resume and 💥

Won’t see the NS exception activity since its a crash.

Android Studio logs provide this:

    --------- beginning of crash
2018-10-16 10:57:05.165 7650-7891/com.permobil.smarteval A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x58 in tid 7891 (GLThread 8661), pid 7650 (mobil.smarteval)
2018-10-16 10:57:05.187 610-610/? E/HWComposer: getLayerReleaseFence failed for display -1: Invalid display
2018-10-16 10:57:05.204 610-610/? E/HWComposer: getLayerReleaseFence failed for display -1: Invalid display
2018-10-16 10:57:05.237 610-610/? E/HWComposer: getLayerReleaseFence failed for display -1: Invalid display
2018-10-16 10:57:05.255 610-610/? E/HWComposer: getLayerReleaseFence failed for display -1: Invalid display
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG: Build fingerprint: 'google/walleye/walleye:9/PPR2.181005.003/4984323:user/release-keys'
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG: Revision: 'MP1'
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG: ABI: 'arm'
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG: pid: 7650, tid: 7891, name: GLThread 8661  >>> com.permobil.smarteval <<<
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x58
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG: Cause: null pointer dereference
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG:     r0  cb877000  r1  000049a6  r2  00000000  r3  40000000
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG:     r4  e363e518  r5  c64dba68  r6  00000000  r7  c057e800
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG:     r8  00000000  r9  e178b600  r10 c057e900  r11 c78e2e00
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG:     ip  e9a72d00  sp  c057e7f8  lr  c56fd221  pc  c56fd1f0
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG: backtrace:
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #00 pc 000261f0  /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/lib/arm/libmapbox-gl.so
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #01 pc 0002621d  /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/lib/arm/libmapbox-gl.so
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #02 pc 000dd3d3  /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/lib/arm/libmapbox-gl.so
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #03 pc 00076c01  /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/lib/arm/libmapbox-gl.so
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #04 pc 00076c2d  /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/lib/arm/libmapbox-gl.so
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #05 pc 00074571  /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/lib/arm/libmapbox-gl.so
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #06 pc 0005e7d7  /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/lib/arm/libmapbox-gl.so
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #07 pc 00411a79  /system/lib/libart.so (art_quick_generic_jni_trampoline+40)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #08 pc 0040d575  /system/lib/libart.so (art_quick_invoke_stub_internal+68)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #09 pc 003e6b79  /system/lib/libart.so (art_quick_invoke_stub+224)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #10 pc 000a1015  /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+136)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #11 pc 001e5ae9  /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+236)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #12 pc 001e05d7  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+814)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #13 pc 003e2661  /system/lib/libart.so (MterpInvokeDirect+196)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #14 pc 00400414  /system/lib/libart.so (ExecuteMterpImpl+14484)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #15 pc 003b7868  /dev/ashmem/dalvik-classes2.dex extracted in memory from /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/base.apk!classes2.dex (deleted) (com.mapbox.mapboxsdk.maps.renderer.MapRenderer.onSurfaceCreated)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #16 pc 001c4d53  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2471763592+378)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #17 pc 001c9439  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+152)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #18 pc 001e05bf  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+790)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #19 pc 003e1cef  /system/lib/libart.so (MterpInvokeSuper+1098)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #20 pc 00400394  /system/lib/libart.so (ExecuteMterpImpl+14356)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #21 pc 003b83d4  /dev/ashmem/dalvik-classes2.dex extracted in memory from /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/base.apk!classes2.dex (deleted) (com.mapbox.mapboxsdk.maps.renderer.glsurfaceview.GLSurfaceViewMapRenderer.onSurfaceCreated)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #22 pc 001c4d53  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2471763592+378)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #23 pc 001c9439  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+152)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #24 pc 001e05bf  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+790)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #25 pc 003e1cef  /system/lib/libart.so (MterpInvokeSuper+1098)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #26 pc 00400394  /system/lib/libart.so (ExecuteMterpImpl+14356)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #27 pc 003ae4ce  /dev/ashmem/dalvik-classes2.dex extracted in memory from /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/base.apk!classes2.dex (deleted) (com.mapbox.mapboxsdk.maps.MapView$5.onSurfaceCreated+10)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #28 pc 001c4d53  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2471763592+378)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #29 pc 001c9439  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+152)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #30 pc 001e05bf  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+790)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #31 pc 003e23a3  /system/lib/libart.so (MterpInvokeInterface+1010)

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:36 (20 by maintainers)

github_iconTop GitHub Comments

4reactions
JarriddWcommented, Apr 17, 2019

Downgrading to 4.3.1 has stopped the crashing but the plugin no longer displays the userLocation. Any suggestions? I’ve been stuck with this since Monday 😦

3reactions
stoanarrrcommented, Oct 30, 2018

While switching between pages, app crashes to (as mentioned in issue #275), solution for me was, to listen for the “onNavigatingFrom” event (Page docs) and when it’s triggered detach and destroy the map like I mentioned before.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected App Crashes on Android and How to Deal with ...
An easy and convenient solution would be to check whether our existing app process was killed and recreated when the user resumes the...
Read more >
Detect and diagnose crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >
App crashes when restoring from background after a long time
I debugged and found the reason that it is crashing is due to a NullPointerException .
Read more >
Finding Resume and Restart Errors in Android Applications
After the app exits, we restart it. Upon restart, one of the error categories described in Section 5.2.1 will materialize, or the app...
Read more >
Android Crashes on App Resume · Issue #271 - GitHub
The second step was to translate the Java app into NativeScript, as close as possible, to see if it crashes onPause/onResume. After dozens...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found