mojira.dev
MC-248784

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.

  1. Put the game into fullscreen mode using F11

  2. Unplug the monitor that Minecraft is taking up

  3. Plug the monitor back in (so that you can see what's going on)

Stack trace

1.21\: [^crash-2024-06-20_15.26.41-client.txt]

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.

Attachments

Comments 5

With multiple monitors, I wasn't able to reproduce this.

Thanks for the info! Does that mean that you can reproduce it whe you only have one monitor plugged in?

I can't reproduce this when using the nvidia X server on linux - I suspect it's related to some driver/compositor behaviour that is specific to the OP configuration.

I cannot reproduce. Can you still confirm this in the latest versions?

This is still reproducible with the specified environment of Zorin OS 16.3 Core and the XFCE desktop environment. I have just been able to reproduce it by booting into the "Live environment" for Zorin OS 16.3 🙂

MMK21

(Unassigned)

Plausible

Platform

Important

Crash

1.18.1, 1.18.2 Pre-release 3, 1.18.2 Release Candidate 1, 1.21

Retrieved