Code Monkey home page Code Monkey logo

Comments (16)

vadimvitvickiy avatar vadimvitvickiy commented on June 12, 2024 1

@v-kpheng currently we're experiencing this issue in our app.
The crash seems to be related to recreating existing OTPublisher, or simply calling OTPublisher = nil.
It might be some other AVCaptureSession configuration code is executing in parallel of deinint for OTPublisher and make it crash.

At first, we had this crash while leaving from the call and niling OTPublisher pointer.
Now we have it sometimes when we have to recreate the session and the OTPublisher while other session is existing. We destroy the session properly before doing so, and the crash seems to be random, not always reproduced.

We could try to test a build with possible fix.

from opentok-ios-sdk-samples.

v-kpheng avatar v-kpheng commented on June 12, 2024

@badarovska, was this issue fixed by iOS SDK 2.25.0? If so, are you seeing regressions in 2.25.2? Can you still reproduce in 2.26.0?

Lastly, do you have steps to reproduce?

from opentok-ios-sdk-samples.

badarovska avatar badarovska commented on June 12, 2024

A similar issue was fixed, but not his one. [AVCaptureSession startRunning] was fixed in 2.25.0. But since 2.25.0 I'm getting a crash for [AVCaptureSession stopRunning]. It was also reported here.

I can confirm that is happening on 2.25.2. Not sure about 2.26.0, since I have not updated to that version yet. I have not been able to reproduce it locally, but I'm getting crash reports on my production app. As far as I can see from the reports it's happening when the call is ended.

from opentok-ios-sdk-samples.

PriyankaThread avatar PriyankaThread commented on June 12, 2024

We are facing the same crash issue with version 2.24.3, So please let us know which version supports it and any possible way to fix it with the same version.
We need to find a solution for the issue This version fixes an issue where it sometimes took longer than expected to disconnect from a session. version 2.24.3 only supports and works with our existing source code, So Can you help us and provide which version have fixed this issue apart from 2.26.1 & 2.25.4 because both version not supported our source code.

from opentok-ios-sdk-samples.

vadimvitvickiy avatar vadimvitvickiy commented on June 12, 2024

Had this issue on the 2.26.1.
We had to stop calling OTPublisher = nil when leaving the call, and it seems to help.
But it's not an ideal solution, and now we have the crash while creating OTSubscriber sometimes.

from opentok-ios-sdk-samples.

v-kpheng avatar v-kpheng commented on June 12, 2024

Apologies for the belated reply. We're tracking this internally: https://jira.vonage.com/browse/VIDCS-1608. It's been added to an upcoming sprint.

from opentok-ios-sdk-samples.

v-kpheng avatar v-kpheng commented on June 12, 2024

No one on the team has been able to reproduce this issue. That said, we have an approach that may help.

Is anyone willing to try out a test build?

from opentok-ios-sdk-samples.

jvalli avatar jvalli commented on June 12, 2024

@vadimvitvickiy What bundle format are you working with? old fat framework or xcframework? So we can share with you a new build.
Also can you share with us some sample of code? Are you performing the following steps?:
1.- create new session
2.- connect to session
3.- create new publisher
4.- start to publish
5.- stop to publish
6.- disconnect from session
7.- cleanup publisher

from opentok-ios-sdk-samples.

vadimvitvickiy avatar vadimvitvickiy commented on June 12, 2024

@jvalli

What bundle format are you working with? old fat framework or xcframework? So we can share with you a new build.

We're using SPM right now, so it either some test SPM build or binary that we can add through it.

Also, I've tracked when the crash first appeared and it exactly in the first version where we've added the first vonage version with SPM support.

Also can you share with us some sample of code? Are you performing the following steps?:

Yes, but with these steps, you also shouldn't wait until callbacks are called for unpublish or session destroy. Right after calling unpublish and disconnect, call publisher = nil.
With those steps, we had no crashes when user would leave the call if we do not nil the publisher, but the crash reproduces now when user switches between sessions. Meaning, we're recreating the publisher when something executing in the framework in parallel, it's my guess.

from opentok-ios-sdk-samples.

jvalli avatar jvalli commented on June 12, 2024

@vadimvitvickiy Why are you destroying the publisher if you are waiting for a callback?
You shouldn't do that, if you send a request to unsubscribe, unpublish or disconnect, the SDK will be trying to use the subscriber, publisher or session objects until the specific callback is received. You can only release memory objects after receive the callback, once the object is not being used any more by the SDK, otherwise you produce an unexpected scenario.

from opentok-ios-sdk-samples.

vadimvitvickiy avatar vadimvitvickiy commented on June 12, 2024

@jvalli Right now, we do not destroy it before all callbacks are called. I mentioned it as a case for crash reproduction.
At the moment, crash is reproduced even if we wait for all the callbacks to be called and then rewrite the publisher pointer with a new one when we need to create a new session after another. Keep in mind that it not reproduces every time, it's randomly crashing after multiple tries.

from opentok-ios-sdk-samples.

jvalli avatar jvalli commented on June 12, 2024

@vadimvitvickiy Can you share a piece of sample code? There should be something else, we are doing the same on our internal apps and there is no crash.
Anyway we have a sanity check fix that you can try on SPM branch bug/VIDCS-1608:

bug:VIDCS-1608

from opentok-ios-sdk-samples.

vadimvitvickiy avatar vadimvitvickiy commented on June 12, 2024

@jvalli

Can you share a piece of sample code?

I could, but I would have to share at least 3 classes in order to show the whole picture.

There should be something else, we are doing the same on our internal apps and there is no crash.

The problem is this crash is hard to reproduce. It could be once per 10–30 tries, could be none at all.

Anyway we have a sanity check fix that you can try on SPM branch bug/VIDCS-1608:

Thank you, we will try it, but it might take some time.

from opentok-ios-sdk-samples.

vadimvitvickiy avatar vadimvitvickiy commented on June 12, 2024

The crash is not reproducing anymore.
When we could expect this fix in the new version of the framework?

from opentok-ios-sdk-samples.

ve-sdk-ios avatar ve-sdk-ios commented on June 12, 2024

Facing the original issue and sometimes we see this stacktrace in our app on version 2.26.2. When the fix will be available?
Screenshot 2023-12-22 at 17 20 04

from opentok-ios-sdk-samples.

vadimvitvickiy avatar vadimvitvickiy commented on June 12, 2024

Version 2.27.0 the crash is still reproduced. Though it is fixed in bug/VIDCS-1608 branch.

from opentok-ios-sdk-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.