MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

GestureRecognizer throws exception

Open JeffPack opened this issue 10 years ago • 6 comments

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?

JeffPack avatar Sep 15 '16 00:09 JeffPack

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

NeerajW avatar Sep 15 '16 16:09 NeerajW

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

JeffPack avatar Sep 15 '16 19:09 JeffPack

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

NeerajW avatar Sep 15 '16 21:09 NeerajW

@JeffPack were you able to reproduce this?

StephenHodgson avatar Sep 29 '16 16:09 StephenHodgson

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.

JeffPack avatar Sep 30 '16 04:09 JeffPack

Please open if you repro again with latest master.

NeerajW avatar Dec 01 '16 23:12 NeerajW