# MLHub / AppSim crashes when trying to start target connection

**URL:** <https://forum.magicleap.cloud/t/mlhub-appsim-crashes-when-trying-to-start-target-connection/3171>\
**Category:** App Simulator\
**Tags:** app-sim\
**Created:** [February 12, 2024, 3:18pm UTC](https://forum.magicleap.cloud/t/mlhub-appsim-crashes-when-trying-to-start-target-connection/3171 "2024-02-12T15:18:37Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![footballdaniel](https://avatars.discourse-cdn.com/v4/letter/f/b4bc9f/32.png) [@footballdaniel](https://forum.magicleap.cloud/u/footballdaniel)\
**Post date:** [February 12, 2024, 3:18pm UTC](https://forum.magicleap.cloud/t/mlhub-appsim-crashes-when-trying-to-start-target-connection/3171/1 "2024-02-12T15:18:37Z")

</div>

When trying to connect to a target (device or simulator) ML2 hub crashes instantly without an error.

I tried setting `Hub > Settings > Developer > Custom adb: Pointing to Unity`, `Hub > Settings > Developer: Android Studio` but ML hub still crashes.

Thanks for the support!

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

**Unity Editor version** (if applicable):  
**ML2 OS version** : 1.5.0  
**MLSDK version** : 1.5.0  
**ML Hub version** : 2.0.0  
**Magic Leap Application Simulator (ZI) Runtime version**: 3.8.0  
**Magic Leap App Simulator for Unity** (if applicable): 3.8.0  
**Host OS** : Windows x64

**Please do not submit without first getting a ZIP of your logs from** :

[https://developer-docs.magicleap.cloud/docs/guides/developer-tools/ml-hub/app-sim/error-reporting](https://developer-docs.magicleap.cloud/docs/guides/developer-tools/ml-hub/app-sim/error-reporting)

Logs:  
[MLHubLogs-20240211-194933-win.zip](https://forum.magicleap.cloud/uploads/short-url/c9dRFVCiVekV0FzhzBiwzT9HVQ4.zip) (9.5 MB)

---

<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:** [February 13, 2024, 3:19pm UTC](https://forum.magicleap.cloud/t/mlhub-appsim-crashes-when-trying-to-start-target-connection/3171/2 "2024-02-13T15:19:55Z")

</div>

Do you mind trying to connect to the Magic Leap Simulator directly through the Magic Leap Hub rather than using the Magic Leap App Simulator for Unity package?

---

<div class="post-metadata">

**Author:** ![footballdaniel](https://avatars.discourse-cdn.com/v4/letter/f/b4bc9f/32.png) [@footballdaniel](https://forum.magicleap.cloud/u/footballdaniel)\
**Post date:** [February 13, 2024, 3:44pm UTC](https://forum.magicleap.cloud/t/mlhub-appsim-crashes-when-trying-to-start-target-connection/3171/3 "2024-02-13T15:44:09Z")

</div>

Hi, thanks for the response.

I am not using the unity package `com.magicleap.zifunity`, I am using the Magic leap simulator directly through the magic leap hub when this error occurs.

The package is not installed.

My issue is arises outside of unity. Here to reproduce

1. start ML Hub
2. connect device via usb
3. on device, allow to connect to pc
4. start application simulator (through ml hub)
5. chose `target > device`
6. when clicking `start`, MLHub crashes

---

<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:** [February 15, 2024, 5:43pm UTC](https://forum.magicleap.cloud/t/mlhub-appsim-crashes-when-trying-to-start-target-connection/3171/5 "2024-02-15T17:43:17Z")

</div>

Thank you for the detailed reproduction steps. One more question, are you using the Magic Leap XR provider or OpenXR? Can you verify that the OpenXR provider is disabled in both the standalone and Android tab ?

Currently the OpenXR workflow is not supported when using the Application Simulator. That said, it should not result in a crash.

---

<div class="post-metadata">

**Author:** ![footballdaniel](https://avatars.discourse-cdn.com/v4/letter/f/b4bc9f/32.png) [@footballdaniel](https://forum.magicleap.cloud/u/footballdaniel)\
**Post date:** [February 16, 2024, 11:51am UTC](https://forum.magicleap.cloud/t/mlhub-appsim-crashes-when-trying-to-start-target-connection/3171/6 "2024-02-16T11:51:09Z")

</div>

Thanks, I am currently on leave and can test with the device on 26.2. again.  
I just checked the settings and OpenXR is not selected in either standalone or android. The unity project uses the MagicLeapXR provider

I tried to ship an application before going on a leave, but still could not get the simulator running. Yesterday, I tried to track down the problem and here are some insights:

Platform: Windows x64:

1. Run `ml_hubc.exe /k`
2. I see that starting the application simulator then invokes this: `CommandExecutor: Invoking: C:/Users/danie/MagicLeap/tools/zi/v3.8.0.20231208/bin/VDCLI.exe -V1 --opengl-status` soon after which the ml hub crashes
3. I tried to run `mlvdsetup.bat /k` and `envsetup.bat /k` manually.

From `envsetup.bat` i get the following output:

```bash
*** Setting MLSDK=C:\Users\danie\MagicLeap\mlsdk\v1.5.0 and updating PATH
*** ANDROID_HOME is not set, checking default paths...
*** Setting ANDROID_HOME=C:\Users\danie\AppData\Local\Android\sdk
*** ANDROID_NDK_ROOT is not set, checking default paths...
File Not Found

```

Which might indicate that the ndk root is not discovering the Unity NDK that was installed with Unity. It looks like the `envsetup.bat` is unable the NDK that is existing and installed through Unity.

This might be the cause, but I am not sure. I will be able to provide more insights and test the application again on Feb 26th. Thanks for your ongoing support.

---

<div class="post-metadata">

**Author:** ![Ling](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@Ling](https://forum.magicleap.cloud/u/Ling)\
**Post date:** [February 20, 2024, 8:21pm UTC](https://forum.magicleap.cloud/t/mlhub-appsim-crashes-when-trying-to-start-target-connection/3171/7 "2024-02-20T20:21:52Z")

</div>

@footballdaniel Please try starting App Sim simulator mode (namely choose "Target \> Simulator") in the Hub, and see if it crashes. If it does, please collect and post the log zip file again.

---

<div class="post-metadata">

**Author:** ![footballdaniel](https://avatars.discourse-cdn.com/v4/letter/f/b4bc9f/32.png) [@footballdaniel](https://forum.magicleap.cloud/u/footballdaniel)\
**Post date:** [February 27, 2024, 9:14am UTC](https://forum.magicleap.cloud/t/mlhub-appsim-crashes-when-trying-to-start-target-connection/3171/8 "2024-02-27T09:14:28Z")

</div>

Hi @Ling

I start the app sim in simulator mode (no headset attached, right?) and the application crashes. Here the logs

Thanks for your help. I am also available for a call / screen share if that helps  
[MLHubLogs-20240227-101207-win.zip](https://forum.magicleap.cloud/uploads/short-url/fEozw8ft0DPfuDOL366oSkvUNwj.zip) (711.0 KB)

---

<div class="post-metadata">

**Author:** ![Ling](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@Ling](https://forum.magicleap.cloud/u/Ling)\
**Post date:** [February 27, 2024, 9:57pm UTC](https://forum.magicleap.cloud/t/mlhub-appsim-crashes-when-trying-to-start-target-connection/3171/9 "2024-02-27T21:57:27Z")

</div>

Hi @footballdaniel, the crash happened in a DLL of the NVidia driver, nvoglv64.dll. So could you try updating or reinstalling the graphics driver, per instructions in this web post?

> **[Nvoglv64.dll: What It Is & How To Fix Errors - MalwareTips Blog](https://malwaretips.com/blogs/nvoglv64-dll-what-it-is-how-to-fix-errors/)**
>
> Learn what Nvoglv64.dll is and how to fix errors related to this file. Resolve issues and optimize your system performance.

---

<div class="post-metadata">

**Author:** ![footballdaniel](https://avatars.discourse-cdn.com/v4/letter/f/b4bc9f/32.png) [@footballdaniel](https://forum.magicleap.cloud/u/footballdaniel)\
**Post date:** [February 28, 2024, 11:47am UTC](https://forum.magicleap.cloud/t/mlhub-appsim-crashes-when-trying-to-start-target-connection/3171/10 "2024-02-28T11:47:01Z")

</div>

Thanks @Ling, that solved the issue 🙂 Thanks for the swift resolution, have a good day!

---

<div class="post-metadata">

**Author:** ![Ling](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@Ling](https://forum.magicleap.cloud/u/Ling)\
**Post date:** [February 28, 2024, 3:50pm UTC](https://forum.magicleap.cloud/t/mlhub-appsim-crashes-when-trying-to-start-target-connection/3171/11 "2024-02-28T15:50:16Z")

</div>

Great! Have a good one too! @footballdaniel

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/bd9b737a4d45ea243aa7eb177d60a773b806899a.svg) [@system](https://forum.magicleap.cloud/u/system)\
**Post date:** [March 14, 2024, 3:50pm UTC](https://forum.magicleap.cloud/t/mlhub-appsim-crashes-when-trying-to-start-target-connection/3171/12 "2024-03-14T15:50:25Z")

</div>

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