Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash if all monitors show as disconnected #167

Open
ajuniper opened this issue Nov 24, 2022 · 0 comments
Open

Crash if all monitors show as disconnected #167

ajuniper opened this issue Nov 24, 2022 · 0 comments

Comments

@ajuniper
Copy link

Junior family member had knocked the cable just far enough out of the monitor to prevent xrandr showing anything useful, even though the system had booted and selected the resolution correctly, and everything was displaying as expected.
But Minecraft refused to start, just never appeared.
Eventually found this in the Minecraft log:

java.lang.ExceptionInInitializerError
        at ave.ar(SourceFile:560)
        at ave.am(SourceFile:361)
        at ave.a(SourceFile:310)
        at net.minecraft.client.main.Main.main(SourceFile:124)
Caused by: java.lang.NullPointerException
        at org.lwjgl.opengl.LinuxDisplay.getAvailableDisplayModes(LinuxDisplay.java:947)
        at org.lwjgl.opengl.LinuxDisplay.init(LinuxDisplay.java:738)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:138)
        ... 4 more

Which led me to try xrandr:

$ xrandr -q
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
VGA-1 disconnected primary (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
  1920x1080 (0x46) 148.500MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.50KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  60.00Hz

Eventually I gave up googling and checked the monitor cable... tightened it up, xrandr is happy and so is Minecraft (and the Minecraft player):

$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
VGA-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+
   1600x1200     60.00  
   1680x1050     59.88  
   1400x1050     59.95  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  

This is Ubuntu 20.04, Minecraft is 1.8.9 and has loaded this lwjgl:

~/.minecraft/libraries/org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar

OK, so this is an unlikely edge case on an old version and unlikely to get updated, maybe the newer code handles this better already, but maybe this report will help guide someone else hitting the same issue to resolve the problem much quicker than it's take me to!

And if it's possible to make future versions handle this error more gracefully, then so much the better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant