# QR Code tracking implementation crashing hololens 2

**URL:** <https://forums.unrealengine.com/t/qr-code-tracking-implementation-crashing-hololens-2/755127>\
**Category:** Cloud Marketplace VM\
**Tags:** unreal-engine, crash, question\
**Created:** [January 23, 2023, 8:49am UTC](https://forums.unrealengine.com/t/qr-code-tracking-implementation-crashing-hololens-2/755127 "2023-01-23T08:49:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pras98](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@pras98](https://forums.unrealengine.com/u/pras98)\
**Post date:** [January 23, 2023, 8:49am UTC](https://forums.unrealengine.com/t/qr-code-tracking-implementation-crashing-hololens-2/755127/1 "2023-01-23T08:49:27Z")

</div>

Hey there,  
I’m trying to implement this QR code tracking method:

> **[QR codes in Unreal - Mixed Reality](https://learn.microsoft.com/en-us/windows/mixed-reality/develop/unreal/unreal-qr-codes?tabs=426)**
>
> Learn how to setup, use, and track QR codes in Unreal mixed reality applications.

I have tried it in unreal 4.27.2, I have all the required plugins and have made other applications in the hololens that work and use the openXR plugins. When I want to preview in vr I keep getting this crash.

"Unhandled Exception: EXCEPTION\_ACCESS\_VIOLATION reading address 0x0000000080000000

UE4Editor\_MicrosoftOpenXR!winrt::Windows::Foundation::IUnknown::unconditional\_release\_ref() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\MicrosoftOpenXR\Intermediate\Microsoft.Windows.CppWinRT.2.0.201217.4\NuGetModule\winrt\base.h:2037]  
UE4Editor\_MicrosoftOpenXR!MicrosoftOpenXR::FQRTrackingPlugin::UpdateDeviceLocations() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\MicrosoftOpenXR\Source\MicrosoftOpenXR\Private\QRTrackingPlugin.cpp:258]  
UE4Editor\_OpenXRHMD  
UE4Editor\_OpenXRHMD  
UE4Editor\_Engine  
UE4Editor\_UnrealEd  
UE4Editor\_UnrealEd  
UE4Editor  
UE4Editor  
UE4Editor  
UE4Editor  
UE4Editor  
UE4Editor  
kernel32  
ntdll"

It seems to occur when the “Toggle ARCapture” node is triggered, because when I remove it from the open level blueprint below, it does not crash.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/a/e/3ae8ea23c83d8a46d2cc4fca40ddb3ee13a6c8e4.png)

Ive tried setting a delay for it too, which only delays the same error.

In terms of how its all set up, the open level blueprint is shown above, and I added an actor blueprint according to the tutorial, mine is shown below:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/c/b/5cbe2cf0b7f7e52e9ed04609d9c0fab565a19e92.png)

The rest of it is set up based on the microsoft tutorials: [3. Setting up your project for mixed reality - Mixed Reality | Microsoft Learn](https://learn.microsoft.com/en-us/windows/mixed-reality/develop/unreal/tutorials/unreal-uxt-ch3#adding-the-session-asset)  
this includes the MRPawn and creating the game mode base.

I’m not sure where I’m going wrong here. Any help would be appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![Nan0p0ke](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nan0p0ke](https://forums.unrealengine.com/u/Nan0p0ke)\
**Post date:** [May 11, 2023, 3:06pm UTC](https://forums.unrealengine.com/t/qr-code-tracking-implementation-crashing-hololens-2/755127/2 "2023-05-11T15:06:43Z")

</div>

Did you find a solution to this problem?

---

<div class="post-metadata">

**Author:** ![pras98](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@pras98](https://forums.unrealengine.com/u/pras98)\
**Post date:** [May 22, 2023, 3:35am UTC](https://forums.unrealengine.com/t/qr-code-tracking-implementation-crashing-hololens-2/755127/3 "2023-05-22T03:35:28Z")

</div>

Unfortunately I haven’t found a solution. The only way to get around it for me was to use Unreal engine 5 instead of 4 where the problem seems to go away.

---

<div class="post-metadata">

**Author:** ![jimmithyhand](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jimmithyhand](https://forums.unrealengine.com/u/jimmithyhand)\
**Post date:** [April 30, 2024, 8:35am UTC](https://forums.unrealengine.com/t/qr-code-tracking-implementation-crashing-hololens-2/755127/4 "2024-04-30T08:35:12Z")

</div>

Hey @pras98, I was having the same issue, but I have just found a way to stop my project from crashing. Rather than installing the plugin from the marketplace I added it at the project level to the plugins folder. The plugin can be found here [GitHub - microsoft/Microsoft-OpenXR-Unreal: An Unreal Engine game plugin providing additional features available on Microsoft's Mixed Reality devices like the HoloLens 2 when using OpenXR.](https://github.com/microsoft/Microsoft-OpenXR-Unreal). Follow the setup instructions on the github. Basically, uninstall the engine-level version, add the plugin to your project file, and set the engine version of the .uplugin to 4.27.0 (Not 4.27.2). Then open your project and rebuild the plugin. I am still trying to get the actual tracking working so I will let you know if I get any other issues. The github version also comes with blueprint implementations for the different functions which is nice

---

<div class="post-metadata">

**Author:** ![jimmithyhand](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jimmithyhand](https://forums.unrealengine.com/u/jimmithyhand)\
**Post date:** [April 30, 2024, 12:56pm UTC](https://forums.unrealengine.com/t/qr-code-tracking-implementation-crashing-hololens-2/755127/5 "2024-04-30T12:56:54Z")

</div>

I got it all working and tracking now. There are lots of little issues, but it definitely works to track QRCodes in 4.27.2 with the project-level plugin. I am doing it all through C++ at the moment. Once I have something decent to show, I plan to do a tutorial on setting up a project and using the different features. It is a little more involved than setting it up through Blueprints, but I got the example Blueprint version they provide through GitHub running as well. Let me know if you have trouble setting it up

---

<div class="post-metadata">

**Author:** ![yogisenpai](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@yogisenpai](https://forums.unrealengine.com/u/yogisenpai)\
**Post date:** [May 15, 2024, 1:28am UTC](https://forums.unrealengine.com/t/qr-code-tracking-implementation-crashing-hololens-2/755127/6 "2024-05-15T01:28:40Z")

</div>

How to set up the QR? I tried the image tracking, it works fine.
