1

I got the following crash report on Google Play developer console for my app. It seems to suggest that my native library (libcld.so, which _is_present_ in my APK for both ARM flavors and x86) could not be found, and the user comments "nicht mehr startbar" (German: does not start any more). The stack trace is below. Why should this happen??? A freak accident on one of thousands of devices using the app without such trouble? The only explanation I can think of comes from my Windows software experience: sometimes the anti-virus software has a "false positive" and deletes there my exe or one of the dll's as infected. The AV vendors usually fix "false positives" within 24 hours, although they do damage business.

Does this happen on Android too? Would be the first time for me. What could be another reason of not finding the native libraries included with the app?

Stack trace as reported on Google Play:

java.lang.RuntimeException: An error occured while executing doInBackground()

at android.os.AsyncTask$3.done(AsyncTask.java:200) at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273) at java.util.concurrent.FutureTask.setException(FutureTask.java:124) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307) at java.util.concurrent.FutureTask.run(FutureTask.java:137) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561) at java.lang.Thread.run(Thread.java:1096) Caused by: java.lang.ExceptionInInitializerError at com.hyperionics.avar.SpeakService.setOriginalText(SourceFile:143) at com.hyperionics.avar.ContentsLoader.doInBackground(SourceFile:137) at com.hyperionics.avar.ContentsLoader.doInBackground(SourceFile:31) at android.os.AsyncTask$2.call(AsyncTask.java:185) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) ... 4 more Caused by: java.lang.UnsatisfiedLinkError: Library cld not found at java.lang.Runtime.loadLibrary(Runtime.java:461) at java.lang.System.loadLibrary(System.java:557) at com.hyperionics.avar.CldWrapper.(SourceFile:21) ... 9 more

Greg

5
  • 1
    It should not be possible for a 3rd party AV application to delete your library, unless the user has a hacked device or a vendor has packaged the AV app with the Android build. It is more likely that you have encountered a device with an oddball ABI (there are, at least in theory, MIPS devices), or hit a known bug where devices which would prefer a specialized ARM varient fail to unpack a generic ARM library which they should be able to use as a fallback. Jul 1, 2013 at 13:45
  • Thank you for the comment, @ChrisStratton! Actually I do provide both armeabi, armeabi-v7a and Intel in addition... And Google Play is supposed to block installs on incompatible devices. But it could be a freak accident then - maybe the user side-loaded it on incompatible device, or deleted some files on a rooted device, or maybe has the memory chip damaged? Guess I should stop worrying about this one... ?
    – gregko
    Jul 1, 2013 at 13:58
  • If it's a single example you probably shouldn't worry, though it would be useful if you can figure out the device type and keep an eye out for additional cases. Jul 1, 2013 at 14:02
  • Unfortunately there seems to be no way of contacting a user of a crash reported through Google Play... But they do report the device type, which seems to be Huawei U8500. Good suggestion to look for it, thanks!
    – gregko
    Jul 1, 2013 at 14:11
  • @ChrisStratton - I figured it out now... Indeed my natvie lib was not loading on Android 2.2 Froyo, as I started using asset_manager in it, and I did not realize that native code was building with with APP_PLATFORM=android-14 (corresponding to targetSdkVersion in my manifest). Adding APP_PLATFORM := android-8 to Application.mk immediately triggered a build error, and I could fix it. Thank you again for making me look at the device etc.
    – gregko
    Jul 1, 2013 at 20:00

1 Answer 1

1

I figured out what was the problem, inspired by comments left by Chris above. I noticed then that the reported error was on an old device, which can be upgraded max to Android 2.2, not higher.

In the most current release of my app, I made a small modification in my native library, and used asset_manager in it. I did not realize that the native code was compiled for android-14 platform (as my AndroidManifest.xml declares this as the targetSdkVersion), while my minimum supported platforms is android-8 (Android 2.2, Froyo). Turns out there is no asset_manager under the old platform. After I added to Application.mk the following line:

APP_PLATFORM := android-8

the native build immediately triggered an error and I could fix the issue. Well, the most important lesson from this adventure, which I have to learn and re-learn over and over again: before releasing anything, test on all the platforms you claim to support...

A big Thank you! again to Chris for responding to me and making me look again at the crash report.

Greg

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.