QR Code tracking implementation crashing hololens 2

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

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.

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:

The rest of it is set up based on the microsoft tutorials: 3. Setting up your project for mixed reality - Mixed Reality | Microsoft Learn
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

Did you find a solution to this problem?

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.

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.. 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

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

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