# Unknown iOS crash

**URL:** <https://devforum.zoom.us/t/unknown-ios-crash/5754>\
**Category:** iOS\
**Created:** [September 2, 2019, 10:24am UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754 "2019-09-02T10:24:43Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![idit.barash](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/idit.barash/32/2636_2.png) [@idit.barash](https://devforum.zoom.us/u/idit.barash)\
**Post date:** [September 2, 2019, 10:24am UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/1 "2019-09-02T10:24:43Z")

</div>

Crash was reported through crashlytics, so I have no specific scenario or description. Please find the crash log here:  
[https://drive.google.com/drive/folders/1VWSdBQAfxtK4upxyWOZ1OKI-j9CzvuFA?usp=sharing](https://drive.google.com/drive/folders/1VWSdBQAfxtK4upxyWOZ1OKI-j9CzvuFA?usp=sharing)

---

<div class="post-metadata">

**Author:** ![jackie.chen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jackie.chen/32/19282_2.png) [@jackie.chen](https://devforum.zoom.us/u/jackie.chen)\
**Post date:** [September 2, 2019, 12:12pm UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/2 "2019-09-02T12:12:17Z")

</div>

Hi Barash,

Can you provide which version sdk report this issue?  
We need this information to address the crash location.

Thanks,  
Jackie

---

<div class="post-metadata">

**Author:** ![idit.barash](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/idit.barash/32/2636_2.png) [@idit.barash](https://devforum.zoom.us/u/idit.barash)\
**Post date:** [September 2, 2019, 12:45pm UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/3 "2019-09-02T12:45:29Z")

</div>

Sorry, it is v4.4.55130.0712

---

<div class="post-metadata">

**Author:** ![Murray\_Li](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/murray_li/32/58_2.png) [@Murray\_Li](https://devforum.zoom.us/u/Murray_Li)\
**Post date:** [September 2, 2019, 1:14pm UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/4 "2019-09-02T13:14:55Z")

</div>

Hi Barash~

I found you crash on “- (void)onMobileRTCLoginReturn:(NSInteger)returnValue”

MobileRTCAuthService \*authService = [[MobileRTC sharedRTC] getAuthService];  
authService.delegate = object;

This is an asynchronous callback.  
please check the object is not dealloc.

Thanks  
Murray

---

<div class="post-metadata">

**Author:** ![idit.barash](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/idit.barash/32/2636_2.png) [@idit.barash](https://devforum.zoom.us/u/idit.barash)\
**Post date:** [September 2, 2019, 1:49pm UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/5 "2019-09-02T13:49:47Z")

</div>

I’m not sure I understand . This is my code:  
func authSDK() {  
if let authServices = MobileRTC.shared().getAuthService() {  
authServices.delegate = self  
authServices.clientKey = kSDKAppKey  
authServices.clientSecret = kSDKAppSecret  
authServices.sdkAuth()  
}  
}

```
func onMobileRTCAuthReturn(_ returnValue: MobileRTCAuthError) {
    print("onMobileRTCAuthReturn \(returnValue)");
    if returnValue != MobileRTCAuthError_Success {
        print("SDK authentication failed, error code: \(returnValue)")
    }
}

```

What should I fix?

---

<div class="post-metadata">

**Author:** ![jackie.chen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jackie.chen/32/19282_2.png) [@jackie.chen](https://devforum.zoom.us/u/jackie.chen)\
**Post date:** [September 3, 2019, 2:02am UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/6 "2019-09-03T02:02:46Z")

</div>

Hi Barash,

Thanks for your reply.  
Do you set the authservices.delegate in Appdelegate?  
You need care of the VC release, If you do this action in some other VC.  
You can see the delegate declaration, we use the assign property for it.  
@property (nullable, assign, nonatomic) id delegate;

Thanks,  
Jackie

---

<div class="post-metadata">

**Author:** ![idit.barash](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/idit.barash/32/2636_2.png) [@idit.barash](https://devforum.zoom.us/u/idit.barash)\
**Post date:** [September 3, 2019, 6:59am UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/7 "2019-09-03T06:59:51Z")

</div>

Hi Jackie,

I’m calling the authSDK in AppDelegate in:  
func application(\_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -\> Bool

I’m calling this before calling authSDK:  
MobileRTC.initialize(withDomain: kSDKDomain, enableLog: true)  
MobileRTC.shared().setMobileRTCRootController(rootController)

Thanks,  
Idit

---

<div class="post-metadata">

**Author:** ![jackie.chen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jackie.chen/32/19282_2.png) [@jackie.chen](https://devforum.zoom.us/u/jackie.chen)\
**Post date:** [September 3, 2019, 11:26am UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/8 "2019-09-03T11:26:23Z")

</div>

Hi Idit,  
Do you have any other information can be provide. Like crash numbers, device count, network status, statistic information?  
We called this callback function asynced in main thread.

Thanks,  
Jackie

---

<div class="post-metadata">

**Author:** ![idit.barash](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/idit.barash/32/2636_2.png) [@idit.barash](https://devforum.zoom.us/u/idit.barash)\
**Post date:** [September 3, 2019, 12:32pm UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/9 "2019-09-03T12:32:33Z")

</div>

It happened 6 times in the last week - iOS 12 and 13 beta. Devices iPhone XR, iPhone 7 and iPhone 6s plus.  
This is all the data I have from the Fabric web site. I don’t know what else I can give you…

---

<div class="post-metadata">

**Author:** ![idit.barash](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/idit.barash/32/2636_2.png) [@idit.barash](https://devforum.zoom.us/u/idit.barash)\
**Post date:** [September 4, 2019, 7:30am UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/10 "2019-09-04T07:30:01Z")

</div>

It now also happens a lot in iOS 11. Please help, this is urgent

---

<div class="post-metadata">

**Author:** ![idit.barash](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/idit.barash/32/2636_2.png) [@idit.barash](https://devforum.zoom.us/u/idit.barash)\
**Post date:** [September 4, 2019, 10:48am UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/11 "2019-09-04T10:48:20Z")

</div>

I now saw in your sample app that you call MobileRTC methods from different AppDelegate methods, like:  
[[MobileRTC sharedRTC] appDidEnterBackgroud];  
from - (void)applicationDidEnterBackground:(UIApplication \*)application.

Is this a must? If I don’t call those methods, could that cause the crash?

---

<div class="post-metadata">

**Author:** ![Murray\_Li](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/murray_li/32/58_2.png) [@Murray\_Li](https://devforum.zoom.us/u/Murray_Li)\
**Post date:** [September 5, 2019, 8:31am UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/12 "2019-09-05T08:31:19Z")

</div>

Hi~  
[[MobileRTC sharedRTC] appDidEnterBackgroud];

this is must~~but that can’t cause crash.

Can you try in our sample code with your key and secret.

We found you crash in auth call back, We guessed that when auth callback came back, your object was destroyed.

---

<div class="post-metadata">

**Author:** ![Murray\_Li](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/murray_li/32/58_2.png) [@Murray\_Li](https://devforum.zoom.us/u/Murray_Li)\
**Post date:** [September 5, 2019, 8:47am UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/13 "2019-09-05T08:47:11Z")

</div>

Hi  
Can you provide a sample code to help us reproduce the problem.

---

<div class="post-metadata">

**Author:** ![idit.barash](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/idit.barash/32/2636_2.png) [@idit.barash](https://devforum.zoom.us/u/idit.barash)\
**Post date:** [September 5, 2019, 8:50am UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/14 "2019-09-05T08:50:32Z")

</div>

The problem is that the crash doesn’t happen every time ☹  
And I sent all the relevant code in my previous answers. I ran your sample with my key and secret and it didn’t crash. But since my crash doesn’t happen every time, it is a little hard to catch.  
Now that you gave me a clear explanation on what you think happens, I’ll investigate more and let you know.

---

<div class="post-metadata">

**Author:** ![Murray\_Li](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/murray_li/32/58_2.png) [@Murray\_Li](https://devforum.zoom.us/u/Murray_Li)\
**Post date:** [September 6, 2019, 2:46am UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/15 "2019-09-06T02:46:06Z")

</div>

ok~Let me know if you’re making any progress.  
The best way is that you can provide a sample project to remove sensitive information to help us reproduce the problem

---

<div class="post-metadata">

**Author:** ![idit.barash](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/idit.barash/32/2636_2.png) [@idit.barash](https://devforum.zoom.us/u/idit.barash)\
**Post date:** [September 8, 2019, 1:20pm UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/16 "2019-09-08T13:20:15Z")

</div>

Hi,

I found the issue. It was a very stupid mistake on my part. I wrote a utility class to handle the Zoom SDK, I referenced to that utility class without making sure it is retained. I solved it by making that class a singleton - it it the best solution for my scenario.

Thank you so much for all your help,  
Idit

---

<div class="post-metadata">

**Author:** ![Murray\_Li](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/murray_li/32/58_2.png) [@Murray\_Li](https://devforum.zoom.us/u/Murray_Li)\
**Post date:** [September 9, 2019, 1:15am UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/17 "2019-09-09T01:15:03Z")

</div>

I’m glad you solved the problem.  
Meeting Happiness.

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 6:40pm UTC](https://devforum.zoom.us/t/unknown-ios-crash/5754/18 "2020-08-21T18:40:54Z")

</div>

Closed on August 21, 2020, 6:40pm UTC


