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

🐛 maxImages (3) has already been acquired, call #close before acquiring more #2288

Closed
3 of 5 tasks
deepakv-z14 opened this issue Dec 14, 2023 · 2 comments · Fixed by #2352
Closed
3 of 5 tasks

🐛 maxImages (3) has already been acquired, call #close before acquiring more #2288

deepakv-z14 opened this issue Dec 14, 2023 · 2 comments · Fixed by #2352
Labels
🐛 bug Something isn't working

Comments

@deepakv-z14
Copy link

What's happening?

application is crashing randomly in production with below error

Fatal Exception: java.lang.IllegalStateException: maxImages (3) has already been acquired, call #close before acquiring more.
       at android.media.ImageReader.acquireNextImage(ImageReader.java:527)
       at android.media.ImageReader.acquireLatestImage(ImageReader.java:411)
       at com.mrousavy.camera.core.CameraSession.configureOutputs$lambda$1(CameraSession.kt:299)
       at android.media.ImageReader$ListenerHandler.handleMessage(ImageReader.java:819)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:264)
       at android.os.HandlerThread.run(HandlerThread.java:67)

Reproduceable Code

const device = useCameraDevice('back');

  const isFocused = useIsFocused();
 
<Camera
          style={StyleSheet.absoluteFill}
          device={device}
          isActive={isFocused}
          ref={scanRef}
          photo={true}
          orientation="portrait"
          onError={onCameraError}
        />

Relevant log output

not available

Camera Device

not available

Device

OPPO CPH2239

VisionCamera Version

3.6.15

Can you reproduce this issue in the VisionCamera Example app?

I didn't try (⚠️ your issue might get ignored & closed if you don't try this)

Additional information

@deepakv-z14 deepakv-z14 added the 🐛 bug Something isn't working label Dec 14, 2023
@deepakv-z14 deepakv-z14 changed the title 🐛 🐛 maxImages (3) has already been acquired, call #close before acquiring more Dec 14, 2023
@mrousavy
Copy link
Owner

mrousavy commented Jan 2, 2024

No output logs available, no camera device available, and no reproduceable sample available - sorry but I cannot help you.

@mrousavy mrousavy closed this as completed Jan 2, 2024
@deepakv-z14
Copy link
Author

@mrousavy #1387 this seems to be same issue. And here we also have logcat output. Does this help?

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

Successfully merging a pull request may close this issue.

2 participants