Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There appears to be a bug on the HTC One M8, described here:
https://code.google.com/p/android/issues/detail?id=190058
Calls to methods on Annotations attempt to read parmaeters that
should not be there, resulting in "use of invalid jobject" error.
This affects libnatj.so, when NatJ.register() is called
the process crashes. Extract from log included below.
This bug looks like it is fixed in ASOP, but unfortunately
not in the HTC ROM (tested with the latest OTA ROM
available on this device, 6.12.161.4. Later firmware
versions are available from different carriers and for
manual download / install, I have not tested these).
The workaround described in the issue above prevents the crash.
This commit applies the workaround to CRuntime.cpp.
11-17 09:32:28.434 28187-28187/myapplication.dev A/art:
art/runtime/java_vm_ext.cc:448] JNI DETECTED ERROR IN APPLICATION: use
of invalid jobject 0xb38d2070
11-17 09:32:28.434 28187-28187/myapplication.dev A/art:
art/runtime/java_vm_ext.cc:448] from void
org.moe.natj.c.CRuntime.registerClass(java.lang.Class)
...
11-17 09:32:28.435 28187-28187/myapplication.dev A/art:
art/runtime/java_vm_ext.cc:448] native: #9 pc 0000acb1
/data/app/myapplication.dev-1/lib/arm/libnatj.so
(_JNIEnv::CallObjectMethod(_jobject*, _jmethodID*, ...)+28)
11-17 09:32:28.435 28187-28187/myapplication.dev A/art:
art/runtime/java_vm_ext.cc:448] native: #10 pc 0000e0ef
/data/app/myapplication.dev-1/lib/arm/libnatj.so
(processStructureFunctions(_JNIEnv*, _jclass*)+814)