Search Issue Tracker

Fixed

Fixed in 2021.3.41f1, 2022.3.36f1, 6000.0.6f1, 7000.0.0a1

Votes

0

Found in

2021.3.38f1

2022.3.29f1

6000.0.2f1

7000.0.0a1

Issue ID

UUM-71828

Regression

No

[Linux] Crash on NewInput::MouseCallbacks::IOCTL when "WarpCursorPosition" function is called

--

-

Reproduction steps:
1. Open the attached “CrashRepro” project
2. Open the “MyEditorWindow” window (Test > Test)
3. Press the “Button” button

Expected result: The Editor does not crash
Actual result: The Editor crashes

Reproducible with: 2021.3.38f1, 2022.3.29f1, 6000.0.2f1

Reproducible on: Ubuntu 24.04, Ubuntu 22.04 (user)
Not reproducible on: Windows 10

First lines of the stack trace:
{{#0 0x007b640d842520 in __sigaction}}
{{#1 0x005c29e8b12f1a in NewInput::MouseCallbacks::IOCTL(int, void*, int)}}
{{#2 0x000000407ea653 in (wrapper managed-to-native) UnityEngineInternal.Input.NativeInputSystem:IOCTL (int,int,intptr,int)}}
{{#3 0x000000407ea553 in UnityEngine.InputSystem.LowLevel.NativeInputRuntime:DeviceCommand (int,UnityEngine.InputSystem.LowLevel.InputDeviceCommand*)}}
{{#4 0x000000407ea4fb in UnityEngine.InputSystem.InputDevice:ExecuteCommand (UnityEngine.InputSystem.LowLevel.InputDeviceCommand*)}}
{{#5 0x00000041b11ce7 in UnityEngine.InputSystem.InputDevice:ExecuteCommand<UnityEngine.InputSystem.LowLevel.WarpMousePositionCommand> (UnityEngine.InputSystem.LowLevel.WarpMousePositionCommand&)}}
{{#6 0x00000041b1194b in UnityEngine.InputSystem.Mouse:WarpCursorPosition (UnityEngine.Vector2)}}

  1. Resolution Note (fix version 6000.0.6f1):

    The WarpCursorPosition only works in PlayMode and moves the cursor relative to the GameView window but does nothing when in EditMode.

    However, the native IOCTL handler was missing a null-check for this scenario, causing the crash, which has been fixed.

Add comment

Log in to post comment