Application crash after the addition of the Motion Controller pointing ray
Does this affect the legacy HoloToolkit (master) or the Mixed Reality Toolkit (mrtk_release)? HoloToolkit
Describe the bug After the addition of the motion controller pointing ray there are some crashes that I can see from the report of my app. The problem seems related to the initialization of the AnimationCurve that is used by the DistorterGravity component (used by PointerLine) The crash is this:
application_fault_1007_unityplayer.dll!scripting_array_element_ptr
This is the stack trace:
0 KERNELBASE.dll RaiseException 0x0000000000000068
1 VCRUNTIME140_APP.dll _CxxThrowException 0x00000000000000AD
2 vccorlib140_app.DLL __abi_WinRTraiseNullReferenceException 0x000000000000003A
3 UnityPlayer.dll __abi_WinRTraiseException 0x0000000000000075
4 UnityPlayer.dll scripting_array_element_ptr 0x000000000000005F
5 UnityPlayer.dll Scripting::GetScriptingArrayStart_KeyframeTpl_float_ _ 0x000000000000004F
6 UnityPlayer.dll SetKeysOnAnimationCurve 0x0000000000000051
7 UnityPlayer.dll AnimationCurve_CUSTOM_Init 0x00000000000001C4
8 UnityEngineDelegates.dll AnimationCurve_CUSTOM_Init 0x000000000000008F
9 UnityEngineProxy.dll UnityEngineProxy::InternalCalls.AnimationCurve_CUSTOM_Init 0x00000000000000B1
10 UnityEngine.CoreModule.dll UnityEngine::AnimationCurve.EaseInOut 0x00000000000000CF
11 Assembly-CSharp.dll HoloToolkit::Unity::UX::DistorterGravity..ctor 0x000000000000003C
12 Assembly-CSharp.dll HoloToolkit::Unity::UX::DistorterGravity..ctor 0x0000000000000017
13 Assembly-CSharp.dll UnityEngine::Internal::Types::$UnityType1391.CreateInstanceAndInvokeDefaultConstructor 0x000000000000002B
14 UnityEngine.CoreModule.dll UnityEngine::Internal::$MethodUtility.CreateInstanceAndInvokeDefaultConstructor 0x000000000000004B
15 WinRTBridge.winmdobj WinRTBridge::MethodTools::InvokeMethodTypeDelegate.InvokeOpenStaticThunk 0x0000000000000022
16 UnityPlayer.dll scripting_unity_engine_object_new_and_invoke_default_constructor 0x00000000000000CC
17 UnityPlayer.dll MonoBehaviour::RebuildMonoInstance 0x00000000000001B5
18 UnityPlayer.dll PersistentManager::ProduceObjectInternal 0x00000000000004FD
19 UnityPlayer.dll PersistentManager::CreateThreadActivationQueueEntry 0x000000000000009E
20 UnityPlayer.dll PersistentManager::PreallocateObjectThreaded 0x000000000000017D
21 UnityPlayer.dll ImmediatePtr_Unity::Component_::Transfer_StreamedBinaryRead_0_ _ 0x00000000000000BA
22 UnityPlayer.dll StreamedBinaryRead_0_::TransferSTLStyleArray_dynamic_array_GameObject::ComponentPair,8_ _ 0x000000000000007C
23 UnityPlayer.dll GameObject::Transfer_StreamedBinaryRead_0_ _ 0x000000000000002C
24 UnityPlayer.dll SerializedFile::ReadObject 0x000000000000017D
25 UnityPlayer.dll PersistentManager::ReadAndActivateObjectThreaded 0x00000000000000A1
26 UnityPlayer.dll PersistentManager::LoadFileCompletelyThreaded 0x0000000000000366
27 UnityPlayer.dll LoadSceneOperation::Perform 0x000000000000029D
28 UnityPlayer.dll PreloadManager::ProcessSingleOperation 0x000000000000003C
29 UnityPlayer.dll PreloadManager::Run 0x00000000000000D6
30 UnityPlayer.dll PreloadManager::Run 0x0000000000000009
31 UnityPlayer.dll Thread::RunThreadWrapper 0x0000000000000025
32 UnityPlayer.dll _lambda_8d314cbcea9b8b93920630789704d52d_::operator 0x000000000000001C
33 UnityPlayer.dll ?__abi_Windows_System_Threading_WorkItemHandler___abi_IDelegate____abi_Invoke@?Q__abi_IDelegate@WorkItemHandler@Threading@System@Windows@@2345@UE$AAAJPE$AAUIAsyncAction@Foundation@5@ 0x0000000000000031
34 threadpoolwinrt.dll Windows::System::Threading::CThreadPoolWorkItem::CommonWorkCallback 0x00000000000000AA
35 threadpoolwinrt.dll Windows::System::Threading::CThreadPoolWorkItem::TimeSlicedCallback 0x0000000000000022
36 kernel32.dll BaseThreadInitThunk 0x0000000000000014
37 ntdll.dll RtlUserThreadStart 0x0000000000000021
To Reproduce I can't reproduce this issue on my machine
Expected behavior No crash
Actual behavior Crash
Unity Editor Version 2017.4.9f1
Mixed Reality Toolkit Release Version 2017.4.0.0
Additional context I thought it was a problem of unity so I opened an issue with them but after several checks we have not come to any solution. The problem is present both with OS Build 10.0.16299 and with OS Build 10.0.17134 These are some of the models of devices where the problem occurs:

Is there anyone else who has encountered the same problem and maybe has a complete crash dump?
If your version of Mixed Reality Toolkit is 2017.4.0.0, so i think you use HoloToolkit (master branch) and not Mixed Reality Toolkit (mrtk_release). The version of Mixed Reality Toolkit (mrtk_release) is 2018.8.0.0.
Since HoloToolkit was renamed to Mixed Reality Toolkit too a couple of day ago, it can be confusing.
@architekth Edited the issue Thanks
What are the steps to reproduce?
Unfortunately I don't have any steps to reproduce the problem.
I think it happens when the application starts and the user uses the trigger the first time.
I tried to see with the debugger if there could be some strange and I saw this error in the console of Unity (perhaps but only due to the debugger):

I found other cases with the same problem. The stack trace is this:
0 KERNELBASE.dll RaiseException 0x0000000000000068 1 VCRUNTIME140_APP.dll CxxThrowException 0x00000000000000AD 2 vccorlib140_app.DLL abi_WinRTraiseNullReferenceException 0x000000000000003A 3 UnityPlayer.dll abi_WinRTraiseException 0x0000000000000075 4 UnityPlayer.dll scripting_array_element_ptr 0x000000000000005F 5 UnityPlayer.dll Scripting::GetScriptingArrayStart_KeyframeTpl_float _ 0x000000000000004F 6 UnityPlayer.dll SetKeysOnAnimationCurve 0x0000000000000051 7 UnityPlayer.dll AnimationCurve_CUSTOM_Init 0x00000000000001C4 8 UnityEngineDelegates.dll AnimationCurve_CUSTOM_Init 0x000000000000008F 9 UnityEngineProxy.dll UnityEngineProxy::InternalCalls.AnimationCurve_CUSTOM_Init 0x00000000000000B1 10 UnityEngine.CoreModule.dll UnityEngine::AnimationCurve.Linear 0x00000000000000EB 11 Assembly-CSharp.dll HoloToolkit::Unity::UX::LineBase..ctor 0x00000000000000A3 12 Assembly-CSharp.dll HoloToolkit::Unity::UX::Line..ctor 0x0000000000000033 13 Assembly-CSharp.dll HoloToolkit::Unity::UX::Line..ctor 0x0000000000000017 14 Assembly-CSharp.dll UnityEngine::Internal::Types::$UnityType1403.CreateInstanceAndInvokeDefaultConstructor 0x000000000000002B 15 UnityEngine.CoreModule.dll UnityEngine::Internal::$MethodUtility.CreateInstanceAndInvokeDefaultConstructor 0x000000000000004B 16 WinRTBridge.winmdobj WinRTBridge::MethodTools::InvokeMethodDelegate.InvokeOpenStaticThunk 0x0000000000000022 17 UnityPlayer.dll scripting_unity_engine_object_new_and_invoke_default_constructor 0x00000000000000CC 18 UnityPlayer.dll MonoBehaviour::RebuildMonoInstance 0x00000000000001B5 19 UnityPlayer.dll PersistentManager::ProduceObjectInternal 0x00000000000004FD 20 UnityPlayer.dll PersistentManager::CreateThreadActivationQueueEntry 0x000000000000009E 21 UnityPlayer.dll PersistentManager::PreallocateObjectThreaded 0x000000000000017D 22 UnityPlayer.dll ImmediatePtr_Unity::Component::Transfer_StreamedBinaryRead_0 _ 0x00000000000000BA 23 UnityPlayer.dll StreamedBinaryRead_0::TransferSTLStyleArray_dynamic_array_GameObject::ComponentPair,8 _ 0x000000000000007C 24 UnityPlayer.dll GameObject::Transfer_StreamedBinaryRead_0_ _ 0x000000000000002C 25 UnityPlayer.dll SerializedFile::ReadObject 0x000000000000017D 26 UnityPlayer.dll PersistentManager::ReadAndActivateObjectThreaded 0x00000000000000A1 27 UnityPlayer.dll PersistentManager::LoadFileCompletelyThreaded 0x0000000000000366 28 UnityPlayer.dll LoadSceneOperation::Perform 0x000000000000029D 29 UnityPlayer.dll PreloadManager::ProcessSingleOperation 0x000000000000003C 30 UnityPlayer.dll PreloadManager::Run 0x00000000000000D6 31 UnityPlayer.dll PreloadManager::Run 0x0000000000000009 32 UnityPlayer.dll Thread::RunThreadWrapper 0x0000000000000025 33 UnityPlayer.dll lambda_8d314cbcea9b8b93920630789704d52d::operator 0x000000000000001C 34 UnityPlayer.dll ?__abi_Windows_System_Threading_WorkItemHandler___abi_IDelegate____abi_Invoke@?Q__abi_IDelegate@WorkItemHandler@Threading@System@Windows@@2345@UE$AAAJPE$AAUIAsyncAction@Foundation@5@ 0x0000000000000031 35 threadpoolwinrt.dll Windows::System::Threading::CThreadPoolWorkItem::CommonWorkCallback 0x00000000000000AA 36 threadpoolwinrt.dll Windows::System::Threading::CThreadPoolWorkItem::TimeSlicedCallback 0x0000000000000022 37 kernel32.dll BaseThreadInitThunk 0x0000000000000014 38 ntdll.dll RtlUserThreadStart 0x0000000000000021
The models of the devices are: Acer-Aspire E1-472G, Sony Corporation-VPCL236FX So the problem seems to be the constructor of AnimationCurve (both EaseInOut and Linear call the AnimationCurve constructor with two keyframes). At this point I think it's a problem with Unity. I forwarded this new information to Unity.
Closing issues older than 180 days. If this is still an issue, please reactivate with recent information.