quickpose/quickpose-ios-sdk

[AVCaptureSession startRunning] startRunning may not be called between calls to beginConfiguration and commitConfiguration'

priyankgandhi0 opened this issue · 8 comments

*** Terminating app due to uncaught exception 'NSGenericException', reason: '*** -[AVCaptureSession startRunning] startRunning may not be called between calls to beginConfiguration and commitConfiguration'

Screenshot 2023-12-05 at 12 33 10 PM

Hi there

Any anyone know why the app crashes sometimes and gets this crash error?

If anyone knows please suggest to me how can i fix this issue

Thank you in advance

It looks like you're starting the same camera twice, or during a config change.

We have set the camera in the subview on the main screen, so features are the camera is subviews hide or show and closed also
can you please check my attachment
Screenshot 2023-12-05 at 3 17 17 PM

Screenshot 2023-12-07 at 5 22 17 PM

When I checked and same test case in your provided demo also got the same crash issue. I will describe the steps here.

Step 1
We added a New Screen ahead in the quick pose camera screen and then Went to the camera screen and went back to again same process we had done more times then suddenly app crashed and got this error below

** Terminating app due to uncaught exception 'NSGenericException', reason: '** -[AVCaptureSession startRunning] startRunning may not be called between calls to beginConfiguration and commitConfiguration'

Step 2

We have added a new view screen after the quick pose camera go ahead click the next screen and come back again same process go next screen and come back again camera screen app crashes and got an error

If anyone knows please suggest to me how can I fix this issue

Thank you in advance

Any solution for this above issue? Please let me know ASAP

Hi

We reached out via our support email last week, this is likely an issue specific to how your code is showing and hiding the camera view. With camera use you have to be careful when hiding views to ensure the camera is only accessed once.

Through our support process we can organise a remote support call where we can debug this issue together, and work on your code which would allow this feature but this would be beyond the community support level we provide on github.

Please reply to our support email directly, or on info@quickpose.ai

Thanks
Peter

We have already contacted email support and they will ask if you want integration support or to resolve the issue then you need to first payment.

Screenshot 2023-12-12 at 9 35 27 AM
Screenshot 2023-12-12 at 9 35 32 AM

The above pictures are my sample code when I come back to the screen and then crash on this try? camera?.start(delegate: quickPose) inside library code crash line is session.startRunning() this our crash test case can you please check out this

Closing this as it's specific to the codebase we reviewed.
In short it's advised to not re-create the camera object and quickpose regularly, keep hold of the object.