opentok / opentok-ios-sdk-samples-swift

Sample applications using the OpenTok iOS SDK in Swift
https://tokbox.com/
MIT License
137 stars 65 forks source link

the latest iOS OpenTok SDK( 2.19.0) crash: Collection <NSDictionaryM: 0x28178b2c0> was mutated while being enumerated #146

Closed Lebron1992 closed 1 year ago

Lebron1992 commented 3 years ago

When the host, celebrity and fan are online, if we kick the fan and then kick the host right away from IBS, the iOS app using OpenTok(2.19.0) will crash with a big probability. But the version 2.18.1 works great! The crash error message is: Collection <NSDictionaryM: 0x28178b2c0> was mutated while being enumerated. We printed out the object Collection <NSDictionaryM: 0x28178b2c0>, it shown that:

{
    "44B646E2-178E-4859-95E2-F4F254A51EAF" = "<OTSubscriber: 0x2814b1ef0>";
    "BEEFA58C-8768-4CAD-AB66-94D3B71BCAD2" = "<OTSubscriber: 0x2814a40f0>";
}

Stack trace: WechatIMG42

We haven't store the subscribers as the structure above in our code. So we thought the crash was from OpenTok SDK.

Could you check the SDK code? Thanks!

Tomomir commented 3 years ago

We've encountered similar issue after upgrading to version 2.19.0

lucas-tl commented 3 years ago

@willyaranda is this in your radar? I am seeing a surge of this crash. The SDK version is 2.19.0.

enasaz9 commented 3 years ago

same happened with me

lucas-tl commented 3 years ago

@jvalli @mheap @abdulajet can you perhaps take a look at this crash? It's critical and it has been an issue for over a month. We have impact in production for a massive number of users.

abdulajet commented 3 years ago

version 2.19.1 is out now, which should fix this crash. can you give it a go @lucas-tl ?

edit: I was mistaken, the fix is still with engineering at the moment

DusanStjepanovic commented 3 years ago

@abdulajet We are still getting this crash on 2.19.1 for 5% of users, so it really is critical, had to revert to 2.18.1. We did not manage to reproduce it but here is crash report

Screenshot 2021-04-21 at 09 38 39
lucas-tl commented 3 years ago

@abdulajet Adding some context just in case it helps. In our case, the crash occurs when another user in the video call stops sharing their screen. There seems to be no problem and screensharing seems to work just fine before that point. So, it's the "stop screen sharing" what's triggering it, as far as I can see.

abdulajet commented 3 years ago

Can you try 2.20.0

DusanStjepanovic commented 3 years ago

We still have this issue with 2.20.0. To be fair it happens less frequently, but still we had 17 crashes this week.

abdulajet commented 3 years ago

@DusanStjepanovic can you share a trace or file a support ticket please https://support.tokbox.com/hc/en-us