Skip to content
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

Random crashes on screen rotation #1

Closed
ykrapiva opened this issue Nov 12, 2013 · 5 comments
Closed

Random crashes on screen rotation #1

ykrapiva opened this issue Nov 12, 2013 · 5 comments
Assignees
Labels

Comments

@ykrapiva
Copy link

Play with a rotation for a while and you'll get the following:

11-12 23:11:55.200: ERROR/AndroidRuntime(5889): FATAL EXCEPTION: Thread-370
java.lang.IllegalArgumentException: Crop rectangle does not fit within image data.
at com.google.zxing.PlanarYUVLuminanceSource.(PlanarYUVLuminanceSource.java:48)
at com.google.zxing.client.android.camera.CameraManager.buildLuminanceSource(CameraManager.java:339)
at zxing.library.DecodeHandler.decode(DecodeHandler.java:77)
at zxing.library.DecodeHandler.handleMessage(DecodeHandler.java:59)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at zxing.library.DecodeThread.run(DecodeThread.java:97)

I assume if (rotation == Surface.ROTATION_0) and the image data buildLuminanceSource(byte[] data...) get out of sync

@rusfearuth rusfearuth added the bug label Feb 21, 2014
@rusfearuth rusfearuth self-assigned this Feb 21, 2014
@rusfearuth
Copy link
Owner

I'll try to fix that

@mutkan
Copy link

mutkan commented Mar 13, 2014

I also get this exception.

java.lang.IllegalArgumentException: Crop rectangle does not fit within image data.
at com.abhi.barcode.fragment.barcode.PlanarYUVLuminanceSource.(PlanarYUVLuminanceSource.java:46)
at com.google.zxing.client.android.camera.CameraManager.buildLuminanceSource(CameraManager.java:321)
at com.abhi.barcode.fragment.barcode.DecodeHandler.decode(DecodeHandler.java:77)
at com.abhi.barcode.fragment.barcode.DecodeHandler.handleMessage(DecodeHandler.java:57)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:150)
at com.abhi.barcode.fragment.barcode.DecodeThread.run(DecodeThread.java:81)

@woutergoossens
Copy link

Any possible fix?

@rusfearuth
Copy link
Owner

Today, I have some pass time for work around this problem

@rusfearuth
Copy link
Owner

@woutergoossens Could you test this crash? I couldn't repeat bug after updated zxing core to 3.1.

chunlinyao pushed a commit to chunlinyao/zxing-lib-extended that referenced this issue Nov 6, 2014
Fixed issues with front facing cameras
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants