# Freezing in a camera-recording application

**URL:** <https://forum.magicleap.cloud/t/freezing-in-a-camera-recording-application/2657>\
**Category:** Unity Development\
**Created:** [October 2, 2023, 4:42pm UTC](https://forum.magicleap.cloud/t/freezing-in-a-camera-recording-application/2657 "2023-10-02T16:42:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![TY\_Wang](https://avatars.discourse-cdn.com/v4/letter/t/d6d6ee/32.png) [@TY\_Wang](https://forum.magicleap.cloud/u/TY_Wang)\
**Post date:** [October 2, 2023, 4:42pm UTC](https://forum.magicleap.cloud/t/freezing-in-a-camera-recording-application/2657/1 "2023-10-02T16:42:53Z")

</div>

Give us as much detail as possible regarding the issue you're experiencing.

**Unity Editor version** : 2022.3  
**ML2 OS version** : 1.8.0  
**MLSDK version** : 1.3.0-dev1  
**Host OS** : Windows

I have developed an application that records where users are looking using the MLCamera. This is almost based on the sample code of from the UnitySDKSample provided by the official.  
The small difference is that the recordings automatically start, stop, and restart based on events.  
Besides, AR marker detection and eye tracking function are used in this application.  
Each recording lasts for 2-5 minutes, and another recording starts 5-15 seconds after the last recording stopped.

However, I found that for each 60-minute session, the application often encounters 1 or 2 times of crashing.

The crashing can be either 1) return to main menu incidentally 2) frozen and nothing appears again.

I wonder if anyone has similar experiences?  
Any comment will be appreciated

---

<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:** [October 2, 2023, 7:55pm UTC](https://forum.magicleap.cloud/t/freezing-in-a-camera-recording-application/2657/2 "2023-10-02T19:55:45Z")

</div>

Hi @TY_Wang,

Welcome to the Magic Leap 2 Forums. We are so grateful to have you here engaging with us.

Would you mind sharing [a screenshot of your memory usage](https://docs.unity3d.com/Packages/com.unity.memoryprofiler@1.0/manual/index.html) at two different points of time. This will help us debug this issue for you. If you have crash logs, would you mind sharing those as well. Are you receiving any error logs?

Best,

El

---

<div class="post-metadata">

**Author:** ![noxowl](https://avatars.discourse-cdn.com/v4/letter/n/3ec8ea/32.png) [@noxowl](https://forum.magicleap.cloud/u/noxowl)\
**Post date:** [October 3, 2023, 5:08pm UTC](https://forum.magicleap.cloud/t/freezing-in-a-camera-recording-application/2657/3 "2023-10-03T17:08:26Z")

</div>

Good evening @etucker ,

We're not able to share relevant resources right now.  
but we'll try to reproduce the issue next week and then share relevant resources.

We appreciate your reply.

---

<div class="post-metadata">

**Author:** ![TY\_Wang](https://avatars.discourse-cdn.com/v4/letter/t/d6d6ee/32.png) [@TY\_Wang](https://forum.magicleap.cloud/u/TY_Wang)\
**Post date:** [October 4, 2024, 1:12am UTC](https://forum.magicleap.cloud/t/freezing-in-a-camera-recording-application/2657/4 "2024-10-04T01:12:23Z")

</div>

Dear @etucker and @noxowl ,

The MLCamera problem happens again in my another magic leap.  
Is there any way to solve this?

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [October 4, 2024, 3:18pm UTC](https://forum.magicleap.cloud/t/freezing-in-a-camera-recording-application/2657/5 "2024-10-04T15:18:11Z")

</div>

Do you mind creating a new post with your question. This topic is quite stale. In your post, please include the MLSDK and OS version as well as any errors that you are getting in the log.

I recommend using the Async Functions for initialization to reduce the performance impact of starting the camera. [MLCamera Examples | MagicLeap Developer Documentation](https://developer-docs.magicleap.cloud/docs/guides/unity/camera/ml-camera-example/#async-example)

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [October 4, 2024, 3:18pm UTC](https://forum.magicleap.cloud/t/freezing-in-a-camera-recording-application/2657/6 "2024-10-04T15:18:16Z")

</div>


