Closed tousif-p99soft closed 9 months ago
Hi @tousif-p99soft
Would you like to share your usage scenario by sending us a sample code that can re-produce your freezing issue?
@Dynamsoft-Henry
I have one component with DCVCameraView
and when navigating from this component it takes time to hide and freeze the app, when removing DCVCameraView
then it is working fine.
It is always happened on simulator but on real device sometimes only
@Dynamsoft-Henry
Same issue here.
I don't know exactly. But sometimes app gonna be freeze when use DCVCameraView
.
In my case, It only occurs on real devices.
Hi @tousif-p99soft @badbeoti
Are you using iOS or Android? What's your device model and the simulator model? It helps us debug if you can share your device model or a sample code.
I don't know how you describe "freeze". The open / close of the camera might take some time. Is the freeze permanent or just last for a few seconds?
I am using iPhone 14 Pro simulator
app freezing for approx 20 sec
From: Dynamsoft-Henry @.> Sent: Thursday, May 25, 2023 3:16:13 PM To: Dynamsoft/capture-vision-react-native @.> Cc: Tousif @.>; Mention @.> Subject: Re: [Dynamsoft/capture-vision-react-native] App frozen (Issue #40)
Hi @tousif-p99softhttps://github.com/tousif-p99soft @badbeotihttps://github.com/badbeoti
Are you using iOS or Android? What's your device model and the simulator model? It helps us debug if you can share your device model or a sample code.
I don't know how you describe "freeze". The open / close of the camera might take some time. Is the freeze permanent or just last for a few seconds?
— Reply to this email directly, view it on GitHubhttps://github.com/Dynamsoft/capture-vision-react-native/issues/40#issuecomment-1562607536, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A4TTLCKKXYXQPKXEWMP6IZLXH4S6LANCNFSM6AAAAAAYNHFVPE. You are receiving this because you were mentioned.Message ID: @.***>
Hi @tousif-p99soft @badbeoti
Are you using iOS or Android? What's your device model and the simulator model? It helps us debug if you can share your device model or a sample code.
I don't know how you describe "freeze". The open / close of the camera might take some time. Is the freeze permanent or just last for a few seconds?
I'm using both though but only iOS has error now. Also I mean 'freeze' is seems like totally pause and then turn off. In my opinion, We can found this things when using 'react-native-navigation' with 'DCVCameraView'
@tousif-p99soft @badbeoti We made some attempts on the 'freeze' issue.
What we can re-produce is:
The freeze occurs between 2-3. It last for about 10 seconds on our device (simulator only). Is the issue the same as yours?
This issue is caused by a system method "AVCaptureSession stopRunning". It is a sync method that might block the thread on simulators. Since our SDK is not designed for scanning on the simulator, we prefer to wait for iOS to solve this issue instead of try fixing it on SDK.
We can't re-produce it on real devices. Could you share a screen recording of the issue to describe how you produce it on a real device?
@tousif-p99soft @badbeoti We made some attempts on the 'freeze' issue.
What we can re-produce is:
- Open the camera to scan.
- Close the camera.
- Try re-open the camera.
The freeze occurs between 2-3. It last for about 10 seconds on our device (simulator only). Is the issue the same as yours?
This issue is caused by a system method "AVCaptureSession stopRunning". It is a sync method that might block the thread on simulators. Since our SDK is not designed for scanning on the simulator, we prefer to wait for iOS to solve this issue instead of try fixing it on SDK.
We can't re-produce it on real devices. Could you share a screen recording of the issue to describe how you produce it on a real device?
Unfortunately, in my case, I'm only talking about errors made on real devices. I will upload a related video when I go to work next time.
@Dynamsoft-Henry I'm sorry. We don't have any video about this error now. We will proceed with the test and collect related videos.
@badbeoti No matter. Thanks.
@Dynamsoft-Henry One more observation, if the scanner opens and closes multiple times then suddenly it gets frozen and crashes.
Stack traces which are recorded on Sentry
libsystem_kernel 0x1f8f93f3c psynch_mutexwait
libsystem_pthread 0x20851461c _pthread_mutex_firstfit_lock_wait
libsystem_pthread 0x20850b300 _pthread_mutex_firstfit_lock_slow$VARIANT$armv81
AVFCapture 0x1d67ea6a4 -[AVCaptureSession _buildAndRunGraph:]
AVFCapture 0x1d675891c -[AVCaptureSession _commitConfiguration]
AVFCapture 0x1d6798300 -[AVCaptureVideoPreviewLayer setSession:]
AVFCapture 0x1d6789234 -[AVCaptureSession _removeAllPreviewLayers]
AVFCapture 0x1d6788d7c -[AVCaptureSession _addVideoPreviewLayer:exceptionReason:]
AVFCapture 0x1d6798338 -[AVCaptureVideoPreviewLayer setSession:]
DynamsoftCameraEnhancer0x1047ee170
@badbeoti Thanks, buddy!
I think it is working :)
Now testing more!
The app getting freezing on unmounting, any solution?