PatHightree / SpaceNavigator

SpaceNavigator driver for Unity3D
MIT License
170 stars 55 forks source link

Unity crashes when plugging in wireless adapter #50

Open pwassink1 opened 2 years ago

pwassink1 commented 2 years ago

Describe the bug See title

To Reproduce The program crashes when I do the following steps:

load new unity scene import 2.0.0-beta.7 Space Navigator accept new imput API (or don't and change the setting manually) if the wireless adapter, connected to a wireless space navigator, is in my computer unity crashes inmediately. if it isn't in my computer nothing'll happen... Until I plug it in, which will cause the program to crash

Details:

Additional context

3Dconnexion drivers installed or not doesn't change the problem. disabling the KMJ Emulator doesn't change the problem.

When I wire the wireless navigator to the pc It won't crash, but I get no rotation. also, it'll strave ever so slightly (in proportion with the translation speed) Same as this thread: https://github.com/PatHightree/SpaceNavigator/issues/32

Unity Crash log: Obtained 30 stack frames 0x00007ff73e668080 (Unity) InputDeviceIOCTL 0x00007ff73d5fa04e (Unity) NativeInputSystem_CUSTOM_IOCTL 0x000002ca758e9a93 (Mono JIT Code) (wrapper managed-to-native) UnityEngineInternal.Input.NativeInputSystem:IOCTL (int,int,intptr,int) 0x000002ca758e9973 (Mono JIT Code) [NativeInputRuntime.cs:46] UnityEngine.InputSystem.LowLevel.NativeInputRuntime:DeviceCommand (int,UnityEngine.InputSystem.LowLevel.InputDeviceCommand) 0x000002ca758e990e (Mono JIT Code) [InputDevice.cs:581] UnityEngine.InputSystem.InputDevice:ExecuteCommand (UnityEngine.InputSystem.LowLevel.InputDeviceCommand) 0x000002ca758e9fb3 (Mono JIT Code) [InputDevice.cs:576] UnityEngine.InputSystem.InputDevice:ExecuteCommand (UnityEngine.InputSystem.LowLevel.RequestSyncCommand&) 0x000002ca758e9bb3 (Mono JIT Code) [InputDevice.cs:840] UnityEngine.InputSystem.InputDevice:RequestSync () 0x000002ca758e4ad3 (Mono JIT Code) [InputManager.cs:1175] UnityEngine.InputSystem.InputManager:AddDevice (UnityEngine.InputSystem.InputDevice) 0x000002ca74ba67eb (Mono JIT Code) [InputManager.cs:1067] UnityEngine.InputSystem.InputManager:AddDevice (UnityEngine.InputSystem.Utilities.InternedString,int,string,UnityEngine.InputSystem.Layouts.InputDeviceDescription,UnityEngine.InputSystem.InputDevice/DeviceFlags,UnityEngine.InputSystem.Utilities.InternedString) 0x000002ca74ba093b (Mono JIT Code) [InputManager.cs:1209] UnityEngine.InputSystem.InputManager:AddDevice (UnityEngine.InputSystem.Layouts.InputDeviceDescription,bool,string,int,UnityEngine.InputSystem.InputDevice/DeviceFlags) 0x000002ca726efb3b (Mono JIT Code) [InputManager.cs:2464] UnityEngine.InputSystem.InputManager:OnNativeDeviceDiscovered (int,string) 0x000002ca726ef516 (Mono JIT Code) UnityEngineInternal.Input.NativeInputSystem:NotifyDeviceDiscovered (int,string) 0x000002ca726ef5bf (Mono JIT Code) (wrapper runtime-invoke) :runtime_invoke_void_int_object (object,intptr,intptr,intptr) 0x00007ffbe30be0a4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke 0x00007ffbe2ffe744 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke 0x00007ffbe2ffe8dc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke 0x00007ff73e1cfd84 (Unity) scripting_method_invoke 0x00007ff73e1ca9a4 (Unity) ScriptingInvocation::Invoke 0x00007ff73e1c42c5 (Unity) ScriptingInvocation::Invoke 0x00007ff73e308f8b (Unity) Scripting::UnityEngineInternal::Input::NativeInputSystemProxy::NotifyDeviceDiscovered 0x00007ff73e668ff7 (Unity) SendDeviceDiscoveriesToScript 0x00007ff73e668267 (Unity) InputUpdate 0x00007ff73e667d49 (Unity) InternalInitializeModule_Input'::2'::editorBeforeUpdateRegistrator::Forward 0x00007ff73d5338d9 (Unity) CallbackArray::Invoke 0x00007ff73edd7196 (Unity) Application::TickTimer 0x00007ff73f21f8aa (Unity) MainMessageLoop 0x00007ff73f22417b (Unity) WinMain 0x00007ff74054582e (Unity) __scrt_common_main_seh 0x00007ffc73bb7034 (KERNEL32) BaseThreadInitThunk 0x00007ffc75082651 (ntdll) RtlUserThreadStart

JamesKilroy commented 1 year ago

I am having the same issue in Unity 2021.3.7f1.

Fresh URP project with only the new input system package added. Once driver 2.0.0-beta.7 is installed unity crashes.

Unity crash log Obtained 56 stack frames 0x00007ff7353f97d0 (Unity) InputDeviceIOCTL 0x00007ff73438259e (Unity) NativeInputSystem_CUSTOM_IOCTL 0x000001c45bebf3a3 (Mono JIT Code) (wrapper managed-to-native) UnityEngineInternal.Input.NativeInputSystem:IOCTL (int,int,intptr,int) 0x000001c45bebf273 (Mono JIT Code) [NativeInputRuntime.cs:46] UnityEngine.InputSystem.LowLevel.NativeInputRuntime:DeviceCommand (int,UnityEngine.InputSystem.LowLevel.InputDeviceCommand*) 0x000001c45bebf20e (Mono JIT Code) [InputDevice.cs:581] UnityEngine.InputSystem.InputDevice:ExecuteCommand (UnityEngine.InputSystem.LowLevel.InputDeviceCommand*) 0x000001c45bebf0f3 (Mono JIT Code) [InputDevice.cs:576] UnityEngine.InputSystem.InputDevice:ExecuteCommand (UnityEngine.InputSystem.LowLevel.RequestSyncCommand&) 0x000001c45bebec93 (Mono JIT Code) [InputDevice.cs:840] UnityEngine.InputSystem.InputDevice:RequestSync () 0x000001c45beba503 (Mono JIT Code) [InputManager.cs:1175] UnityEngine.InputSystem.InputManager:AddDevice (UnityEngine.InputSystem.InputDevice) 0x000001c45be7f1ab (Mono JIT Code) [InputManager.cs:1067] UnityEngine.InputSystem.InputManager:AddDevice (UnityEngine.InputSystem.Utilities.InternedString,int,string,UnityEngine.InputSystem.Layouts.InputDeviceDescription,UnityEngine.InputSystem.InputDevice/DeviceFlags,UnityEngine.InputSystem.Utilities.InternedString) 0x000001c45be690bb (Mono JIT Code) [InputManager.cs:702] UnityEngine.InputSystem.InputManager:AddAvailableDevicesMatchingDescription (UnityEngine.InputSystem.Layouts.InputDeviceMatcher,UnityEngine.InputSystem.Utilities.InternedString) 0x000001c45be67bcb (Mono JIT Code) [InputManager.cs:588] UnityEngine.InputSystem.InputManager:RegisterControlLayoutMatcher (string,UnityEngine.InputSystem.Layouts.InputDeviceMatcher) 0x000001c45be67993 (Mono JIT Code) [InputSystem.cs:244] UnityEngine.InputSystem.InputSystem:RegisterLayout (System.Type,string,System.Nullable`1) 0x000001c45be4fab3 (Mono JIT Code) [InputSystem.cs:262] UnityEngine.InputSystem.InputSystem:RegisterLayout (string,System.Nullable`1) 0x000001c45bf13aeb (Mono JIT Code) [SpaceNavigatorHID.cs:78] SpaceNavigatorDriver.SpaceNavigatorHID:.cctor () 0x000001c45be4cafd (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr) 0x00007ffc35f8fe24 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke 0x00007ffc35ece764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke 0x00007ffc35ec9810 (mono-2.0-bdwgc) [object.c:563] mono_runtime_class_init_full 0x00007ffc35f875ae (mono-2.0-bdwgc) [mini.c:4222] mono_jit_compile_method_inner 0x00007ffc35f8dd4c (mono-2.0-bdwgc) [mini-runtime.c:2700] mono_jit_compile_method_with_opt 0x00007ffc36080c5f (mono-2.0-bdwgc) [mini-trampolines.c:641] common_call_trampoline 0x00007ffc36081828 (mono-2.0-bdwgc) [mini-trampolines.c:781] mono_magic_trampoline 0x000001c35a7103a6 (()) 0x000001c45be4c96b (Mono JIT Code) [SpaceNavigatorEnterpriseHID.cs:67] SpaceNavigatorDriver.SpaceNavigatorEnterpriseHID:.cctor () 0x000001c45be4cafd (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr) 0x00007ffc35f8fe24 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke 0x00007ffc35ece764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke 0x00007ffc35ec9810 (mono-2.0-bdwgc) [object.c:563] mono_runtime_class_init_full 0x00007ffc35e36290 (mono-2.0-bdwgc) [icall-def.h:751] ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor_raw 0x000001c45be4c66a (Mono JIT Code) (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor (intptr) 0x000001c45be4c55b (Mono JIT Code) System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor (System.RuntimeTypeHandle) 0x000001c45be4b3bb (Mono JIT Code) UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes (System.Type[]) 0x000001c458dca998 (Mono JIT Code) (wrapper runtime-invoke) :runtime_invoke_void_object (object,intptr,intptr,intptr) 0x00007ffc35f8fe24 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke 0x00007ffc35ece764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke 0x00007ffc35ece8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke 0x00007ff734f606a4 (Unity) scripting_method_invoke 0x00007ff734f5b224 (Unity) ScriptingInvocation::Invoke 0x00007ff734f54b45 (Unity) ScriptingInvocation::Invoke 0x00007ff735094033 (Unity) Scripting::UnityEditor::EditorAssembliesProxy::ProcessInitializeOnLoadAttributes 0x00007ff734f34b7b (Unity) MonoManager::SetupLoadedEditorAssemblies 0x00007ff734f2a74d (Unity) MonoManager::EndReloadAssembly 0x00007ff734f32178 (Unity) MonoManager::ReloadAssembly 0x00007ff735e6bd9e (Unity) Internal_ADB_Only_ReloadAllUsedAssemblies 0x00007ff736327027 (Unity) ImportOutOfDateAssets 0x00007ff736332ea3 (Unity) RefreshInternalV2 0x00007ff73633a67b (Unity) StopAssetImportingV2Internal 0x00007ff7363342ac (Unity) RefreshV2 0x00007ff7362ac570 (Unity) AssetDatabase::Refresh 0x00007ff7342bbf91 (Unity) CallbackArray::Invoke 0x00007ff735b6a994 (Unity) Application::TickTimer 0x00007ff735fb696a (Unity) MainMessageLoop 0x00007ff735fbb21b (Unity) WinMain 0x00007ff73734053e (Unity) __scrt_common_main_seh 0x00007ffcaa667034 (KERNEL32) BaseThreadInitThunk 0x00007ffcabb42651 (ntdll) RtlUserThreadStart
PatHightree commented 1 year ago

Can you check if the issue still occurs with version 2.0.0-pre.9 ?

pwassink1 commented 1 year ago

Can you check if the issue still occurs with version 2.0.0-pre.9 ?

Sadly it didn't help. I've got the same exact problems as described in the top post

Remy-Maetz commented 1 year ago

Exactly the same issue on my side currently with a brand new SpaceMouse Pro Wireless and Unity 2021.3.15f1 . If any logs can help to figure out the issue, I'd be happy to provide them.