Issue 1461 in zxing: BarcodeScanner 4.31 crashes on HTC Sensation running CyanogenMod 9.1.0

77 views
Skip to first unread message

zx...@googlecode.com

unread,
Dec 18, 2012, 3:24:46 AM12/18/12
to zx...@googlegroups.com
Status: New
Owner: ----

New issue 1461 by stefan.h...@gmail.com: BarcodeScanner 4.31 crashes on HTC
Sensation running CyanogenMod 9.1.0
http://code.google.com/p/zxing/issues/detail?id=1461

What steps will reproduce the problem?

1. HTC Sensation (pyramid) running CyanogenMod 9.1.0 (based on Android
4.0.4)
2. Install BarcodeScanner4.31.apk (manual installation or from Google Play)
3. Start application

What is the expected output? What do you see instead?

The application crashes on startup, the stack trace is:

java.lang.ArrayIndexOutOfBoundsException: src.length=460800 srcPos=480240
dst.length=800 dstPos=0 length=800
at java.lang.System.arraycopy(NativeMethod)
at com.google.zxing.m.a(Unknown Source)
at com.google.zxing.b.h.a(Unknown Source)
at com.google.zxing.e.q.b(Unknown Source)
at com.google.zxing.e.q.a(Unknown Source)
at com.google.zxing.i.b(Unknown Source)
at com.google.zxing.i.a(Unknown Source)
at com.google.zxing.cliend.android.h.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at com.google.zxing.client.android.i.run(Unknown Source)


What version of the product are you using? On what operating system?

BarcodeScanner4.31.apk
CyanogenMod 9.1.0 (based on Android 4.0.4)
HTC Sensation (pyramid)


Please provide any additional information below.

BarcodeScanner4.2.apk is working but has a very bad detection rate.
BarcodeScanner4.1.apk is working well.

zx...@googlecode.com

unread,
Dec 18, 2012, 6:19:52 AM12/18/12
to zx...@googlegroups.com
Updates:
Status: NotABug

Comment #1 on issue 1461 by srowen: BarcodeScanner 4.31 crashes on HTC
Sensation running CyanogenMod 9.1.0
http://code.google.com/p/zxing/issues/detail?id=1461

This means the driver is sending bad image data. And this usually because
the driver can send certain preview sizes, but is saying it can send other
sizes, so there's a mismatch. And this is usually because the ROM isn't
customized completely for the device. This doesn't happen AFAICT except on
rooted devices.

zx...@googlecode.com

unread,
Dec 18, 2012, 6:55:52 AM12/18/12
to zx...@googlegroups.com

Comment #2 on issue 1461 by stefan.h...@gmail.com: BarcodeScanner 4.31
crashes on HTC Sensation running CyanogenMod 9.1.0
http://code.google.com/p/zxing/issues/detail?id=1461

It might be true that the driver reports wrong sizes -> no bug in
BarcodeScanner.
But not catching exceptions is definitely a bad practice in BarcodeScanner.
And why are versions 4.2 and 4.1 working, only by accident?

zx...@googlecode.com

unread,
Dec 18, 2012, 9:06:19 AM12/18/12
to zx...@googlegroups.com

Comment #3 on issue 1461 by srowen: BarcodeScanner 4.31 crashes on HTC
Sensation running CyanogenMod 9.1.0
http://code.google.com/p/zxing/issues/detail?id=1461

Maybe, it's not going to function at all anyway. The console shows this
kind of error a few hundred times for the last few releases over 26M active
users; it's not even the most frequent error that comes up due to
(apparently) bad devices.

The newer version chooses from a larger range of preview sizes, which could
be the difference. You can always try changing the source to see if you can
narrow down the problem.

You could compare the list of resolutions this device supports to the
apparent size of the data coming back. 460800 in YUV planar data means
307200 pixels, which probably means 640x480. Compare that to the supported
sizes and the one the app picked and configured (see the logs).

Another usual culprit is that camera parameter X is supposed to be
supproted, but the driver fails on setting it (you can sometimes see this
in the log) but lets the operation proceed -- without actually configuring
the camera. So the configured resolution doesn't match the real one, which
can go back to a default. That could be another reason a seeming unrelated
difference causes this effect.

Reply all
Reply to author
Forward
0 new messages