# Crash when removing earphones

**URL:** <https://devforum.zoom.us/t/crash-when-removing-earphones/85880>\
**Category:** Android\
**Created:** [April 3, 2023, 7:26am UTC](https://devforum.zoom.us/t/crash-when-removing-earphones/85880 "2023-04-03T07:26:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sohel-skylark](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sohel-skylark/32/47096_2.png) [@sohel-skylark](https://devforum.zoom.us/u/sohel-skylark)\
**Post date:** [April 3, 2023, 7:26am UTC](https://devforum.zoom.us/t/crash-when-removing-earphones/85880/1 "2023-04-03T07:26:11Z")

</div>

**Description**  
Zoom SDK throws an NPE causing the app to crash after removing headphones when the session is ended.

**Which Android Video SDK version?**  
1.6.0

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Start a session and connect earphones
2. Unmute the microphone to test audio is working
3. End session
4. Remove headphones

**Smartphone (please complete the following information):**

- Device: Nokia T10
- OS: Android 12

**Additional context**  
Video SDK V1.6.0

Stack trace

```auto
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean us.zoom.internal.RTCConference.isInConference()' on a null object reference
       at us.zoom.androidlib.util.HeadsetUtil.b(HeadsetUtil.java:10)
       at us.zoom.androidlib.util.HeadsetUtil.a(HeadsetUtil.java:60)
       at us.zoom.androidlib.util.HeadsetUtil.a(HeadsetUtil.java:2)
       at us.zoom.androidlib.util.HeadsetUtil$c.run(HeadsetUtil.java:1)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:201)
       at android.os.Looper.loop(Looper.java:288)
       at android.app.ActivityThread.main(ActivityThread.java:7941)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:553)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

```

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [April 3, 2023, 7:05pm UTC](https://devforum.zoom.us/t/crash-when-removing-earphones/85880/2 "2023-04-03T19:05:23Z")

</div>

@sohel-skylark,

Thank you for posting in the Zoom Developer Forum. It looks like you are seeing NPE is causing the app to crash after removing the headphones. Are you only seeing this behavior when disconnecting the headphone from a particular device or you are seeing this on all devices?

---

<div class="post-metadata">

**Author:** ![sohel-skylark](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sohel-skylark/32/47096_2.png) [@sohel-skylark](https://devforum.zoom.us/u/sohel-skylark)\
**Post date:** [April 4, 2023, 3:40am UTC](https://devforum.zoom.us/t/crash-when-removing-earphones/85880/3 "2023-04-04T03:40:42Z")

</div>

I am able to reproduce this on all devices.

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [April 4, 2023, 6:43pm UTC](https://devforum.zoom.us/t/crash-when-removing-earphones/85880/4 "2023-04-04T18:43:23Z")

</div>

> [@sohel-skylark](#):
>
> `Attempt to invoke virtual method 'boolean us.zoom.internal.RTCConference.isInConference()' on a null object reference`

Thanks for the details. Can you share if this behavior is reproducible with Andriod Video SDK Sample? In my testing, I am not seeing the same behavior.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [May 5, 2023, 4:43am UTC](https://devforum.zoom.us/t/crash-when-removing-earphones/85880/5 "2023-05-05T04:43:35Z")

</div>

Closed on May 5, 2023, 4:43am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
