14

I have an app on the Play Store, it has an IntentService that does some work when the app starts, and it's causing native crashes on Android 5.0. This service just scans the assets folder for app updating purposes.

Specifically, this crash seems to happen on Samsung S5 after the ugrade to Lollipop, but I don't know if it's strictly related to that device, as it's an Italian app and here that's still the only widely diffuse (i.e. that I know of) device that's getting Lollipop. However, I tried it on the emulator, with stock Android 5, and it's working fine.

I'm attaching the stack trace, any help on how to proceed would be appreciated... with native problems, I don't know where to put my hands.

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/kltexx/klte:5.0/LRX21T/G900FXXU1BNL9:user/release-keys'
Revision: '14'
ABI: 'arm'
pid: 24219, tid: 24259, name: IntentService[I >>> it.mydomain.myapp <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
r0 afcb8c00 r1 001000e6 r2 af201428 r3 00000000
r4 76eb1338 r5 700981c0 r6 af50e4c2 r7 afcb8c00
r8 af201070 r9 b4f7e300 sl b4efac64 fp fffffb18
ip 00100002 sp af200f60 lr b4cd52ab pc b4cd52ca cpsr 600f0030

backtrace:
#00 pc 000d32ca /system/lib/libart.so (art::ClassLinker::FindClassInPathClassLoader(art::ScopedObjectAccessAlreadyRunnable&, art::Thread*, char const*, art::Handle<art::mirror::ClassLoader>)+77)
#01 pc 000d3739 /system/lib/libart.so (_ZN3art11ClassLinker9FindClassEPNS_6ThreadEPKcNS_6HandleINS_6mirror11ClassLoaderEEE.part.404+356)
#02 pc 000d5ded /system/lib/libart.so (art::ClassLinker::CreateArrayClass(art::Thread*, char const*, art::Handle<art::mirror::ClassLoader>)+88)
#03 pc 000d37d1 /system/lib/libart.so (_ZN3art11ClassLinker9FindClassEPNS_6ThreadEPKcNS_6HandleINS_6mirror11ClassLoaderEEE.part.404+508)
#04 pc 000d5ded /system/lib/libart.so (art::ClassLinker::CreateArrayClass(art::Thread*, char const*, art::Handle<art::mirror::ClassLoader>)+88)
#05 pc 000d37d1 /system/lib/libart.so (_ZN3art11ClassLinker9FindClassEPNS_6ThreadEPKcNS_6HandleINS_6mirror11ClassLoaderEEE.part.404+508)
#06 pc 001fe583 /system/lib/libart.so (art::Array_createObjectArray(_JNIEnv*, _jclass*, _jclass*, int)+422)
bigstones
  • 15,087
  • 7
  • 65
  • 82
  • 1
    Any luck with this? I'm running into a similar error. – jjwhite01 Apr 21 '15 at 20:18
  • @jjwhite01 no, sadly nothing, but it seems very specific to this phone and this build. we're just hoping on an update from Samsung. – bigstones Apr 21 '15 at 21:57
  • This article mentions something about IntentService in Android 5.0 causing crashes. https://developer.nvidia.com/content/why-does-my-app-crash-android-50-lollipop – Scott Montgomerie Jun 02 '15 at 01:29
  • Do you found a solution? Faced the same problem... Project pretty old and big (we even build it in Eclipse :), and app doesn't run at all on Samsung's Android 5 devices. – AlexeyGorovoy Jul 31 '15 at 13:28
  • @AlexeyGorovoy no, sorry, I gave up on this. – bigstones Jul 31 '15 at 17:35
  • I have also experienced this issue. I'm using the native library GStreamer with a Nexus 5 running Android 5.1.1 – MarkyDD Oct 31 '16 at 20:33

1 Answers1

4

This is a known issue - but unfortunately not documented anywhere. I too faced it in our app and solved by not using zopfli. For my app - happened only on OS 5.0.x.

Some links which talk about the same: Native crash at /system/lib/libart.so on lollipop android 5.0.1 samsung

http://developer.samsung.com/forum/board/thread/view.do?boardName=General&messageId=279862&frm=7&tagValue=lollipop&curPage=1

Community
  • 1
  • 1
Amit
  • 124
  • 10
  • Hey Amit, how to not use Zopfli? – ninad thakare Feb 23 '21 at 10:57
  • Been some time, but from what I remember, it is not enabled by default, one needs to enable it explicitly. also , some reference here: https://stackoverflow.com/questions/35570114/running-zipalign-with-zopfli-recompression-after-building-apk-from-command-line – Amit Feb 23 '21 at 18:13
  • 1
    in our case, we had used zopfli explicitly and faced and then removed. By default, it is not used. – Amit Feb 23 '21 at 18:14
  • We are not using zopfli explicitly but still getting the crash – ninad thakare Feb 23 '21 at 19:46
  • 1. Paste your crash logs (or link to any place you have already posted) 2. Is it happening only on Samsung + Android 5.x combination? If not, then probably it is not zopfli related crash, but something else Zopfli issue was only seen with Samsung + Android 5.x, and after that solved, but due to inconsistencies, it is not recommended. Not related to crash: Another suggestion is to go app bundle way, that way Google will optimize the build and downlaod size and is most recommended way now – Amit Feb 24 '21 at 02:27
  • signal 11 (SIGSEGV), code 2 (SEGV_ACCERR) art::ArtField_getNameNative(_JNIEnv*, _jobject*) Samsung 5.1 only #00 pc 000000000020d9d2 /system/lib/libart.so (art::ArtField_getNameNative(_JNIEnv*, _jobject*)+281) #00 pc 00000000000000e7 /system/framework/arm/boot.oat – ninad thakare Feb 24 '21 at 06:46
  • https://stackoverflow.com/questions/66340465/signal-11-sigsegv-code-2-segv-accerr Created a question as well. Need all help – ninad thakare Feb 24 '21 at 06:49
  • ok, u are already using app bundle, then probably google should check this. Did you try reaching out to Google on this ? – Amit Feb 24 '21 at 10:09
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/229150/discussion-between-ninad-thakare-and-amit). – ninad thakare Feb 24 '21 at 10:57
  • signal 5 (SIGTRAP), code 1 (TRAP_BRKPT) *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** backtrace: #00 pc 0000000002425284 /system/app/Chrome/Chrome.apk (offset 0x1ea7000) Happened mostly on android 9. I could fix it by not using one library for specifically android 9.= – ninad thakare Feb 24 '21 at 18:45