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

fix: maxImages when frameprocessor error #2430

Merged
merged 2 commits into from
Jan 25, 2024
Merged

Conversation

danieloprado
Copy link
Contributor

What

This PR prevent crash and cause maxImages (3) has already been acquired when FrameProcessor throws an error.

Changes

Call image.close() when FrameProcessor throws an error.

Tested on

Motorola Edge 40 Neo.

Related issues

Maybe releated to: #2288

Copy link

vercel bot commented Jan 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-vision-camera ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 25, 2024 5:17pm

@mrousavy
Copy link
Owner

Ahhh, nice catch!! lol I missed that. Nice PR! thank you

@mrousavy
Copy link
Owner

LGTM! (just pushed a change that uses try/finally for more safety)

@mrousavy mrousavy merged commit 7e2889c into mrousavy:main Jan 25, 2024
3 of 4 checks passed
isaaccolson pushed a commit to isaaccolson/deliveries-mobile that referenced this pull request Oct 30, 2024
…usavy#2430)

* fix: maxImages when frameprocessor error

* fix: Use `try`/`finally` for safety

---------

Co-authored-by: Marc Rousavy <me@mrousavy.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants