-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Barcode / QRCode] Crash NewStringUTF with libart.so #44
Comments
Thanks for reporting. Firebase / Google will take a look. Sounds like firebase/quickstart-android#2 has a consistent way to repro? Do you know if there's a consistent way to repro issue firebase/quickstart-android#1? Thanks! |
Hi, Great. Thanks for taking this issue in account. For the first crash, it is complicated because the Galaxy S5 is on LineageOS 14.1 (Android 7.1.2). This is the only device with which I have this issue. |
Hi, we have the same issue. The issue arise when reading non-utf8 encoded datamatrix. In our case we are trying to read Latin1 resp. ISO 8859-1 encoded strings from datamatrix. I think this is also the same issue: googlesamples/android-vision#151 As suggested in the linked github issue, it would be sufficient to provide access to the raw byte array from the datamatrix, so that the application can choose the encoding itself. |
Hi all. We have been able to reproduce this bug internally on some Samsung devices and are working on a fix, thanks for your patience. |
@samtstern : Any update or release regarding this issue? I can find the same issue in both MLKit and Android Mobile Vision |
We are also experiencing this issue and find that it is a significant problem for us. Any update would be welcome. |
We are also have the same issue and it's of vital importance. Until this fixes, is there any workaround? |
Is this issue solved? |
Hi everyone, can somebody that has access to the native code at least add a try/catch statement or something like that to the code that is trying to convert the bytes to a String representation? Here you can see that its code is calling the same GMS classes
Attached is a more detailed log if somebody wants to dig deeper |
Hi @samtstern it has been almost a year since you said this https://github.com/firebase/quickstart-android/issues/542#issuecomment-415075156 can you please let us know if at least you guys can add the option to the ML Kit for setting the reader to only return the detected byte[] and let us do the parsing/encoding? |
Alguien ya encontró una solución para esto? |
Hi, I came across this when trying to use ML kit to scan some barcodes. Its a really brilliant scanning library, but this issue stops it being used for some complex applications I dont know if its an issue with converting between encoding or if it cant decode some 8 bit characters Hope this helps, Garry |
@GarryKelly, it doesn't surprise me if the returned string contains fewer characters – the library is trying to interpret the characters as UTF-8, and characters with the highest-order bit set (which are not valid ASCII characters) are interpreted as part of a multi-byte sequence. Some of those characters runs might form a valid Unicode codepoint, but others don't, and the invalid sequences are likely ignored. AFAICT, the crash issue originally reported has been fixed since some time late 2019; the library doesn't call |
Hi all,
The native library libart.so used by ML is crashing. As far as I know, there are 2 ways to crash:
Both are the used of NewStringUTF without check to string before?
Please find below the 2 crash stacks. Both are generated with Vision API but it is excatly the same with ML sample application and I think this repository will be more followed than old vision API.
As a reminder, the link to the original issue from googlesamples/android-vision repo:
googlesamples/android-vision#221
The text was updated successfully, but these errors were encountered: