We are currently working on our first HoloLens project as part of a student thesis. Our goal is an application that is capable of presenting the user a possible use case with HoloLens within the retail market segment. The app uses both VuMarks and Image Targets in order to recognize and locate real world objects like products or shop inventory. However, getting close to the end of our project, we are still struggling with a hard to reproduce, but randomly reocurring "crash to desktop" in our app. We spent hours of debugging, no luck so far in finding the root cause of this issue. All we can see is that the crash dumps indicate an access violation exception in Vuforia.dll.
Attached dump files show:
Unhandled exception at 0x60AA6BA0 (Vuforia.dll) in ...exe.1084.dmp: 0xC0000005: Access violation reading location 0x1171CA44
The Visual Studio debugger just stops as soon as the error occurs, we never get the chance to gather any more details (e.g. callstack or the like). Same with the Unity profiler, it doesn't crash but we weren't able to spot anything fishy when analyzing the list of running scripts just before the crash occured.
Luckily, the crash occurs at the same point(s) in our application
- User enters mode that requires image recognition
- We enable Vuforia using
vuforiaCamera.SetActive(true);with"vuforiaCamera" being a reference to our ARCamera game object
- Now this is where it gets a little bit tricky, our app either continues working totally fine, crashes right after detecting one of our VuMarks / Image Targets or it crashes with a little delay after first detection (e.g. right after targets gets out of users sight)
- Result after crash is always the same: Crash dump with access violation
- If the app didn't crash, we disable Vuforia with
vuforiaCamera.SetActive(false);after user has left mode that required image recognition
Vuforia is also enabled right after startup, but we didn't observe similar crashes at that point.
Do you see any problems in
- Enabling/Disabling Vuforia during runtime?
- Attaching child objects to the Vuforia target game objects (i.e. something like a visual detection indicator)?
- Using Vuforia in combination with spatial anchors (i.e. to anchor detected targets)
- Removing the ARCamera behavior that overwrites the Unity target framerate (as far as we know HoloLens caps the framerate to 30 anyway when the camera is accessed)?
- Executing a fair amount of code inside the trackable state event listeners (we didn't verify whether events are directly fired from within Vuforia.dll)
- Looking at targets within a specific timeframe after enabling Vuforia?
Here's our setup:
- HoloLens (Windows version 14393.1198.x86fre.rs1_release_sec.170427-1353)
- Unity v5.5.2f1
- Vuforia v6.2.10 (latest from your website)
- HoloToolkit v22.214.171.124
- All our scripts are written in C#
We register for trackable state changes of VuMarks and image targets with
public void RegisterForTracking(GameObject trackableObject)
var eventListener = new TrackableEventListener(trackableObject);
eventListener.OnTrackableStateChanged += OnTrackableStateChanged;
private void OnTrackableStateChanged(TrackableBehaviour source,
if (newStatus == TrackableBehaviour.Status.DETECTED ||
newStatus == TrackableBehaviour.Status.TRACKED ||
newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED)
We attached three HoloLens dumps from consecutive crashes to this post since we are really running out of ideas on our side. So we decided to ask you guys for a little help. Maybe you can get more information out of the dump file when including the required symbol files for Vuforia.dll.
Looking forward to hearing from you.