Skip to content

Godot hangs when there is a change to USB devices #105271

Open
@grofit

Description

@grofit

Tested versions

  • Originally happened in released game running Godot 4.3.* (Nomad Idle)
  • Verified behaviour locally using Godot 4.4.1

System information

Windows 11 Pro - Godot Engine v4.4.1.stable.mono.official.49a5bc7b6 - Vulkan 1.3.302 - Forward+ - Using Device #0: AMD - AMD Radeon RX 9070

Issue description

Whenever there is an alteration of USB devices on the host system it causes Godot to hang and in some instances be unrecoverable and need manually closing. I have been unable to get a crash report as it just locks up and refuses to close and the logs show nothing, happy to get more information if someone can provide instructions on how to get info when its hung as editor is also unresponsive during this time.

In my specific scenario I am using a USB switcher to switch a wired USB Keyboard/Mouse between two host PCs, switching away from the PC running Godot is not an issue, but when I switch the USB devices back to the pc running Godot the player hangs and is often unrecoverable, I have had someone separately reproduce the hanging by plugging in a USB gamepad while a Godot game (Nomad Idle) is running, they were unable to get an unrecoverable hang, but they reported it hangs for a few seconds whenever they plug in their USB device.

There have been related issues over the years but they seem to have been marked as fixed:

It is anecdotal but it seems more likely to enter an unrecoverable hang when its under more load, so I am unsure if there is some internal race condition.

Steps to reproduce

  • Load Godot Editor (ideally with something moving in scene to visually see it hang)
  • Run the scene
  • Plug in a USB device (for me a keyboard/mouse, for others a gamepad)
  • The scene in the player hangs for a second or two

If you are unable to get it to be unrecoverable try to put the scene under load and try to plug the USB device in.

Minimal reproduction project (MRP)

A fresh Godot project should show same issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    For team assessment

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions