# Magic Leap 2 Shutting Down and Video Stuck During WebRTC 1v1 Calls

**URL:** <https://forum.magicleap.cloud/t/magic-leap-2-shutting-down-and-video-stuck-during-webrtc-1v1-calls/2122>\
**Category:** Unity Development\
**Tags:** development, unity\
**Created:** [June 24, 2023, 6:35pm UTC](https://forum.magicleap.cloud/t/magic-leap-2-shutting-down-and-video-stuck-during-webrtc-1v1-calls/2122 "2023-06-24T18:35:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![usman.bashir](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@usman.bashir](https://forum.magicleap.cloud/u/usman.bashir)\
**Post date:** [June 24, 2023, 6:35pm UTC](https://forum.magicleap.cloud/t/magic-leap-2-shutting-down-and-video-stuck-during-webrtc-1v1-calls/2122/1 "2023-06-24T18:35:14Z")

</div>

Hello everyone,

I've been experiencing a unique issue with my Magic Leap 2 where the device shuts down when it reaches high temperatures. This problem specifically occurs while using a feature I've developed for **1v1 WebRTC calling**. I built this feature utilizing the WebRTC examples provided in **MagicLeap\_Examples**.

During the **first one to two minutes of the call,** the local stream freezes and, after a few seconds, the remote video also gets stuck. The device then overheats and requires cooling before it can be used again.

The current resolution when this issue happens is 1080p.

Here are the details of my setup:

**Unity Editor version** : 2022-2.0f1  
**ML2 OS version** : Version 1.3.0-dev1, Build B3E.230427.10-R.023, Android API Level 29  
**MLSDK version** : 1.7.0  
**Host OS** : Windows 11

The error message that shows up when the device shuts down is: "High Temperature - The device may shut down at high temperatures. Please allow the compute pack to cool."

> **High Temperature**  
> The device may shut down at high temperatures. Please allow compute pack to cool.

I'm curious if anyone else has faced similar issues with WebRTC on Magic Leap 2, and if there are any solutions or workarounds that you could suggest.

I have attached the log file; PFA  
[High-temperature-WebRTC-ML2.txt](https://forum.magicleap.cloud/uploads/short-url/apfp7faYLrP2R6GQMBlBRnkz7ui.txt) (138.8 KB)

Kindly assist me in this matter as this is a pressing matter for us.

---

<div class="post-metadata">

**Author:** ![etucker](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/etucker/32/842_2.png) [@etucker](https://forum.magicleap.cloud/u/etucker)\
**Post date:** [June 26, 2023, 3:58pm UTC](https://forum.magicleap.cloud/t/magic-leap-2-shutting-down-and-video-stuck-during-webrtc-1v1-calls/2122/2 "2023-06-26T15:58:05Z")

</div>

Hi @usman.bashir,

Thank you for reaching out to us regarding this issue. Would you mind running the profiler and showing the values for memory usage and CPU load at two different points in time?

Thanks,

El

---

<div class="post-metadata">

**Author:** ![usman.bashir](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@usman.bashir](https://forum.magicleap.cloud/u/usman.bashir)\
**Post date:** [June 28, 2023, 6:20am UTC](https://forum.magicleap.cloud/t/magic-leap-2-shutting-down-and-video-stuck-during-webrtc-1v1-calls/2122/3 "2023-06-28T06:20:48Z")

</div>

@etucker

I have performed a long testing of Calling feature using our application:

- Initiated a test using Expert call which lasted for **13 minutes.**
- In the **last minute** of the test, the call was automatically disconnected.
- Simultaneously, both local and remote rendering views were automatically terminated.
- Notably, at the time of disconnection, the CPU usage exceeded 100%.
- Before starting the test, the device's battery level was at **47%.**
- By the end of the test, the battery status had decreased to **38%.**

Application didn't crashed or something, but call gets disconnected automatically.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/528c9841fc713c6b6fcfe901b5860809ad87dafc.png)

I have attached the profiler video link for your reference, Please see last 2 minutes of the attached video to get better understanding:

> **[Profiler.mp4](https://drive.google.com/file/d/1UkUvxvFLS_C-8Hsw7pL53-MlLFudJaft/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![etucker](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/etucker/32/842_2.png) [@etucker](https://forum.magicleap.cloud/u/etucker)\
**Post date:** [June 30, 2023, 4:47pm UTC](https://forum.magicleap.cloud/t/magic-leap-2-shutting-down-and-video-stuck-during-webrtc-1v1-calls/2122/4 "2023-06-30T16:47:24Z")

</div>

Does the same thing occur when using the boilerplate MLExamples project?

---

<div class="post-metadata">

**Author:** ![usman.bashir](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@usman.bashir](https://forum.magicleap.cloud/u/usman.bashir)\
**Post date:** [July 3, 2023, 3:47pm UTC](https://forum.magicleap.cloud/t/magic-leap-2-shutting-down-and-video-stuck-during-webrtc-1v1-calls/2122/5 "2023-07-03T15:47:39Z")

</div>

@etucker I haven't tested **MagicLeap\_Examples** that much extensively.

Here are some more observations.

**I. Introduction:**  
A series of more than 10 comprehensive tests were conducted on a ML2 device.

**II. Test Specifications:**

Last two tests were long duration tests.

The final test was executed for a total duration of 1 hour.

**III. Test Conditions:**

- The device was completely charged at the beginning of the test, showing a 100% battery status.
- After the 30 minutes of test performed, Battery status was turned to 97%.
- I put the application to background and open settings. Frame become inactive, then I again open Application using controller. Frame again resumed.

**IV. User Interactions:**

- An interesting aspect of the test was that the scene on the device would pause if the user wasn't wearing glasses.
- Once the device was picked up again by the user, the scene would reactivate and resume.

**V. Test Observations:**

- Intermittent video latency \* was experienced during the test.
- These latency periods lasted between 10 to 20 seconds each.
- After each latency period, the video frames would recover automatically without any user intervention.

**VI. Conclusions:**

The tests provided valuable insights into the device's performance under specific conditions, which will help in further refining its performance and user experience.
