android-vision: Native ocr lib crash
Our app uses text and barcode detection, and a very small minority have been experiencing this crash. I can only see the crash through Google Play and not through our Crashlytics integration. The devices have only been various new-ish Samsung devices running Nougat (both 7 and 7.1), but majority with those same specs have been fine. The crash happens consistently with those users though, and effectively renders our in-app camera non-functional for them.
Is there anything I could do in-app to prevent this or is this a library bug? We do check if the detectors are operational before using them.
native: pc 000000000006fc2c /system/lib64/libc.so (tgkill+8)
native: pc 000000000006cf40 /system/lib64/libc.so (pthread_kill+64)
native: pc 00000000000251f8 /system/lib64/libc.so (raise+24)
native: pc 000000000001ccc4 /system/lib64/libc.so (abort+52)
native: pc 00000000004750d0 /data/data/com.google.android.gms/app_vision/ocr/libs/arm64-v8a/libocr.so
native: pc 0000000000475770 /data/data/com.google.android.gms/app_vision/ocr/libs/arm64-v8a/libocr.so
native: pc 0000000000475814 /data/data/com.google.android.gms/app_vision/ocr/libs/arm64-v8a/libocr.so
native: pc 0000000000474830 /data/data/com.google.android.gms/app_vision/ocr/libs/arm64-v8a/libocr.so
native: pc 000000000026cee4 /data/data/com.google.android.gms/app_vision/ocr/libs/arm64-v8a/libocr.so
native: pc 0000000000271190 /data/data/com.google.android.gms/app_vision/ocr/libs/arm64-v8a/libocr.so
native: pc 0000000000065794 /data/data/com.google.android.gms/app_vision/ocr/libs/arm64-v8a/libocr.so
native: pc 0000000000065488 /data/data/com.google.android.gms/app_vision/ocr/libs/arm64-v8a/libocr.so
native: pc 000000000027caf4 /data/data/com.google.android.gms/app_vision/ocr/libs/arm64-v8a/libocr.so
native: pc 0000000000280274 /data/data/com.google.android.gms/app_vision/ocr/libs/arm64-v8a/libocr.so
native: pc 0000000000067c84 /data/data/com.google.android.gms/app_vision/ocr/libs/arm64-v8a/libocr.so
native: pc 0000000000067f64 /data/data/com.google.android.gms/app_vision/ocr/libs/arm64-v8a/libocr.so
native: pc 0000000000063dec /data/data/com.google.android.gms/app_vision/ocr/libs/arm64-v8a/libocr.so
native: pc 000000000038c5e0 /data/user_de/0/com.google.android.gms/app_chimera/m/0000002b/oat/arm64/DynamiteModulesA_GmsCore_prodmnc_xxhdpi_release.odex
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 7
- Comments: 98 (12 by maintainers)
we are losing so many users oh god could you please hurry up this is really destroying our app
It’s currently in beta channel and will roll out in the following weeks, you cannot force your App use the beta Google Play Services. At the meantime I’d suggest disable the OCR feature on devices that may crash.
Again we apologize for the crash. We do have unit tests, but unfortunately we didn’t run these tests on all devices.
Two questions:
I feel like Google needs to put out an emergency fix for this. Please do something!
Obviously Google doesn’t care about it’s API user base. If they did they would have put out an emergency fix on day 1. I’ve lost all faith in Google.
After this we also need a post mortem. How can a trivially reproducible bug get through QA? If Google just ran a very basic unit test on all CPU architectures they would have caught this. Given the number of apps and devices using this library, how come that has not been done? How come the faulty version gets rolled out to more devices after the bug has been identified?
Hi, we apologize for the native crash, this is a know issue that happens on Samsung Exynos arm64 devices with Google Play services version 10.7.x. It will be fixed in the next Google Play Services release.
Day by day its bigger the number of crashing devices, is there a way for a downgrade? please let us know about an ETA on the next Google Play Services release
@liuyl this is the only free and efficient service that I have found for my application and the fact that it was a Google own library gave my application a little extra, my app works with the Text Recognizer as main feature, my boss still asks for a release date for the new Google Play Services, please I’m only asking for an estimated date, could you please give us an estimated date?
Any progress? the list of devices crashing is getting bigger and bigger each day. A lot of the users are rating our app with a 1 star vain.
Do we have an ETA on the next Google Play Services release this is affecting an upcoming release for my team.
@raulsb The release is rolling out slowly, some devices already get the fix in the past weeks. The best estimation I can give is we plan to push to 100% by end of the year.
When will it go into production?? Still baffles me that Google can roll out software without Unit testing this stuff!
@radunicolescu : Yes we can’t detect native crash in try catch block and device list was also not much helpful in my case. Thats why i have used Preference concept to solve this. Please have a look here
did that latest push of there’s fix this issue? I’m shocked that Google cant even Unit test this stuff!
The same problem on Huawei P9. Is there any solution to resolve this problem (not disable text recognition)?
Hello! I’m still getting the issue on Asus ZenFone 5 (A501CG)
E/native: jni_helper.cc:170 GetContents failed: /data/data/com.google.android.gms/app_vision/ocr/data/models/rpn_lstm_engine_tfmini.bincfg E/native: jni_helper.cc:170 GetContents failed: /data/data/com.google.android.gms/app_vision/ocr/data/models/semanticlift_engine_0.2.bincfg
Can you please check and fix the issue? Thank you
@liuyl Can you give me the list of devices that have been updated Google Play Services. I can unblock them on the Google Play Store. Thanks!
Too long time to fix the problem 😦 We are still looking forward to the new version.
There are 2 different play services and this might increase the confusion:
On Google Play Services version 10.7.x you may see crashes when using Text API on Samsung Exynos arm64 devices. This is a known issue and will be fixed in the next release.
Since both the play services application and the play services library are well above the 10.7.x version and this issue bug is still there I think what we actually wait for is a new release of the google vision library that fixes this bug.
Google Vision library releases can be followed here https://developers.google.com/vision/android/release-notes
I am also waiting for a fix on this issue. Maybe there is someone that can give us a rough estimation about when this is going to be fixed. If the fix will take a long time maybe some developers will choose to switch to alternative solutions.
For it’s currently getting worse and not better. Looks like they are pushing the faulty release to more users.
Here’s the code we use to disable the feature on affected devices.
` private static HashSet<String> deviceWithDisabledTextCheck = new HashSet<>(); static { deviceWithDisabledTextCheck.add(“j7elte”); deviceWithDisabledTextCheck.add(“hero2lte”); deviceWithDisabledTextCheck.add(“zeroflte”); deviceWithDisabledTextCheck.add(“herolte”); deviceWithDisabledTextCheck.add(“j7xelte”); deviceWithDisabledTextCheck.add(“zerolte”); deviceWithDisabledTextCheck.add(“on7xelte”); deviceWithDisabledTextCheck.add(“a5xelte”); deviceWithDisabledTextCheck.add(“a3xelte”); deviceWithDisabledTextCheck.add(“j7e3g”); deviceWithDisabledTextCheck.add(“a5y17lte”); deviceWithDisabledTextCheck.add(“zerofltevzw”); deviceWithDisabledTextCheck.add(“s5neolte”); deviceWithDisabledTextCheck.add(“on5xelte”); deviceWithDisabledTextCheck.add(“noblelte”); deviceWithDisabledTextCheck.add(“zenlte”); deviceWithDisabledTextCheck.add(“j7eltetmo”); deviceWithDisabledTextCheck.add(“zerofltespr”); deviceWithDisabledTextCheck.add(“nobleltevzw”); deviceWithDisabledTextCheck.add(“zeroflteatt”); deviceWithDisabledTextCheck.add(“a3y17lte”); deviceWithDisabledTextCheck.add(“zerofltetmo”); deviceWithDisabledTextCheck.add(“marinelteatt”); deviceWithDisabledTextCheck.add(“j7eltemtr”); deviceWithDisabledTextCheck.add(“j3popeltemtr”); deviceWithDisabledTextCheck.add(“nobleltetmo”); deviceWithDisabledTextCheck.add(“heroltebmc”); deviceWithDisabledTextCheck.add(“a7y17lte”); deviceWithDisabledTextCheck.add(“zerofltebmc”); deviceWithDisabledTextCheck.add(“a7xelte”); deviceWithDisabledTextCheck.add(“nobleltespr”); deviceWithDisabledTextCheck.add(“s5neoltecan”); deviceWithDisabledTextCheck.add(“noblelteatt”); deviceWithDisabledTextCheck.add(“zeroltetmo”); deviceWithDisabledTextCheck.add(“zeroltevzw”); deviceWithDisabledTextCheck.add(“zerolteatt”); deviceWithDisabledTextCheck.add(“j5y17lte”); deviceWithDisabledTextCheck.add(“zenltevzw”); deviceWithDisabledTextCheck.add(“zenltetmo”); deviceWithDisabledTextCheck.add(“hero2ltebmc”); deviceWithDisabledTextCheck.add(“j7y17lte”); deviceWithDisabledTextCheck.add(“j3popeltetmo”); deviceWithDisabledTextCheck.add(“zenlteatt”); deviceWithDisabledTextCheck.add(“zeroltespr”); deviceWithDisabledTextCheck.add(“a5y17ltecan”); deviceWithDisabledTextCheck.add(“zeroltebmc”); deviceWithDisabledTextCheck.add(“j7popeltemtr”); deviceWithDisabledTextCheck.add(“zeroflteusc”); deviceWithDisabledTextCheck.add(“zerofltemtr”); deviceWithDisabledTextCheck.add(“zerofltetfnvzw”); deviceWithDisabledTextCheck.add(“j3popelteatt”); deviceWithDisabledTextCheck.add(“j7popeltetmo”); deviceWithDisabledTextCheck.add(“zenltespr”); deviceWithDisabledTextCheck.add(“gtaxlwifi”); deviceWithDisabledTextCheck.add(“j3y17lte”); deviceWithDisabledTextCheck.add(“nobleltebmc”); deviceWithDisabledTextCheck.add(“zeroflteaio”); deviceWithDisabledTextCheck.add(“j7velte”); deviceWithDisabledTextCheck.add(“a8xelte”); deviceWithDisabledTextCheck.add(“noblelteusc”); deviceWithDisabledTextCheck.add(“zerofltechn”); deviceWithDisabledTextCheck.add(“j7popelteatt”); deviceWithDisabledTextCheck.add(“j7xeltecmcc”); deviceWithDisabledTextCheck.add(“zeroltechn”); deviceWithDisabledTextCheck.add(“gtaxllte”); deviceWithDisabledTextCheck.add(“xcover4lte”); deviceWithDisabledTextCheck.add(“j3popelteaio”); deviceWithDisabledTextCheck.add(“noblelteskt”); deviceWithDisabledTextCheck.add(“nobleltehk”); deviceWithDisabledTextCheck.add(“on7elte”); deviceWithDisabledTextCheck.add(“zeroflteskt”); deviceWithDisabledTextCheck.add(“zerolteusc”); deviceWithDisabledTextCheck.add(“nobleltelgt”); deviceWithDisabledTextCheck.add(“gvlteatt”); deviceWithDisabledTextCheck.add(“nobleltektt”); deviceWithDisabledTextCheck.add(“zeroflteacg”); deviceWithDisabledTextCheck.add(“a7xeltextc”); deviceWithDisabledTextCheck.add(“zerofltektt”); deviceWithDisabledTextCheck.add(“j7xlte”); deviceWithDisabledTextCheck.add(“herolteskt”); deviceWithDisabledTextCheck.add(“zerofltelra”); deviceWithDisabledTextCheck.add(“zenltebmc”); deviceWithDisabledTextCheck.add(“j7popelteaio”); deviceWithDisabledTextCheck.add(“hero2lteskt”); deviceWithDisabledTextCheck.add(“zerofltelgt”); deviceWithDisabledTextCheck.add(“zerolteskt”); deviceWithDisabledTextCheck.add(“j5y17ltedx”); deviceWithDisabledTextCheck.add(“a5xeltextc”); deviceWithDisabledTextCheck.add(“heroltektt”); deviceWithDisabledTextCheck.add(“noblelteacg”); deviceWithDisabledTextCheck.add(“j3popeltetfntmo”); deviceWithDisabledTextCheck.add(“zerolteacg”); deviceWithDisabledTextCheck.add(“heroltelgt”); deviceWithDisabledTextCheck.add(“zeroltektt”); deviceWithDisabledTextCheck.add(“hero2ltektt”); deviceWithDisabledTextCheck.add(“zeroltelra”); deviceWithDisabledTextCheck.add(“zenlteusc”); deviceWithDisabledTextCheck.add(“hero2ltelgt”); deviceWithDisabledTextCheck.add(“nobleltelra”); deviceWithDisabledTextCheck.add(“zeroltelgt”); deviceWithDisabledTextCheck.add(“j3popelteue”); deviceWithDisabledTextCheck.add(“j7xeltektt”); deviceWithDisabledTextCheck.add(“dream2lte”); deviceWithDisabledTextCheck.add(“a3xeltekx”); deviceWithDisabledTextCheck.add(“a8xelteskt”); deviceWithDisabledTextCheck.add(“a7xeltektt”); deviceWithDisabledTextCheck.add(“dreamlte”); deviceWithDisabledTextCheck.add(“a5y17lteskt”); deviceWithDisabledTextCheck.add(“j7popelteue”); deviceWithDisabledTextCheck.add(“gtanotexllte”); deviceWithDisabledTextCheck.add(“zenlteskt”); deviceWithDisabledTextCheck.add(“matisse10wifikx”); deviceWithDisabledTextCheck.add(“a7xelteskt”); deviceWithDisabledTextCheck.add(“a5y17ltektt”); deviceWithDisabledTextCheck.add(“a7xeltelgt”); deviceWithDisabledTextCheck.add(“gtanotexlwifikx”); deviceWithDisabledTextCheck.add(“a5xelteskt”); deviceWithDisabledTextCheck.add(“a5y17ltelgt”); deviceWithDisabledTextCheck.add(“gracelte”); deviceWithDisabledTextCheck.add(“zenltektt”); deviceWithDisabledTextCheck.add(“xcover4ltecan”); deviceWithDisabledTextCheck.add(“a5xeltektt”); deviceWithDisabledTextCheck.add(“on7xelteskt”); deviceWithDisabledTextCheck.add(“gracerlteskt”); deviceWithDisabledTextCheck.add(“on7xeltelgt”); deviceWithDisabledTextCheck.add(“zerofltexx”); deviceWithDisabledTextCheck.add(“zenltelgt”); deviceWithDisabledTextCheck.add(“a5xeltelgt”); deviceWithDisabledTextCheck.add(“on7xeltektt”); deviceWithDisabledTextCheck.add(“gvwifiue”); deviceWithDisabledTextCheck.add(“dreamlteks”); deviceWithDisabledTextCheck.add(“gracerltektt”); deviceWithDisabledTextCheck.add(“a7xeltecmcc”); deviceWithDisabledTextCheck.add(“a5xeltecmcc”); deviceWithDisabledTextCheck.add(“gvltevzw”); deviceWithDisabledTextCheck.add(“gracerltelgt”); deviceWithDisabledTextCheck.add(“j5y17ltektt”); deviceWithDisabledTextCheck.add(“j7popelteskt”); deviceWithDisabledTextCheck.add(“zenltechn”); deviceWithDisabledTextCheck.add(“nobleltechn”); deviceWithDisabledTextCheck.add(“j5y17ltelgt”); deviceWithDisabledTextCheck.add(“a7y17lteskt”); deviceWithDisabledTextCheck.add(“j5y17lteskt”); deviceWithDisabledTextCheck.add(“j7y17ltektt”); deviceWithDisabledTextCheck.add(“gracelteskt”); deviceWithDisabledTextCheck.add(“dream2qltesq”); deviceWithDisabledTextCheck.add(“gtaxlltekx”); deviceWithDisabledTextCheck.add(“gvlte”); deviceWithDisabledTextCheck.add(“dream2qltechn”); deviceWithDisabledTextCheck.add(“hero2ltexx”); deviceWithDisabledTextCheck.add(“graceqltechn”); deviceWithDisabledTextCheck.add(“gtesveltevzw”); deviceWithDisabledTextCheck.add(“heroltexx”); deviceWithDisabledTextCheck.add(“j3y17ltelgt”); deviceWithDisabledTextCheck.add(“gtanotexlltekx”); deviceWithDisabledTextCheck.add(“graceltektt”); deviceWithDisabledTextCheck.add(“nobleltedcm”); deviceWithDisabledTextCheck.add(“graceltelgt”); deviceWithDisabledTextCheck.add(“j7popeltetfntmo”); deviceWithDisabledTextCheck.add(“zeroltexx”); deviceWithDisabledTextCheck.add(“zenltekx”); deviceWithDisabledTextCheck.add(“dream2qltecan”); deviceWithDisabledTextCheck.add(“zerofltectc”); deviceWithDisabledTextCheck.add(“j5y17ltextc”); deviceWithDisabledTextCheck.add(“nobleltejv”); deviceWithDisabledTextCheck.add(“graceltexx”); deviceWithDisabledTextCheck.add(“zerofltedcm”); deviceWithDisabledTextCheck.add(“graceqltetmo”); deviceWithDisabledTextCheck.add(“shamu”); deviceWithDisabledTextCheck.add(“dream2lteks”); deviceWithDisabledTextCheck.add(“zeroltesbm”); deviceWithDisabledTextCheck.add(“j700lte”); deviceWithDisabledTextCheck.add(“gvltexsp”); deviceWithDisabledTextCheck.add(“f5121”); deviceWithDisabledTextCheck.add(“gts210vewifi”); deviceWithDisabledTextCheck.add(“a9xltechn”); deviceWithDisabledTextCheck.add(“so-02j”); deviceWithDisabledTextCheck.add(“f5321”); deviceWithDisabledTextCheck.add(“gts28vewifi”); deviceWithDisabledTextCheck.add(“zerofltexx-user”); deviceWithDisabledTextCheck.add(“gts210velte”); deviceWithDisabledTextCheck.add(“asus_a001”); deviceWithDisabledTextCheck.add(“cph1611”); deviceWithDisabledTextCheck.add(“kate”); deviceWithDisabledTextCheck.add(“pb2pro”); deviceWithDisabledTextCheck.add(“f5122”); }
@liuyl thanks for answering on this. If you know, can you tell us the approximate date/month of the next Google Play Services release?
@nhattv18 sorry it was the list of crashing devices.
@liuyl
Can you help understand what this means exactly? Once a release of the library with fix is ready we don’t need to update the dependency on our application and create a release?
All I can do right now is disable OCR feature on listed devices as @Yrlec, thank you, and also alert all other users that this feature might causes terrible crashes 😦
This issue got me lots of 1 star, so sad! Hope Google team is going to fix soon.
@liuyl how do we use it in our app ?
Only in beta Channel or it’s already production released?
@barmic12 for me it’s still working. which google play service version are you using. i am on 11.9.45 which released yesterday.
looks like Clearing All Data of Google Play service worked for me at least for now.
i don’t know why carshes numbers is getting bigger and bigger! i was only seeing few crashes on few devices now almost all new users are getting that error !
This happened for us all of a sudden. It was working a few weeks ago. We didn’t change anything. Why would that be?
@barmic12 Also on Huawei P9 plus with these details:
System on Chip HiSilicon KIRIN955 (Kirin 955)
CPU 4x ARM Cortex-A72 (2500 Mhz) 4x ARM Cortex-A53 (1800 Mhz)
GPU ARM Mali T880 (900 Mhz)
@liuyl We have done the suggested excluding of devices but there seem to be more, all of which are demoting the rating of the application to 1 star. Any chance you have a list with more affected devices?
I am facing the same problem while instantiating TextRecognizer object in a Samsung s7 and s8. Is there any way to prevent the app crash if the device doesn’t support the TextRecognizer? I was expecting something like a try-catch to handle the problem.
Thanks in advance
I have same problem. Many users have uninstalled and 1 star rating 😦 Please fix it soon. Thanks!
This only affects text recognition API.
@liuyl Thanks for getting back to us. Can you confirm if this affects just text recognition or other detectors as well? We use both text and barcode detection, so we paused both off after the bug, but we’d like to still scan for barcodes if that won’t crash anything.