microsoft / GalaxyExplorer

Galaxy Explorer is the application Microsoft is building as part of the Share Your Idea campaign.
MIT License
947 stars 331 forks source link

AccessViolationException When Deployed on Hololens Emulator #7

Closed nrgonzalez777 closed 6 years ago

nrgonzalez777 commented 8 years ago

Hello,

When deploying the GalaxyExplorer application to the Hololens emulator, I get a System.AccessViolationException in the TransitionManager's PrevSceneLoadedCoroutine method. More specifically, this occurs on line 507, when the application is setting all of the found collider's enabled value to true. However, this occurs only when the application is transitioning to the GalaxyView state (line 186 of IntroductionFlow.cs). All instances of setting the collider.enabled value before this point do not throw the exception. Additionally, this problem does not occur when running the application in Unity; only when running the emulator via Visual Studio 2015.

image

ThitherCrane commented 8 years ago

Please give step by step description how you arrived at this situation.

nrgonzalez777 commented 8 years ago
  1. Set up Hololens dev environment according to Microsoft documentation at https://developer.microsoft.com/en-us/windows/holographic/install_the_tools.
  2. Downloaded GalaxyExplorer project using the "Download Zip" functionality and extracted files.
  3. Opened folder as Unity project and let it re-import files (Unity pops up a warning saying that the project was made with an earlier version of Unity) image
  4. Once project is done setting up, set the build to be a Windows Store Universal 10 application with D3D selected instead of XAML and then build the project to a new folder.
  5. Once build completes, open created visual studio solution, set its build to x86 and set the hololens emulator as the debug target.
  6. F5 the program and run it until the point at which the IntroductionFlow trip tries to load the GalaxyView scene. The exception should occur at that point.

Since, the original post, I have found out that the exception does not occur when running in release mode, only in debug.

bjmalicoat commented 8 years ago

Thanks for the detailed report! I've opened a bug on our side to track this issue, but until it's fixed, your workaround is the best approach. Use Master or Release and you shouldn't have any problems.

mikehc commented 8 years ago

Any updates on this? I'm having the same issue.

timkeosa commented 8 years ago

I've also hit this bug building/running Galaxy Explorer on my PC and spent some time investigating it.

The AV occurs because GetComponent is returning a set of invalid memory address, but only when running a "debug" build of the app. This leads me to think it might be caused by a threading bug or some other timing hole in the Coroutine functionality.

I filed a Unity bug for this issue: https://fogbugz.unity3d.com/default.asp?797741_e8ch6k6elbem5uda

Unfortunately, the current work-around is to simply build a "release" versions of the app, but I'll look into finding a work-around in the code.

Shubham7694 commented 7 years ago

I am having the same issue but in release or master mode as well! I have a QR button which starts a coroutine to scan QR. On tapping twice in a go, app crashes with the above mentioned exception being thrown. Unity 5.5.0f3