FancyModLoader icon indicating copy to clipboard operation
FancyModLoader copied to clipboard

[1.21.9] Game hangs when calling `java.awt.Desktop::isDesktopSupported`

Open Fuzss opened this issue 3 months ago • 3 comments

Minecraft Version: 1.21.9

NeoForge Version: 21.9.11-beta

Logs: latest.log

Steps to Reproduce:

  1. Add a call to java.awt.Desktop.isDesktopSupported()
  2. Infinite hang when the method is invoked

Description of issue: The game hangs, there is no crash. The log shows nothing.

Can easily be reproduced using the NeoForge examplemod template.

This is happening on macOS, might behave differently on other systems.

Works fine on Fabric, also hasn't been an issue on NeoForge in the past (<1.21.9).

Edits: By works fine on Fabric I was referring to the fact that the game does not hang and is able to call Desktop::isDesktopSupported without issues. The method however does return false (at least for my system).

Also turns out this has been an issue before on NeoForge, I was now able to reproduce it on 1.21.8.

Fuzss avatar Oct 04 '25 15:10 Fuzss

Here is the mod I'm using this for: https://github.com/Fuzss/deleteworldstotrash

Fuzss avatar Oct 04 '25 15:10 Fuzss

Able to replicate behavior on intel-based Macs that do not support desktop awt.

Works without issue on Windows and Fedora it seems.

Tracing it further seems to be an issue with the construction of the LWCToolkit due to the early loading screen. Disabling it mitigates the issue.

ChampionAsh5357 avatar Oct 04 '25 22:10 ChampionAsh5357

Edited my original description: The issue is also present on 1.21.8, so nothing new after all.

Fuzss avatar Oct 05 '25 08:10 Fuzss