I seem to have an issue if I create a new project, with just a cube and launch in the hololens emulator, I can see the cube but as soon as I right click the mouse and try move it or spacebar the emulator crashes with the following error:
"Exception thrown: 'System.NullReferenceException' in UnityEngine.UI.dll
An unhandled exception of type 'System.NullReferenceException' occurred in UnityEngine.UI.dll
Object reference not set to an instance of an object."
Unity 2017.2.1f1
HoloToolkit-Unity-2017.2.1.0
Can you provide the full stack trace please?
Do you have anything else in the scene besides a Cube?
I'll need a more detailed description of your scene setup, which prefabs you're using, and a list of repro steps.
Hello @StephenHodgson , I have run into this same issue. I will try and outline how my project is set up.
2017.2.0f3 Unity Version
Current release of Toolkit
The scene has a cube with an onclick and a building that has nothing attached.
I have built my project scene with just the menu item "Mixed Reality Toolkit >Configure Apply Mixed Reality Scene settings" components that this adds.
I am building my project on a Dell Visor. When I run the built project and use the triggers or click any of the buttons on the controller the program stops and I get the error below.
'HZ-Dell-Visor.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\damie\Documents\HZ-Dell-Visor\TEST\HZ-Dell-Visor\bin\x64\Debug\AppX\System.IO.FileSystem.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
An unhandled exception of type 'System.NullReferenceException' occurred in UnityEngine.UI.dll
Object reference not set to an instance of an object.
Please let me know what else I may need to provide.
Do you have a full stack trace?
I think I'm seeing the same issue but on a HoloLens device.
InputManager, RaiseSourceDetected, AddSource throws an unhandled exception
Call stack
UnityEngine.UI.dll!UnityEngine.EventSystems.BaseEventData.selectedObject.get() Line 38 Unknown Symbols loaded.
Assembly-CSharp.dll!HoloToolkit.Unity.InputModule.InputManager.RaiseSourceDown(HoloToolkit.Unity.InputModule.IInputSource source, uint sourceId, HoloToolkit.Unity.InputModule.InteractionSourcePressInfo pressType, object[] tags) Line 493 Unknown Symbols loaded.
Assembly-CSharp.dll!HoloToolkit.Unity.InputModule.InteractionInputSource.InteractionManager_InteractionSourcePressed(UnityEngine.XR.WSA.Input.InteractionSourcePressedEventArgs args) Line 934 Unknown Symbols loaded.
UnityEngine.VRModule.dll!UnityEngine.XR.WSA.Input.InteractionManager.OnSourceEvent(UnityEngine.XR.WSA.Input.InteractionManager.EventType eventType, UnityEngine.XR.WSA.Input.InteractionSourceState state, UnityEngine.XR.WSA.Input.InteractionSourcePressType pressType) Unknown Symbols loaded.
Unity 2017.2.0f3
Visual Studio 2017 15.5.4
Hi, I got the same exact error when using the Tap Gesture on a real Hololens device (not on emulator though).
Anyone has any clues?
Maybe a more recent version of Unity / Toolkit has fixed it?
I have succesfully used a Tap Gesture on a real device without it crashing! I had to upgrade to Unity 2017.3.1f1. The Mixed Reality's Toolkit package was 2017.2.1.1 and I'm using Visual Studio 2017 community version 15.5.6.
Running into this today on 2017.1.3p4, and I'm curious. Is there a particular reason why InitializeEventDatas() is called from Awake on the InputManager and not Start? EventSystem.current is set internally on the EventSystem's OnEnable method so if we set this on Start it would guarantee that it was initialized without having to muck around with Script Execution Order.
Yup, just the script execution order. In the next version we're not event tying the event system to a game object so we won't ever run into this issue again.
In which version will it be fixed? 2017.2.1.4?
Thank you
In which version will it be fixed?
vNEXT
If this change does not help, please reactivate.
Most helpful comment
I have succesfully used a Tap Gesture on a real device without it crashing! I had to upgrade to Unity 2017.3.1f1. The Mixed Reality's Toolkit package was 2017.2.1.1 and I'm using Visual Studio 2017 community version 15.5.6.