2

So minecraft was working properly until I Tried to install forge.

Here is the error message/log/crash report

---- Minecraft Crash Report ----
// Don't do that.

Time: 7/13/19 10:48 PM
Description: Initializing game

java.lang.ExceptionInInitializerError
    at Config.getDisplayModes(Config.java:1854)
    at bid$a.<clinit>(GameSettings.java:3569)
    at bid.<init>(GameSettings.java:331)
    at bib.aq(SourceFile:443)
    at bib.a(SourceFile:404)
    at net.minecraft.client.main.Main.main(SourceFile:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
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)
    ... 12 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
    at Config.getDisplayModes(Config.java:1854)
    at bid$a.<clinit>(GameSettings.java:3569)
    at bid.<init>(GameSettings.java:331)
    at bib.aq(SourceFile:443)

-- Initialization --
Details:
Stacktrace:
    at bib.a(SourceFile:404)
    at net.minecraft.client.main.Main.main(SourceFile:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
    Minecraft Version: 1.12.2
    Operating System: Linux (arm) version 4.19.56-v7+
    Java Version: 1.8.0_211, Oracle Corporation
    Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
    Memory: 97192960 bytes (92 MB) / 167899136 bytes (160 MB) up to 1060372480 bytes (1011 MB)
    JVM Flags: 5 total; -Xmn128M -Xmx1024M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    Launched Version: 1.12
    LWJGL: 2.9.4
    OpenGL: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
    GL Caps: 
    Using VBOs: ~~ERROR~~ NullPointerException: null
    Is Modded: Very likely; Jar signature invalidated
    Type: Client (map_client.txt)
    Resource Packs: ~~ERROR~~ NullPointerException: null
    Current Language: ~~ERROR~~ NullPointerException: null
    Profiler Position: N/A (disabled)
    CPU: <unknown>

I have enabled fake KMS, could you please help me?

Extra info: xrandr -q

Screen 0: minimum 320 x 200, current 1024 x 768, maximum 7680 x 7680
HDMI-1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1280x768      60.02  
   1024x768      60.00* 
   800x600       60.32    56.25  
   848x480       60.00  
   640x480       59.94  
pi@raspberrypi:~ $ xrandr -v
xrandr program version       1.5.0
Server reports RandR version 1.5
pi@raspberrypi:~ $ xrandr --current
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 7680 x 7680
HDMI-1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1280x768      60.02  
   1024x768      60.00* 
   800x600       60.32    56.25  
   848x480       60.00  
   640x480       59.94  

REGULAR

Screen 0: minimum 320 x 200, current 1280 x 768, maximum 7680 x 7680
HDMI-1 connected primary 1280x768+0+0 (normal left inverted right x axis y axis) 708mm x 398mm
   1280x768      59.99*+
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    60.00  
   1152x648      75.01  
   1024x576      85.06  
   832x624       74.55  
   800x600       75.00    60.32  
   720x576       50.00  
   800x450       85.04  
   720x480       60.00    59.94  
   640x480       75.00    60.00    59.95    59.94  
   640x360       84.95  
  • LWGL apparently isn't liking your XRandR configuration and couldn't find your display. This might have been caused indirectly caused by Forge but also possible that something changed in your monitor/video configuration independently. Some useful debug info would be your output of xrandr -q, xrandr -v, and xrandr --current, and ensuring $DISPLAY is set from wherever you're running this, and trying with full KMS too. – jdonald Jul 20 at 22:12
  • Jdonald done it, This is what is looks like when I can run minecraft – FluxedScript Jul 21 at 11:49
  • 1
    Okay I guess -q and --current are the same. The two strange things are that your monitor is 1024x768 (seems pretty small for the year 2019!) and it reports 0mm x 0mm. Do you have another (larger) HDMI monitor to test with? And are you absolutely sure you're running OpenGL with Fake KMS, and not the legacy driver? Run glxgears and confirm it gets close to 60 fps to be sure, and it still wouldn't hurt to try OpenGL with full KMS too. – jdonald Jul 22 at 0:35
  • 303 frames in 5.0 seconds = 60.407 FPS 301 frames in 5.0 seconds = 60.001 FPS I am using a tv by the way using hdmi – FluxedScript Jul 23 at 21:18
3

I am using a (1024x768) tv by the way using hdmi

According to this ticket, LWJGL at one time did not support interlaced displays. The reported symptom is exactly the error you have encountered: "an ArrayIndexOutOfBoundsException in XRandR.findPrimary()"

If you wish to use a use a television with Forge 1.12.2, it'll have to be one with progressive scan.

According to Mojang's ticket this is fixed in LWJGL3 so the problem goes away in version 1.13 or above.

If the interlaced TV works with regular Minecraft 1.12.2, it's possible that the official version uses a patched LWJGL 2.9.x, but Forge's infrastructure unfortunately uses a different version of the library with the bug. I see the official 1.12.2 binary using 2.9.4-nightly-20150209 while Forge 1.12.2 depends on 2.9.2-nightly-20140822. If you cannot obtain another display, you may try patching Forge's gradle configuration to exclusively use 2.9.4-nightly-20150209.

For displays that work with neither vanilla Minecraft nor Forge: As explained by Yulius, LWJGL2 uses either the output of xrandr -q output or the libxrandr API, and neither implementation works perfectly for every display. While it's theoretically possible to write a shim to override these channels, eventually it becomes more practical to upgrade to 1.13 or above (LWJGL3). This practically requires a Pi 4, at least 2 GB of memory, and working through the challenges of newer software.

  • Minecraft 1.12.2 works fine, how do I know if mine comes with progressive scan? My tv is a Phillips. – FluxedScript Jul 24 at 8:18
  • For higher resolutions it's easy to distinguish because 1080p means progressive and 1080i means interlaced, but it's harder to know with 1024x768. I'm guessing you don't have the manual that came in the box, so you could contact the manufacturer. Chances are you TV is interlaced. Assuming you aren't willing to replace the television, I have edited my answer above with another potential workaround. If that fails, follow on this thread where we may resort to wrapping xrandr. – jdonald Jul 24 at 18:25
  • Sorry this is late I was on holiday, Minecraft 1.12.2 with no mods just the regular version doesn't work, see the last bit labelled regular – FluxedScript Aug 6 at 8:25
  • Apparently your new screen is 1280x768 and 71cm x 41cm, and it fails with regular Minecraft while your earlier earlier 1024x768 TV worked in that case? I've added more text to my answer to make it complete for the general case, but for troubleshooting your problem now probably best to do so on another forum. Try posting details here: raspberrypi.org/forums/… as there's one user in a somewhat related display mismatch.. – jdonald Aug 6 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.