dlazaro66 / QRCodeReaderView

Modification of ZXING Barcode Scanner project for easy Android QR-Code detection and AR purposes
1.9k stars 491 forks source link

java.lang.NullPointerException in com.google.zxing.common.HybridBinarizer.calculateBlackPoints #86

Closed kiddliu closed 7 years ago

kiddliu commented 8 years ago

And here's another

java.lang.RuntimeException: An error occured while executing doInBackground()
    at android.os.AsyncTask$3.done(AsyncTask.java:300)
    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
    at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
    at java.util.concurrent.FutureTask.run(FutureTask.java:242)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NullPointerException: Attempt to read from null array
    at com.google.zxing.common.HybridBinarizer.calculateBlackPoints(HybridBinarizer.java:184)
    at com.google.zxing.common.HybridBinarizer.getBlackMatrix(HybridBinarizer.java:79)
    at com.google.zxing.BinaryBitmap.getBlackMatrix(BinaryBitmap.java:85)
    at com.google.zxing.qrcode.QRCodeReader.decode(QRCodeReader.java:77)
    at com.google.zxing.qrcode.QRCodeReader.decode(QRCodeReader.java:64)
    at com.dlazaro66.qrcodereaderview.QRCodeReaderView$DecodeFrameTask.doInBackground(QRCodeReaderView.java:323)
    at com.dlazaro66.qrcodereaderview.QRCodeReaderView$DecodeFrameTask.doInBackground(QRCodeReaderView.java:301)
    at android.os.AsyncTask$2.call(AsyncTask.java:288)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    ... 4 more
dlazaro66 commented 8 years ago

It seems an error from Zxing decoding library. Which type of QR code are you trying to decode? Does It happens with every type of QR?