That looks reasonable although I’m not too familiar with C++/WinRT library.
Anyway, there are two ways forward: either we can debug on your side, or you can submit the bug to us and we can dig into it. Since it might take a while for us to be able to look at this, I suggest we continue debugging on your side for now.
Open up admin command prompt and enter this (replace Game.exe with the exe name for your game - not the path, just the file name):
This enables Application Verifier, which is a debugging tool for finding incorrect code.
Then, run your game from Visual Studio again. With any luck, it will lead to a crash earlier, with the culprit caught red handed. Once done, don’t forget to disable it for you app again as it has a big performance impact:
GC collection in GameAssembly.dll is now causing crashes in my Hololens 2 applications, as described above.
These builds worked fine as of yesterday, but after making a change to an image asset only, builds now break and throw this exception when debugging. This issue only occurs on the Hololens 2 and does not occur in the Unity Editor.
Unhandled exception at 0x00007FFE2F3114C8 (GameAssembly.dll) in RefractionProto.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x0000000DDE603CB0).
I do not know if this is related, but my machine recently applied a windows update and I also pulled the latest Windows10 SDKs to get everything up to date, shortly after this issue began appearing in every single build I have attempted for deployment to Hololens 2, regardless of the project.
The problem only occurs on the Hololens 2. I don’t have any infinite recursion problems in the editor or in my code as far as I can tell. The application crashes within 1 second of starting, throws no errors.
As a sanity check I built an empty scene with just the MRTK Toolkit in it and deployed it to the Hololens 2 and, I am getting the exact same issue.
After digging back through my build logs, I have also found the following:
Warning C4717 ‘InputOptions_set_Headers_m6A1DF761971E6AA0F44B86DBCE8CD0846F0AF063’: recursive on all control paths, function will cause runtime stack overflow Il2CppOutputProject A:\Docs\Builds\SanityCheck\Il2CppOutputProject\Source\il2cppOutput\Assembly-CSharp4.cpp 33994
Again, this appears to be a Unity Script which I have not written or touched. But I am unsure.
Assembly-CSharp4.cpp suggests that this code is part of your C# scripts. Do you have a class named “InputOptions” which has a property named “Headers”?
It turns out I do. It looks like this is part of Azure Cognitive Services Unity Text To Speech script I was passed for this project.
Pertinent parts of the script are here:
However it is still odd that this issue only appeared this week and the last time this script was changed was 288 days ago. My output format and authorization token have also not changed.
Looks like I will go figure out who sourced this on the team.
Any update on this topic ?
I tried downloading GameAssembly.dll and installed it in window/system32 but the issue found not solved.
P.S. I am debuging on Virtual Studio S2019 and will be deploying my project to Hololens2.