[1.21.9] Game hangs when calling `java.awt.Desktop::isDesktopSupported`
Minecraft Version: 1.21.9
NeoForge Version: 21.9.11-beta
Logs: latest.log
Steps to Reproduce:
- Add a call to
java.awt.Desktop.isDesktopSupported() - 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.
Here is the mod I'm using this for: https://github.com/Fuzss/deleteworldstotrash
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.
Edited my original description: The issue is also present on 1.21.8, so nothing new after all.