问题
Background
My app has 100% code written in Java, it doesn't need to make any heavy operations.
The app itself uses only the next libraries, yet non of them have JNI code:
- ActionBarSherlock
- google-play-services_lib
The problem
Today I got a weird crash report, which doesn't show any normal exception information .
The report was sent via a "Galaxy S5 (klte)" device, with Android 4.4 .
Here's the crash report title:
Native crash at /dev/ashmem/dalvik-jit-code-cache in
/dev/ashmem/dalvik-jit-code-cache (deleted)
And here is the crash content :
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/kltexx/klte:4.4.2/KOT49H/G900FXXU1ANE2:user/release-keys'
Revision: '14'
pid: 11904, tid: 11904, name: .lb.app_manager >>> com.lb.app_manager <<<
signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 6d7b97cc SOME_NUMBERS
backtrace:
#00 pc 00026a56 /dev/ashmem/dalvik-jit-code-cache (deleted)
#01 pc 00026a55 /dev/ashmem/dalvik-jit-code-cache (deleted)
code around pc: SOME_NUMBERS
code around lr: SOME_NUMBERS
where "SOME_NUMBERS" look like a lot of random hexadecimal numbers.
What I've tried
Some websites claim people should decode images in a synchronized manner (yet I have made many apps that do it and never got this error).
The thing is, for this app I already decode the bitmaps using a single thread, so this can't be it.
I didn't find any other thing that can be related to things I do on the app, that have anything to do with native handling of code.
I thought, maybe since it's Android 4.4, the user moved to "ART" runtime, but the crash report has the word "dalvik" in it, so that's probably not it (and even if it was this, I have no idea how to handle it).
To make things even more unclear, the user wrote "Not sure" in the report... :(
The question
How could this be?
Why does it occur?
How can I fix it?
Anyone else had this issue before?
来源:https://stackoverflow.com/questions/24044903/native-crash-on-an-android-java-based-app