Closed MaximG1234 closed 4 months ago
Hmmm, ok strange. I am now starting to see this happen with AimMode=False
too. Could it be my device? Is anyone else seeing this?
Hi There, Do you know whether you're getting the same issue with previous versions of the library?
Hey @nzohrab I havent had a chance to properly test this (including in release mode) to see if this is a new issue. I will post when I have more info.
Hello. Can you please share what device and Android version are you using? It got reported that some devices are more stable than others.
I have new release planned that should probably fix at least some of this camera resetting issues. It turns out that all of the async code messes with code execution order so that ImageProxy
gets disposed multiple times. That throws an ObjectDisposedException
which resets the camera by design. Although it is against the common practice, converting the detection code to sync fixes the issue, and I don't think it will be a problem as the detection code gets run on a background thread anyway.
I just wanted to squeeze in a new feature to save an image from the camera so it'll take a few more days.
Hey @afriscic,
Thanks for the response.
I am using a Samsung A54 running Android 14. I can confirm this issue is occuring with AimMode turned on or off but I also don't believe the issue is happening in release compilation. While I haven't 100% confirmed this, there is usually a screen freeze while the camera reconnects (in debug) which does not appear to occur when in release.
I can also confirm that I have gone back as far as 2-3 versions of the library and it also seems to exist in those versions also.
I will try to provide more information when I have time but given it doesn't appear to be happening in release its probably a somewhat low priority issue.
As you suspected your latest update @afriscic appears to have fixed this problem. I will keep this task open for a few more days to confirm that the problem doesn't come back but almost certain this is resolved.
Thank you!
Firstly, I can't thank you enough for this code. Brilliant work!
There does however appear to be a relatively minor issue with the library (V1.4.3) if I turn on
AimMode=True
.My camera view starts freezing every 10 or so seconds and if I look at the logs I can see the following each time the camera freezes. The application does right itself and it does continue scanning but there is an obvious moment where everything stops working.
This isn't a huge issue for me and if I get a chance I will see if I can resolve it myself but just figured I would report it.
Thanks again for all your effort!
log.txt