IllegalArgumentException when unplugging monitor in fullscreen
The bug
When the game is in fullscreen, unplugging the monitor causes the game to crash.
How to reproduce
This bug is easiest to reproduce with a single-monitor setup.
- Put the game into fullscreen mode using F11
- Unplug the monitor that Minecraft is taking up
- Plug the monitor back in (so that you can see what's going on)
Stack trace
Description: Unexpected error java.lang.IllegalArgumentException: Window 1x54468 size out of bounds (max. size: 16384) at ezv.b(SourceFile:110) at ezv.d(SourceFile:69) at ezv.a(SourceFile:58) at fgo.a(SourceFile:1412) at fam.b(SourceFile:264) at org.lwjgl.glfw.GLFWFramebufferSizeCallbackI.callback(GLFWFramebufferSizeCallbackI.java:44) at org.lwjgl.system.JNI.invokeV(Native Method) at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3438) at com.mojang.blaze3d.systems.RenderSystem.pollEvents(SourceFile:150) at com.mojang.blaze3d.systems.RenderSystem.flipFrame(SourceFile:161) at fam.f(SourceFile:303) at fgo.c(SourceFile:1307) at fgo.f(SourceFile:882) at net.minecraft.client.main.Main.main(SourceFile:256) at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100) at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)
Notes
- If attempting to reproduce this issue with multiple monitors, ensure they are configured to "extend". The diagram in Display settings should show them next to each other, without overlapping.
- I discovered this while investigating changes to the ScreenManager in 1.18.2-pre3, but it affects older versions too.
2022-02-23, 08:01 PM
2024-11-22, 03:27 PM
3
4
1.18.1, 1.18.2 Pre-release 3, 1.18.2 Release Candidate 1, 1.21
-