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

Unity 2017.2.1f1 Dumps on right click + move in Hololens emulator

Open Bojoe opened this issue 8 years ago • 12 comments

Overview

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 Editor Version

Unity 2017.2.1f1

Mixed Reality Toolkit Release Version

HoloToolkit-Unity-2017.2.1.0

Bojoe avatar Dec 19 '17 11:12 Bojoe

Can you provide the full stack trace please?

StephenHodgson avatar Dec 19 '17 16:12 StephenHodgson

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.

StephenHodgson avatar Dec 19 '17 16:12 StephenHodgson

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.

dlionz avatar Jan 12 '18 22:01 dlionz

Do you have a full stack trace?

StephenHodgson avatar Jan 12 '18 22:01 StephenHodgson

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

polyramus avatar Feb 14 '18 13:02 polyramus

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?

ghost avatar Mar 14 '18 20:03 ghost

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.

ghost avatar Mar 16 '18 18:03 ghost

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.

pnolen avatar Apr 05 '18 23:04 pnolen

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.

StephenHodgson avatar Apr 06 '18 00:04 StephenHodgson

In which version will it be fixed? 2017.2.1.4? Thank you

ghost avatar Apr 06 '18 09:04 ghost

In which version will it be fixed?

vNEXT

StephenHodgson avatar Apr 06 '18 23:04 StephenHodgson

#1954 may have fixed this. The fix is in the 2017.2.1.4 HoloToolkit release.

If this change does not help, please reactivate.

david-c-kline avatar May 17 '18 21:05 david-c-kline