mojira.dev
MC-119326

Minecraft crashes when starting with custom XRandR resolution

When starting Minecraft with a custom 61hz resolution active it crashes with the error

java.lang.ExceptionInInitializerError
        at bhz.av(SourceFile:661)
        at bhz.aq(SourceFile:456)
        at bhz.a(SourceFile:404)
        at net.minecraft.client.main.Main.main(SourceFile:123)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
        at org.lwjgl.opengl.XRandR.findPrimary(XRandR.java:326)
        at org.lwjgl.opengl.XRandR.ScreentoDisplayMode(XRandR.java:315)
        at org.lwjgl.opengl.LinuxDisplay$3.run(LinuxDisplay.java:746)
        at org.lwjgl.opengl.LinuxDisplay$3.run(LinuxDisplay.java:743)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.opengl.LinuxDisplay.init(LinuxDisplay.java:743)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:138)
        ... 4 more

To reproduce make a custom resolution in XRandR and set it. Then start Minecraft and it should crash.

Environment

OS : Kubuntu 17.04
Java : OpenJDK 1.8
CPU : AMD A8-4500M
GPU : Radeon HD 7640G
XRandR output (with custom 61hz resolution active)

Screen 0: minimum 320 x 200, current 1600 x 900, maximum 16384 x 16384
LVDS connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 382mm x 215mm
   1600x900      60.01 +  40.00  
   1440x900      59.99  
   1280x854      59.95  
   1280x800      59.96  
   1280x720      59.97  
   1152x768      59.95  
   1024x768      59.95  
   800x600       59.96  
   848x480       59.94  
   720x480       59.94  
   640x480       59.94  
   1600x900_61.00_rb  61.00* 
VGA-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)

Linked issues

Comments 0

No comments.

migrated

(Unassigned)

Unconfirmed

Linux, lwjgl

Minecraft 1.12

Retrieved