When I build and deploy my app to the HoloLens the splash screen will show up momentarily, then everything turns black. I downloaded the log from the device and saw these errors:
Errors
If I build and deploy to the HoloLens in release instead of debug, the splash screen stays up a little longer, then the app starts but it’s incredibly slow and unresponsive. As in it takes 10 seconds or more for the view cursor to start moving after I move my head. I get the second error when I build and deploy in debug on my desktop, but the app runs as normal after I dismiss the error.
I’m not sure where to go from here. My project contains several shaders that do not have a ‘_MainTex’ property, but none of my code tries to reference that property. The only C#-side reference to a _MainTex in my project is the EditorHands script from the HoloToolkit, but that script isn’t even in my scene. I also don’t have any UI controls that automatically change things in the UI, like CrossFadeAlpha, so I’m not sure what bit of code could possibly be searching for a ‘_MainTex’ property.
I’ve been able to recreate this in Unity 2017.1 with Visual Studio 2015 as well as Unity 2017.1.1 with Visual Studio. These errors do not show up when I build and deploy in Windows Standalone.
While typing this out I remembered that I have a few materials in my UI, so I disabled that part of the UI and the second warning went away. Then after some googling I discovered that the first app can be caused by various input checks. I recently added touch controls to my app and disabling them in WSA fixed the first warning. It would be nice if there was a platform directive for the HoloLens so I don’t have to completely disable something on the entire WSA platform just to keep it from running on the HoloLens. Correct me if such a thing exists, but I don’t see it in here: Unity - Manual: Conditional compilation
Anyways, I’m guessing I should file bug reports for these problems since I’ve sort of figured them out.
I started getting a new error after resolving the above error(s).
Error
I’m even less sure about how to resolve this since the above fix was a random shot in the dark. Any suggestions? This happens in 2017.1 and 2017.1.1. I tried updating to 2017.2 but it broke a lot of HoloToolkit code.
It happens once then the app crashes and the debugger breaks.
When I run the app on the HoloLens without the debugger attached, the HoloLens becomes unresponsive after it finishes loading past the splash screen. I have to turn it off, then turn it back on. Then when I download the console log from the device it shows the same stacktrace and error only once.
The program ‘[1880] app.exe’ has exited with code -2147483645 (0x80000003).
I did some testing today and realized I was deploying to the HoloLens with a more complex version of my volumetric rendering shader than I meant to use. The app doesn’t crash on load when I switch back to an older, more performant version of the shader. I’m pretty sure the new shader is overwhelming the GPU. Should I still file a bug report? This kind of seems like expected behavior. The new shader was intended for the desktop version of our app.
I still need to file a bug report for the earlier issue where the app will crash on load when the UI contains a material that doesn’t have a _MainTex property.
0x80000003 is a failed assert code (also known as “__debugbreak()” or “int 3”). That stacktrace is bogus. You need to get it from the debugger, not the log.