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

Android: Image is already closed #92

Open
breyed opened this issue Sep 10, 2024 · 1 comment
Open

Android: Image is already closed #92

breyed opened this issue Sep 10, 2024 · 1 comment

Comments

@breyed
Copy link

breyed commented Sep 10, 2024

In the field, we're often experiencing app frequently crashes on Android stemming from an "Image is already closed" exception.

This is the stack trace from the inner exception.

Java.Lang.IllegalStateException: Image is already closed
  ?, in JniObjectReference StaticMethods.CallStaticObjectMethod(JniObjectReference, JniMethodInfo, JniArgumentValue*)
  ?, in JniObjectReference JniStaticMethods.InvokeObjectMethod(string, JniArgumentValue*)
  ?, in InputImage InputImage.FromMediaImage(Image, int)
  ?, in async Task CameraManager.PerformBarcodeDetection(IImageProxy)

PerformBarcodeDetection (now called DetectBarcode in the latest codebase) is called by AnalyzeFrame. DetectBarcode is an async method but is the call to it is not awaited. This causes the app to crash with TaskExceptionHolder_UnhandledException.

BarcodeScanning.Native.Maui version: 1.5.7

@afriscic
Copy link
Owner

Hello. Should be fixed in next release

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

No branches or pull requests

2 participants