# iOS SDK crash on app background mode

**URL:** <https://devforum.zoom.us/t/ios-sdk-crash-on-app-background-mode/2675>\
**Category:** iOS\
**Created:** [December 7, 2018, 9:07am UTC](https://devforum.zoom.us/t/ios-sdk-crash-on-app-background-mode/2675 "2018-12-07T09:07:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dapeng.li](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@dapeng.li](https://devforum.zoom.us/u/dapeng.li)\
**Post date:** [December 7, 2018, 9:07am UTC](https://devforum.zoom.us/t/ios-sdk-crash-on-app-background-mode/2675/1 "2018-12-07T09:07:21Z")

</div>

Hello,

I have met some crashes with the latest release (v4.1.34076.1024). I’m sure that I had integrated the sdk fellow the documentation.

I had met the same crash with the previous zoom sdk version and I post the issue on the zoom-ios-sdk issue board, but the crash still exist on the latest version.

The crash stack info just like:

> **[Fabric](http://crashes.to/s/229f6057232)**
>
> glTexSubImage2D\_Exec

  

> **[Fabric](http://crashes.to/s/a232845d8c1)**
>
> glrFinishContextResource

Hope you can resolve the issue.

Thanks.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [December 19, 2018, 12:08am UTC](https://devforum.zoom.us/t/ios-sdk-crash-on-app-background-mode/2675/2 "2018-12-19T00:08:25Z")

</div>

Hi Dapeng.li

Thanks for using Zoom SDK and providing your crash reports. By analyzing your reports, the issue here might be the delegate is not set to `nil` while calling back to your instance. Our delegate uses `assign` type, it requires setting to `nil` in `dealloc` like: [[MobileRTC sharedRTC] getMeetingService].delegate = nil;

Hopefully this can resolve your issue. Let me know if you have any other questions. Thanks.

---

<div class="post-metadata">

**Author:** ![dapeng.li](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@dapeng.li](https://devforum.zoom.us/u/dapeng.li)\
**Post date:** [December 19, 2018, 5:19am UTC](https://devforum.zoom.us/t/ios-sdk-crash-on-app-background-mode/2675/3 "2018-12-19T05:19:58Z")

</div>

So It means that I need to set `delegate` to `nil` when the meeting ended? Should I perform this operation on `onMeetingStateChange` or `onMeetingEndedReason`?

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [December 19, 2018, 9:49pm UTC](https://devforum.zoom.us/t/ios-sdk-crash-on-app-background-mode/2675/4 "2018-12-19T21:49:19Z")

</div>

Yes, your instance should have a `dealloc` function like this to deallocates the memory occupied by the receiver:

```auto
- (void)dealloc {
    something something something...
}

```

In the `dealloc` of your instance, set `ZoomSDK delegate` to `nil` like the following:

```auto
- (void)dealloc {
    something something something...
   [[MobileRTC sharedRTC] getMeetingService].delegate = nil;
}

```

---

<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:00pm UTC](https://devforum.zoom.us/t/ios-sdk-crash-on-app-background-mode/2675/5 "2020-08-21T18:00:26Z")

</div>

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


