JimmyPun610 / BarcodeScanner.Mobile

Barcode Scanner using GoogleVision API for Xamarin Form, Maui
MIT License
326 stars 96 forks source link

BarcodeScanner stops detect after some time #243

Open MateusMiotto opened 2 weeks ago

MateusMiotto commented 2 weeks ago

Describe the bug After an indeterminate amount of time, Barcode detection simply does not happen. I didn't get anything different in the log, just the usual: [UseCaseAttachState] Active and attached use case: [androidx.camera.core.Preview-d8c6eaeb-2536-4024-99fa-912bef01aeb1128811641, androidx.camera.core.ImageAnalysis-a1ea55de-92b1-473a-95d1-b0a97f9ffe90219505695] for camera: 1 [CaptureSession] Attempting to submit CaptureRequest after setting [CaptureSession] Issuing request for session.

In my tests, after approximately 1~2 hours the detection simply stopped.

To Reproduce I uploaded a project based on the library example, with MVVM sample (even in code behind the bug persists)

Steps to reproduce the behavior:

  1. Clone and restore packages of https://github.com/MateusMiotto/BarcodeScanner
  2. Run the project
  3. Wait a certain amount of time without making the detection, (for me 1~2 hours without taking any reading) and the detection simply stops happening and without any error in logs

Expected behavior The component, even with the camera open performing the detection, even without detecting any barcode for hours, does not stop scanning

Smartphone (please complete the following information):

ManuLin commented 2 days ago

I am facing the same issue Mateus mentioned. After a random amount of time, the scanner seems to stop scanning without an exception being thrown. Any hints are highly appreciated. We are using the "BarcodeScanner.Mobile.Maui" package in version 8.0 and can observe the issue on Android devices as well.