# Crash with MLCamera API (we know it has deprecated)

**URL:** <https://forum.magicleap.cloud/t/crash-with-mlcamera-api-we-know-it-has-deprecated/4368>\
**Category:** Unity Development\
**Tags:** development, unity, app-sim\
**Created:** [October 4, 2024, 1:43am UTC](https://forum.magicleap.cloud/t/crash-with-mlcamera-api-we-know-it-has-deprecated/4368 "2024-10-04T01:43:12Z")\
**Posts on this page:** 1\
**Showing post:** 12

<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 18, 2024, 7:20am UTC](https://forum.magicleap.cloud/t/crash-with-mlcamera-api-we-know-it-has-deprecated/4368/12 "2024-10-18T07:20:11Z")

</div>

It occur randomly. such as switching between WorldCamera, CVCamera, AudioCapture (sorry for the inaccurate name—I'm currently working on a new application using the latest ML2 SDK), and back to CVCamera, and so on.

However, the key difference is that our application causes the device to reboot (it reboots after the 'tracking lost' message), while the sample app only causes the application to close.

It would be great if this could definitively narrow down the issue. Unfortunately, in the past, there were instances where only the application would close without causing the device to reboot.

And our issue is in the same line as the one previously reported(but the code base is not same. the common aspect is that both use the MLCamera API.). Could this be a clue to solving the problem?

> [@Freezing in a camera-recording application](https://forum.magicleap.cloud/t/freezing-in-a-camera-recording-application/2657/4):
>
> Dear @etucker and @noxowl , The MLCamera problem happens again in my another magic leap. Is there any way to solve this?

Additionally, we faced new issue with MLCamera API that reported before. Would it be better to report this in a new thread?

> [@Permission failure: com.magicleap.permission.CAMERA\_CAPTURE\_CVIP](https://forum.magicleap.cloud/t/permission-failure-com-magicleap-permission-camera-capture-cvip/1936):
>
> Hi, I'm getting this error "Permission failure: com.magicleap.permission.CAMERA\_CAPTURE\_CVIP" in my log despite having camera permissions in my AndroidManifest. I cannot find this permission anywhere, not even in documentation. I even added that specific permission to my xml. What am I doing wrong? All versions of sdks are latest.

Here is the log sample:  
Environment: ML OS 1.9 + Unity SDK 2.4.0

```auto
10-18 14:57:11.769 24573 24594 I Unity : [WebRTC Steamer Log] CaptureVideoStart
10-18 14:57:11.771 24573 24594 I CameraManagerGlobal: Connecting to camera service
10-18 14:57:11.772 3319 3701 W ServiceManager: Permission failure: com.magicleap.permission.CAMERA_CAPTURE_CVIP from uid=10108 pid=24573
10-18 14:57:11.772 3319 3701 D ServiceManager: Permission check violation (permissive=0): com.magicleap.permission.CAMERA_CAPTURE_CVIP from uid=10108 pid=24573, Permission ARE enforcing.
10-18 14:57:11.773 3319 3701 W ServiceManager: Permission failure: com.magicleap.permission.CAMERA_CAPTURE_CVIP from uid=10108 pid=24573
10-18 14:57:11.773 3319 3701 D ServiceManager: Permission check violation (permissive=0): com.magicleap.permission.CAMERA_CAPTURE_CVIP from uid=10108 pid=24573, Permission ARE enforcing.
10-18 14:57:11.774 3319 3701 W ServiceManager: Permission failure: com.magicleap.permission.CAMERA_CAPTURE_CVIP from uid=10108 pid=24573
...
10-18 14:57:11.781 24573 24594 I Unity : [WebRTC Steamer Log] WebCam device found
10-18 14:57:11.783 24573 24594 I Unity : [WebRTC Steamer Log] Available webcam: Camera 0
10-18 14:57:11.783 24573 24594 I Unity : O2M.AppleCider.Network.WebRTC.<>c:<CaptureVideoStart>b__30_0(WebCamDevice)
10-18 14:57:11.783 24573 24594 I Unity : System.Collections.Generic.List`1:ForEach(Action`1)
10-18 14:57:11.783 24573 24594 I Unity : O2M.AppleCider.Network.WebRTC.<CaptureVideoStart>d__30:MoveNext()
10-18 14:57:11.783 24573 24594 I Unity : UniRx.<WrapEnumerator>d__291:MoveNext()
10-18 14:57:11.783 24573 24594 I Unity : UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
10-18 14:57:11.783 24573 24594 I Unity : UniRx.InternalUtil.ThreadSafeQueueWorker:ExecuteAll(Action`1)
10-18 14:57:11.783 24573 24594 I Unity : 
10-18 14:57:11.784 24573 24594 I Unity : [WebRTC Steamer Log] Available webcam: Camera 1
10-18 14:57:11.784 24573 24594 I Unity : O2M.AppleCider.Network.WebRTC.<>c:<CaptureVideoStart>b__30_0(WebCamDevice)
10-18 14:57:11.784 24573 24594 I Unity : System.Collections.Generic.List`1:ForEach(Action`1)
10-18 14:57:11.784 24573 24594 I Unity : O2M.AppleCider.Network.WebRTC.<CaptureVideoStart>d__30:MoveNext()
10-18 14:57:11.784 24573 24594 I Unity : UniRx.<WrapEnumerator>d__291:MoveNext()
10-18 14:57:11.784 24573 24594 I Unity : UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
10-18 14:57:11.784 24573 24594 I Unity : UniRx.InternalUtil.ThreadSafeQueueWorker:ExecuteAll(Action`1)
10-18 14:57:11.784 24573 24594 I Unity : 
10-18 14:57:11.784 24573 24594 I Unity : [WebRTC Steamer Log] Available webcam: Camera 2
10-18 14:57:11.784 24573 24594 I Unity : O2M.AppleCider.Network.WebRTC.<>c:<CaptureVideoStart>b__30_0(WebCamDevice)
10-18 14:57:11.784 24573 24594 I Unity : System.Collections.Generic.List`1:ForEach(Action`1)
10-18 14:57:11.784 24573 24594 I Unity : O2M.AppleCider.Network.WebRTC.<CaptureVideoStart>d__30:MoveNext()
10-18 14:57:11.784 24573 24594 I Unity : UniRx.<WrapEnumerator>d__291:MoveNext()
10-18 14:57:11.784 24573 24594 I Unity : UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
10-18 14:57:11.784 24573 24594 I Unity : UniRx.InternalUtil.ThreadSafeQueueWorker:ExecuteAll(Action`1)
10-18 14:57:11.784 24573 24594 I Unity : 
10-18 14:57:11.821 24573 24653 W Android_FMOD_MLAudio: OutputMLAudio::recordLock, offset 5696, length 320, mRecordPositionBytes 0
10-18 14:57:11.821 24573 24653 W Android_FMOD_MLAudio: OutputMLAudio::recordUnlock, mRecordPositionBytes 0
10-18 14:57:11.821 24573 24653 W Android_FMOD_MLAudio: OutputMLAudio::recordLock, offset 6016, length 320, mRecordPositionBytes 0
10-18 14:57:11.821 24573 24653 W Android_FMOD_MLAudio: OutputMLAudio::recordUnlock, mRecordPositionBytes 0

```

---

_[View the full topic](https://forum.magicleap.cloud/t/crash-with-mlcamera-api-we-know-it-has-deprecated/4368)._
