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
6k stars 2.12k forks source link

Unity crashes after releasing the Trigger Button (Motion Controller). #1363

Closed Abstiens closed 6 years ago

Abstiens commented 6 years ago

Overview

Unity crashes after releasing the Trigger Button (Motion Controller). The crash happens, after I release the Trigger on the backside of the controller (no message, Unity just disappears). Nothing happens, while I click and hold the trigger. If I pause Unity while I hold the trigger and then release it, it crashes immediately after I resume.

Expected Behavior

Unity shouldn't crash. You should be able to use all buttons of the controller without Unity crashing

Actual Behavior

Unity crashes

Steps to reproduce

Last Editor Log Entries (Multiple Times):

InvalidOperationException: Nullable object must have a value.
  at System.Nullable`1[System.Int32].get_Value () [0x0000b] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Nullable.cs:108 
  at HoloToolkit.Unity.InputModule.FocusManager.GetPointer (IPointingSource pointingSource) [0x0001d] in C:\Users\Vuframe\Documents\MixedRealityToolkit-Unity\Assets\HoloToolkit\Input\Scripts\Focus\FocusManager.cs:784 
  at HoloToolkit.Unity.InputModule.FocusManager.GetFocusDetails (IPointingSource pointingSource) [0x00003] in C:\Users\Vuframe\Documents\MixedRealityToolkit-Unity\Assets\HoloToolkit\Input\Scripts\Focus\FocusManager.cs:383 
  at HoloToolkit.Unity.InputModule.Cursor.UpdateCursorTransform () [0x0000c] in C:\Users\Vuframe\Documents\MixedRealityToolkit-Unity\Assets\HoloToolkit\Input\Scripts\Cursor\Cursor.cs:289 
  at HoloToolkit.Unity.InputModule.Cursor.Update () [0x00008] in C:\Users\Vuframe\Documents\MixedRealityToolkit-Unity\Assets\HoloToolkit\Input\Scripts\Cursor\Cursor.cs:143 

(Filename: /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Nullable.cs Line: 108)

Assertion failed
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Assert(Boolean)
HoloToolkit.Unity.InputModule.FocusManager:GetPointer(IPointingSource) (at Assets\HoloToolkit\Input\Scripts\Focus\FocusManager.cs:783)
HoloToolkit.Unity.InputModule.FocusManager:GetSpecificPointerEventData(IPointingSource) (at Assets\HoloToolkit\Input\Scripts\Focus\FocusManager.cs:429)
HoloToolkit.Unity.InputModule.InputManager:RaiseSourceUp(IInputSource, UInt32, InteractionSourcePressInfo, Object[]) (at Assets\HoloToolkit\Input\Scripts\Utilities\Managers\InputManager.cs:430)
HoloToolkit.Unity.InputModule.InteractionInputSource:InteractionManager_InteractionSourceReleased(InteractionSourceReleasedEventArgs) (at Assets\HoloToolkit\Input\Scripts\InputSources\InteractionInputSource.cs:919)
UnityEngine.XR.WSA.Input.InteractionManager:OnSourceEvent(EventType, InteractionSourceState, InteractionSourcePressType) (at C:\buildslave\unity\build\Runtime\VR\HoloLens\ScriptBindings\GestureSource.cs:481)

(Filename: Assets/HoloToolkit/Input/Scripts/Focus/FocusManager.cs Line: 783)

Unity Editor Version

Unity 2017.2.0p1-MRTP4

Mixed Reality Toolkit Release Version

Commit cb59a1c7 (also tried 4daacf92 (Pull Request #1350))

StephenHodgson commented 6 years ago

I'll look into this ASAP

StephenHodgson commented 6 years ago

@Abstiens try the latest push to #1350 and let me know if it fixed your issue.

Abstiens commented 6 years ago

@StephenHodgson Will check it tomorrow morning Thank you :)

Abstiens commented 6 years ago

@StephenHodgson Yes, it is fixed. Thank your very much :)

StephenHodgson commented 6 years ago

Please leave issues open until PRs are merged. Thanks