-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
[Bug] UI Freeze and 'Cannot Access a Disposed Object' Error While Continuously Scanning Barcodes or Repeatedly Scanning a Single Barcode #40
Comments
Hello @thomasgalliker , In the context of BarcodeAnalyze under Android codebase, the current implementation catches exceptions and log it
I’m wondering if this supposed to be throwing the exception |
Thanks for reporting this issue. I have to look at it. |
@HaileyKim04 are you using AppShell or classic navigation? If you find the time to create a small repro app which causes this issue, I‘d be very happy. |
Yes, I am using classic navigation. This is the repository, and I noticed that scanning stops after scanning several barocdes in the repository. |
Hi , just want to say amazing barcode scanning control, unfortunately I am having the same issue: CameraScanner.Maui.BarcodeAnalyzer: Error: Analyze failed with exception System.ObjectDisposedException: Cannot access a disposed object. System.ObjectDisposedException: Cannot access a disposed object. I am using AppShell navigation |
Thanks for reporting 👍🏻 I'm currently bit in pre-release stress but I'm positive we can solve this. |
Is it possible to reproduce with the sample app in this repository? Or can anyone create a super-small sample app which causes this issue? |
Not sure yet but might have found a fix, when i am confident its actually working consistently I can show you what I did. Prolly a threading issue. |
I think because the Analyze method was set to async void along with this line
you were getting a race condition. if you remove the async from the method signature and wrap that above line of code a Task.Run like this:
The problem seems to stop happening. so the entire method looks like this.
public void Analyze(IImageProxy proxyImage)
}
|
Description
This issue arises when scanning a single barcode for an extended period, when the camera stops functioning after multiple scans, or when switching between barcode scanning and unrelated screens (e.g., a barcode image or any random background)**
Steps to Reproduce
CameraView
.Expected Behavior
Actual Behavior
Cannot access a disposed object. Object name: 'AndroidX.Camera.View.Transform.CoordinateTransform'.
Basic Information
Screenshots, Attachments, Links
Cannot access a disposed object. Object name: 'AndroidX.Camera.View.Transform.CoordinateTransform'.
The text was updated successfully, but these errors were encountered: