Minecraft (Java on Xmir) crashes with: OpenGL: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.

Bug #1583538 reported by Stephen M. Webb on 2016-05-19
This bug affects 3 people
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)

Bug Description

User reports error when attempting to start applications that use OpenGL when using the desktop personality. See traceback below.

Time: 2016-05-18 21:26
Description: Initializing game

 at bcc.ar(SourceFile:620)
 at bcc.an(SourceFile:428)
 at bcc.a(SourceFile:377)
 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

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

-- Head --
 at bcc.ar(SourceFile:620)
 at bcc.an(SourceFile:428)

-- Initialization --
 at bcc.a(SourceFile:377)
 at net.minecraft.client.main.Main.main(SourceFile:124)

-- System Details --
 Minecraft Version: 1.9.2
 Operating System: Linux (amd64) version 4.4.0-22-generic
 Java Version: 1.8.0_91, Oracle Corporation
 Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
 Memory: 144126120 bytes (137 MB) / 252248064 bytes (240 MB) up to 3194421248 bytes (3046 MB)
 JVM Flags: 5 total; -Xmx3G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn256M
 IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
 Launched Version: 1.9.2
 LWJGL: 2.9.4
 OpenGL: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
 GL Caps:
 Using VBOs: No
 Is Modded: Probably not. Jar signature remains and client brand is untouched.
 Type: Client (map_client.txt)
 Resource Packs:
 Current Language: ~~ERROR~~ NullPointerException: null
 Profiler Position: N/A (disabled)
 CPU: <unknown>

Stephen M. Webb (bregma) on 2016-06-13
summary: - [desktop] Error creating OpenGL context
+ [desktop] Error creating OpenGL context using Java
Changed in libertine:
status: New → Triaged

I reproduced this on latest yakkety:

* download the latest Minecraft.jar (https://minecraft.net/en/download/)
* Use `chmod +x` to make the .jar executable.
* get it into a container
* Install openjdk-8-jre (or equivalent) in the same container
* Create a desktop file for Minecraft with `Exec=java -jar /path/to/Minecraft.jar`
* Launch it from the Dash
* Login to the Mojang servers (you may need to create an account... sorry).
* Click "Play Demo!"

I don't think there's anything libertine can do about this. I'll see if I can figure out who else is affected.

Larry Price (larryprice) wrote :

Crash log. Very similar to the original.

Larry Price (larryprice) on 2016-10-07
tags: added: xmir
Christopher Townsend (townsend) wrote :

Looks to me like Java is querying display modes and doesn't receive anything back. Jave doesn't handle this gracefully and crashes.

Xmir should probably at least return something meaningful back when being queried for display modes.

Daniel van Vugt (vanvugt) wrote :

That sounds like bug 1602561. However that one did not exist when this was logged, and also doesn't exist now.

I believe Xmir is always reporting at least one display mode now. Please run 'xrandr' to verify.

summary: - [desktop] Error creating OpenGL context using Java
+ Minecraft (Java on Xmir) crashes with: OpenGL: ~~ERROR~~
+ RuntimeException: No OpenGL context found in the current thread.
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg-server (Ubuntu):
status: New → Confirmed
Daniel van Vugt (vanvugt) wrote :

Confirmed but incomplete.

I can reproduce the Minecraft crash, but Xrandr reports a valid list of modes and all other OpenGL (GLX and EGL) apps work fine in the same Xmir server. Looks like a bug on the Java side...?

Changed in xorg-server (Ubuntu):
status: Confirmed → Incomplete
Daniel van Vugt (vanvugt) wrote :

BTW, same bug in plain Xmir without Libertine.

Changed in libertine:
status: Triaged → Invalid
Changed in xorg-server (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers