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

🐛 [4.0.0-beta.10] IllegalArgumentException android.util.Range in <init> #2740

Closed
3 of 5 tasks
mgcrea opened this issue Apr 15, 2024 · 1 comment
Closed
3 of 5 tasks
Labels
🐛 bug Something isn't working

Comments

@mgcrea
Copy link

mgcrea commented Apr 15, 2024

What's happening?

Started to see some unhandled exception popup on Sentry lately, looks like it mostly impact a small subset of devices:

  • Lenovo A2010l36 (Android 5.1)
  • LG-X220 (Android 5.1)

The exact error is IllegalArgumentException lower must be less than or equal to upper in com.mrousavy.camera.core.CameraDeviceDetails in getFormats at line 125 so I guess it should be an easy fix as these device must output some kind of garbage I guess.

Reproduceable Code

const devices = useCameraDevices();
  const device = devices.find(({position}) => position === 'back');
  const format = useCameraFormat(device, Templates.FrameProcessingBarcodeXGA);
    readonly FrameProcessingBarcodeXGA: [{
        readonly videoResolution: {
            readonly width: 1024;
            readonly height: 768;
        };
    }, {
        readonly pixelFormat: "native" | "yuv";
    }];

Relevant log output

IllegalArgumentException lower must be less than or equal to upper

android.util.Range in <init> at line 59
com.mrousavy.camera.core.CameraDeviceDetails in getFormats at line 125
com.mrousavy.camera.core.CameraDeviceDetails in toMap at line 79
com.mrousavy.camera.CameraDevicesManager in getDevicesJson at line 87
com.mrousavy.camera.CameraDevicesManager in sendAvailableDevicesChangedEvent at line 94
com.mrousavy.camera.CameraDevicesManager$initialize$1 in invokeSuspend at line 71
kotlin.coroutines.jvm.internal.BaseContinuationImpl in resumeWith at line 33
kotlinx.coroutines.DispatchedTask in run at line 108
java.util.concurrent.ThreadPoolExecutor in runWorker at line 1112
java.util.concurrent.ThreadPoolExecutor$Worker in run at line 587
java.lang.Thread in run at line 818

Camera Device

Happens on devices in the field on the production release so I don't have them on hand.

Device

Lenovo A2010l36

VisionCamera Version

4.0.0-beta.10

Can you reproduce this issue in the VisionCamera Example app?

No, I cannot reproduce the issue in the Example app

Additional information

@mrousavy
Copy link
Owner

thanks for the report, fixed here: #2755

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants