# EXC\_BAD\_INSTRUCTION (code=EXC\_I386\_INVOP, subcode=0x0) when a user leave the sessions

**URL:** <https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675>\
**Category:** iOS\
**Created:** [January 15, 2021, 11:54am UTC](https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675 "2021-01-15T11:54:52Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [June 29, 2021, 9:24pm UTC](https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675/21 "2021-06-29T21:24:32Z")

</div>

Hey @hisham,

Are you seeing a crash when a user leaves in the latest version of the video sdk?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![hisham](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hisham/32/28620_2.png) [@hisham](https://devforum.zoom.us/u/hisham)\
**Post date:** [June 30, 2021, 2:25am UTC](https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675/22 "2021-06-30T02:25:04Z")

</div>

I have version v1.1.0 (8619.0611) zoom-video-sdk-iOS-1.1.0  
I’m not sure if that’s the latest one or not

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [June 30, 2021, 11:16pm UTC](https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675/23 "2021-06-30T23:16:52Z")

</div>

Hey @hisham,

That is indeed the latest, would you mind sharing your code that is in your onUserLeft callback?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![hisham](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hisham/32/28620_2.png) [@hisham](https://devforum.zoom.us/u/hisham)\
**Post date:** [July 1, 2021, 12:17am UTC](https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675/24 "2021-07-01T00:17:54Z")

</div>

here is it

```auto
 func onUserLeave(_ helper: ZoomVideoSDKUserHelper!, users userArray: [ZoomVideoSDKUser]!) {
        // UserArray contains the users that recently left.
        // Use helper to perform actions on a user.
        if let userArray = userArray {
            for user in userArray {
// print(user)
                // Get User's videoCanvas.
                if let usersVideoCanvas = user.getVideoCanvas() {
                    // Unsubscribe User's videoCanvas to render their video stream.
                    usersVideoCanvas.unSubscribe(with: self.partyCamView)
                }
            }
        }
    }

```

I tried to add a breakpoint on the first line but the crash happens without fire that breakpoint,  
also, the crash error is the following :  
**-[ZoomVideoSDKUserImpl retain]: message sent to deallocated instance**

I think it’s trying to retain a released object

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [July 2, 2021, 7:43pm UTC](https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675/25 "2021-07-02T19:43:13Z")

</div>

Hey @hishaml,

Would you be able to reproduce the crash one last time then do the following:

1. Create an email to [DeveloperSupport@zoom.us](mailto:DeveloperSupport@zoom.us) with a link to this post and a mention of my name
2. Add this code snippet to the email
3. Attach the SDK logs from that instance, instructions for obtaining the logs can be found at the bottom of this page [https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/sdk-initialization](https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/sdk-initialization). The instructions are the same for both the Client SDK and the Video SDK.
4. Attach the .CRASH file from your application to the email as well.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![ibrahim.aljameel](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ibrahim.aljameel/32/27498_2.png) [@ibrahim.aljameel](https://devforum.zoom.us/u/ibrahim.aljameel)\
**Post date:** [August 2, 2021, 7:44pm UTC](https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675/26 "2021-08-02T19:44:28Z")

</div>

Basically,

Error occurs in Device A (IOS version) when execute endSession(false) in Device B

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [August 2, 2021, 10:12pm UTC](https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675/27 "2021-08-02T22:12:11Z")

</div>

Hey @ibrahim.aljameel,

Thanks for using the dev forum!

Are you on the latest version of the SDK?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![ibrahim.aljameel](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ibrahim.aljameel/32/27498_2.png) [@ibrahim.aljameel](https://devforum.zoom.us/u/ibrahim.aljameel)\
**Post date:** [August 2, 2021, 10:12pm UTC](https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675/28 "2021-08-02T22:12:54Z")

</div>

hey @Michael_Condon

yes v1.1.0

---

<div class="post-metadata">

**Author:** ![ibrahim.aljameel](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ibrahim.aljameel/32/27498_2.png) [@ibrahim.aljameel](https://devforum.zoom.us/u/ibrahim.aljameel)\
**Post date:** [August 3, 2021, 5:21pm UTC](https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675/29 "2021-08-03T17:21:22Z")

</div>

hello @Michael_Condon,

Any updates on this Error?

Thank you

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [August 4, 2021, 7:09pm UTC](https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675/30 "2021-08-04T19:09:03Z")

</div>

Hey @ibrahim.aljameel,

No updates quite yet, we are still investigating the issue.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![frkizg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/frkizg/32/32947_2.png) [@frkizg](https://devforum.zoom.us/u/frkizg)\
**Post date:** [November 29, 2021, 10:55pm UTC](https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675/31 "2021-11-29T22:55:04Z")

</div>

Hi, having the same issue using zoom video SDK 1.1.2.  
Are there any updates on possible fixes or workarounds?

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [December 1, 2021, 11:45pm UTC](https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675/32 "2021-12-01T23:45:30Z")

</div>

Hey @frkizg,

1. Create an email to [DeveloperSupport@zoom.us](mailto:DeveloperSupport@zoom.us) with a link to this post and a mention of my name
2. Add this code snippet to the email
3. Attach the SDK logs from that instance, instructions for obtaining the logs can be found at the bottom of this page [https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/sdk-initialization](https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/sdk-initialization). The instructions are the same for both the Client SDK and the Video SDK.
4. Attach the .CRASH file from your application to the email as well.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 12, 2022, 1:36am UTC](https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675/33 "2022-01-12T01:36:14Z")

</div>

Hi @frkizg,

We have identified a fix for this, which will be included in a new release later this month. Please let me know if you are still able to reproduce after updating once that release is available.

In case you weren’t already aware, we will post in #new-releases once the new version is available with a link to our full release notes. 🙂

Thanks!

[Previous page](https://devforum.zoom.us/t/exc-bad-instruction-code-exc-i386-invop-subcode-0x0-when-a-user-leave-the-sessions/40675.md?page=1)
