darklost / android-cmake

Automatically exported from code.google.com/p/android-cmake
0 stars 0 forks source link

cmake generates bad builds on Windows which crash when run on ICS, but work on Honeycomb. #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am developing a NativeActivity application for Android tablets, and I'm 
getting bit by this issue pretty bad. What happens is that when I use 
android-cmake for the build, I can produce .apk fine, and it loads and starts 
up. On Honeycomb tablets, the .apk works correctly, but on ICS, the .apk 
crashes immediately on a call to pthread_mutex_unlock() in native_app_glue.c 
that is provided by Android NDK. The log file is at 

https://dl.dropbox.com/u/40949268/Bugs/cmakeNativeActivityCrash.txt

You can see my custom traces, the file I compiled is at

https://dl.dropbox.com/u/40949268/Bugs/android_native_app_glue.c

I am trying to produce a minimal sample to exhibit this issue, and therefore 
generated the file

https://dl.dropbox.com/u/40949268/Bugs/NativeActivityCMakeLists.zip

However, due to another issue (see 
http://code.google.com/p/android-cmake/issues/detail?id=8 ), I have not been 
able to yet test this minimal sample. I'll need to resolve that issue first.

Has anyone observed anything similar when building NativeActivity applications 
with android_native_app_glue.c for Ice Cream Sandwich using android-cmake?

Original issue reported on code.google.com by juj...@gmail.com on 19 Jun 2012 at 5:15

GoogleCodeExporter commented 8 years ago
The failure is not because of cmake but because of the buggy JNI code:

http://stackoverflow.com/questions/9978011/android-ics-jni-error-attempt-to-use-
stale-local-reference-0x1

Original comment by andrey.k...@itseez.com on 19 Aug 2012 at 5:09