mojira.dev
MC-1371

Minecraft crashes at startup on Linux when using a dual monitor setup

When starting Minecraft on Linux with an external monitor connected and the internal screen disabled (e.g. a docked notebook), the game crashes before showing anything using OpenGL. The login screen works fine.

The stack trace is:
me@mymachine ~/Downloads % java -jar minecraft.jar
xxx achievements
xxx recipes
Setting user: xxx, -4994602101999570082
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerErro
r
at net.minecraft.client.Minecraft.a(SourceFile:205)
at net.minecraft.client.Minecraft.run(SourceFile:515)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at org.lwjgl.opengl.XRandR$Screen.<init>(XRandR.java:234)
at org.lwjgl.opengl.XRandR$Screen.<init>(XRandR.java:196)
at org.lwjgl.opengl.XRandR.populate(XRandR.java:87)
at org.lwjgl.opengl.XRandR.access$100(XRandR.java:52)
at org.lwjgl.opengl.XRandR$1.run(XRandR.java:110)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.opengl.XRandR.getConfiguration(XRandR.java:108)
at org.lwjgl.opengl.LinuxDisplay.init(LinuxDisplay.java:618)
at org.lwjgl.opengl.Display.<clinit>(Display.java:135)
... 3 more
java -jar minecraft.jar 11,77s user 0,41s system 123% cpu 9,902 total

I'm pretty sure that the problem is the version of lwjgl shipped with Minecraft, as it doesn't happen when manually copying an updated jar and native binary to the .minecraft directory with the exact same setup.

So I guess updating lwjgl (at least for Linux) should be enough to fix this.

Comments 10

I can confirm that i also encounter this issue on Fedora 17 and Fedora 18.

following the following directions from comment #8 here fixed the issue for me:
https://bbs.archlinux.org/viewtopic.php?pid=876274#p876274

Although i updated lwjgl to the most recent stable release, (lwjgl-2.8.5), following these directions updated it and now works when more than one monitor is connected on Linux.

Is there any way to get lwjgl updated in the minecraft launcher?

I also started experiencing this error. Ryan Lerch's linked to fix of updating lwjgl worked for me as well

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

I can confirm this on Debian wheezy for 1.4.6-pre.
In my case the problem occurs when changing from a dual monitor configuration to single monitor via XRandR and pressing the login button after that.
The problem does not occur when the original screen configuration is maintained until LWJGL has loaded, after that you can safely disable the second monitor.
I use a bash script that deactivates the second monitor after LWJGL has loaded as a workaround but it should probably be fixed in the LWJGL version downloaded by Minecraft.

Just downloaded a fresh minecraft.jar, deleted "~/.minecraft" and ran minecraft again, and still getting the issue.

regards,
ryanlerch

When they rewrite the rendering engine (http://www.minecraftwiki.net/wiki/Redstone_Update#Rendering_engine_rewrite) they should consider updating to a more recent version of LWJGL that fixes this.

Yes Mojang is well aware of the fact that they are using an old LWJGL version and will update as soon as possible, until then please update LWJGL manually.

http://www.minecraftforum.net/topic/53709-solved-black-screen-after-login-ubuntu-1010/

That's from 2010, and still no updated LWGL? Minecraft 1.5.1 (vanilla) and I still have this issue. Updating to LWGL 2.8.5 (from November 2012) fixed this issue for me.

I also have this issue.

Manually updating LWJGL solved the issue for me too.

Lukas R

(Unassigned)

Unconfirmed

Minecraft 1.4.2, Minecraft 1.4.6

Retrieved