This repository was archived by the owner on Aug 11, 2020. It is now read-only.
This repository was archived by the owner on Aug 11, 2020. It is now read-only.
App crashes just after camera preview is shown (Android 6) #609
Open
Description
Expected Behaviour
Camera preview opens, i see myself (in front camera) until I use a QR code.
Actual Behaviour
Camera preview opens, i see myself (in front camera) for 0.5 second, the whole app crashes.
Reproduce Scenario (including but not limited to)
- It happens only on one particular device with Android 6 with only one (front) camera.
- Other camera apps works well on this device.
- Another cordova camera plugin also works well (https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview).
Steps to Reproduce
- It happens every time I run this plugin. With default configuration and also with configuration:
formats: "QR_CODE"
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Android 6.0
Cordova CLI version and cordova platform version
cordova --version : 7.1.0
cordova platforms : android 6.3.0
Plugin version
cordova plugin version | grep phonegap-plugin-barcodescanner : 7.0.2
Logs taken while reproducing problem
(full logcat with other info about camera and formats selected are in attached here
errorLog.txt
)
FATAL EXCEPTION: Thread-496
Process: com.our.packagename.ui, PID: 8391
java.lang.ArrayIndexOutOfBoundsException: src.length=460800 srcPos=461160 dst.length=810000 dstPos=46800 length=1200
at java.lang.System.arraycopy(Native Method)
at com.google.zxing.PlanarYUVLuminanceSource.getMatrix(PlanarYUVLuminanceSource.java:101)
at com.google.zxing.common.HybridBinarizer.getBlackMatrix(HybridBinarizer.java:70)
at com.google.zxing.BinaryBitmap.getBlackMatrix(BinaryBitmap.java:85)
at com.google.zxing.qrcode.QRCodeReader.decode(QRCodeReader.java:77)
at com.google.zxing.MultiFormatReader.decodeInternal(MultiFormatReader.java:171)
at com.google.zxing.MultiFormatReader.decodeWithState(MultiFormatReader.java:85)
at com.google.zxing.client.android.DecodeHandler.decode(DecodeHandler.java:96)
at com.google.zxing.client.android.DecodeHandler.handleMessage(DecodeHandler.java:60)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at com.google.zxing.client.android.DecodeThread.run(DecodeThread.java:110)