microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6.01k stars 2.12k forks source link

GestureRecognizer throws exception #213

Closed JeffPack closed 7 years ago

JeffPack commented 8 years ago

So I was running debugging to watch for error messages, and upon loading a scene I got the following error message.

Exception thrown: 'System.NullReferenceException' in UnityEngine.dll NullReferenceException: Object reference not set to an instance of an object. at UnityEngine.VR.WSA.Input.GestureRecognizer.InvokeNavigationEvent(GestureEventType eventType, InteractionSourceKind source, Vector3 relativePosition, Ray headRay) at UnityEngine.VR.WSA.Input.GestureRecognizer.$Invoke30(Int64 instance, Int64* args) at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)

I am using the camera prefab from the Holotoolkit. None of the code that handles gestures is my own, it is all default code so it is supposed to only register a tap event. The only thing that calls GestureRecognizer is the GestureManager script It seems like it has a missing delegate. Has anyone else noticed this or have this problem?

NeerajW commented 8 years ago

So I can debug the same thing, were you using some test scene?

JeffPack commented 8 years ago

I will try to come up with some repro information for you.

NeerajW commented 8 years ago

Please do feel free to submit a fix if you find it.

StephenHodgson commented 8 years ago

@JeffPack were you able to reproduce this?

JeffPack commented 8 years ago

I have not been able to give it any time as of yet. I remember this happened when clicking a UI button to load a scene. I have a hunch that due to system hang, it thought that I was trying to do a navigation gesture on the button that was then being unloaded, which may have thrown the error. I could be wrong.

NeerajW commented 7 years ago

Please open if you repro again with latest master.