WeTransfer / WeScan

Document Scanning Made Easy for iOS
MIT License
2.87k stars 561 forks source link

I get thread safety check from `CaptureSessionManager` #380

Closed sami79031 closed 5 months ago

sami79031 commented 7 months ago

That happens almost every time I start the ImageScannerController. I'm using it from the SwiftUI context iOS 16. Nothing special.

-[AVCaptureSession startRunning] should be called from background thread. Calling it on the main thread can lead to UI unresponsiveness

Screenshot 2024-03-28 at 6 37 55 PM
BasThomas commented 7 months ago

Thanks for opening an issue! Would you want to try and tackle this by opening a pull request? :)

Sounds like we don't need / want the DispatchQueue.main.async here.

gantaa commented 6 months ago

I was in the process of creating a PR to contribute for this because I am also seeing the log on latest WeScan code. But then I saw this:

https://github.com/WeTransfer/WeScan/commit/699b7477deb3dd3d47b54693021cceffab8dde81

It looks like the correct code for this fix. It is committed to master, and yet I still see the log appear when using WeScan 3.0.0

Any ideas @BasThomas or @hajunho?

BasThomas commented 6 months ago

3.0.0 does not include the changes present on the main branch. Can you update your reference to be the main branch rather than 3.0.0, to see if the issue is still present then? We can look into creating a new release from there.

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 30 days with no activity. Remove the Stale label or comment or this will be closed in 10 days.