Reputation: 6335
I am using zxing library
for my app which has barcode functionality. My App is running fine on Samsung Galaxy S and S2
. But When I run my app on large screen device like Samsung Galaxy
Note
it throws following exception.
07-28 14:46:34.948: W/System.err(1238): java.lang.ArrayIndexOutOfBoundsException: src.length=460800 srcPos=461194 dst.length=101850 dstPos=74787 length=291
07-28 14:46:34.948: W/System.err(1238): at java.lang.System.arraycopy(Native Method)
07-28 14:46:34.948: W/System.err(1238): at com.google.zxing.client.android.PlanarYUVLuminanceSource.getMatrix(PlanarYUVLuminanceSource.java:105)
07-28 14:46:34.948: W/System.err(1238): at com.google.zxing.common.HybridBinarizer.binarizeEntireImage(Unknown Source)
Does anyone know what is causing that problem. Is it because of large screen of galaxy note and its camera. Anyone experience same problem before?
Thanks in advance
Upvotes: 1
Views: 1338
Reputation: 66881
This means you expect the preview data to be bigger than it is. I would look at what you changed from the code you copied, related to the selected preview size, since the app definitely correctly handles any size. (We don't recommend you copy and paste code like this. This wouldn't happen if you use Intents. http://code.google.com/p/zxing/wiki/ScanningViaIntent)
Upvotes: 1