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

Malmo docker crashes #655

Closed
okkhoy opened this issue Jan 24, 2018 · 6 comments
Closed

Malmo docker crashes #655

okkhoy opened this issue Jan 24, 2018 · 6 comments

Comments

@okkhoy
Copy link
Contributor

okkhoy commented Jan 24, 2018

I built a docker image as per the docker file here.
I changed Malmo version to 0.31 and updated the links to fetch the correct version.

The build is successful; however, when I run the docker, Malmo crashes with the following stack trace.

The trace looks similar to the one in #644. Not sure if it is the same issue. (Please feel free to close the issue if it is a dup.)

[22:49:07] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:600]: ---- Minecraft Crash Report ----
// Surprise! Haha. Well, this is awkward.

Time: 1/24/18 10:49 PM
Description: Initializing game

java.lang.ExceptionInInitializerError
	at net.minecraft.client.Minecraft.setWindowIcon(Minecraft.java:670)
	at net.minecraft.client.Minecraft.init(Minecraft.java:467)
	at net.minecraft.client.Minecraft.run(Minecraft.java:387)
	at net.minecraft.client.main.Main.main(Main.java:118)
	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)
	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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
	at org.lwjgl.opengl.LinuxDisplay.getAvailableDisplayModes(LinuxDisplay.java:951)
	at org.lwjgl.opengl.LinuxDisplay.init(LinuxDisplay.java:738)
	at org.lwjgl.opengl.Display.<clinit>(Display.java:138)
	... 16 more


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

-- Head --
Thread: Client thread
Stacktrace:
	at net.minecraft.client.Minecraft.setWindowIcon(Minecraft.java:670)
	at net.minecraft.client.Minecraft.init(Minecraft.java:467)

-- Initialization --
Details:
Stacktrace:
	at net.minecraft.client.Minecraft.run(Minecraft.java:387)
	at net.minecraft.client.main.Main.main(Main.java:118)
	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)
	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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
	Minecraft Version: 1.11.2
	Operating System: Linux (amd64) version 4.4.0-62-generic
	Java Version: 1.8.0_151, Oracle Corporation
	Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 1371781936 bytes (1308 MB) / 1561329664 bytes (1489 MB) up to 1908932608 bytes (1820 MB)
	JVM Flags: 1 total; -Xmx2G
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: 
	Loaded coremods (and transformers): 
OverclockingPlugin (MalmoMod-0.31.0.jar)
  com.microsoft.Malmo.OverclockingClassTransformer
	Launched Version: 1.11.2
	LWJGL: 2.9.4
	OpenGL: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
	GL Caps: 
	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'fml,forge'
	Type: Client (map_client.txt)
	Resource Packs: 
	Current Language: ~~ERROR~~ NullPointerException: null
	Profiler Position: N/A (disabled)
	CPU: <unknown>
[22:49:07] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:600]: #@!@# Game crashed! Crash report saved to: #@!@# /root/Malmo/Minecraft/run/./crash-reports/crash-2018-01-24_22.49.07-client.txt
:runClient FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':runClient'.
> Process 'command '/usr/lib/jvm/java-8-openjdk-amd64/bin/java'' finished with non-zero exit value 255

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 9.846 secs
@DaveyBiggers
Copy link
Member

@okkhoy did you ever get this working?
We've been doing some work that involved running Malmo headless within a docker container, and found that there were problems using xvfb, so we switched to using xpra - eg:

sudo apt-get install xpra
xpra start :100
export DISPLAY=:100
./launchClient.sh
etc.

I've found this to be reliable - let me know if it helps.

@okkhoy
Copy link
Contributor Author

okkhoy commented Mar 14, 2018

  • I could not get the docker to start, every time I tried, I got the same stack dump as above.

  • I changed xvfb to xpra in the docker file and edited the run.sh to include the following lines:

xpra start :100
export DISPLAY=:100

I leave it to the docker to start Minecraft run as earlier.

There is no crash, but it seems nothing is running. I just get the following output:

$ docker run malmo-docker
2018-03-14 15:36:13,798 rencode import error: No module named rencode

Warning: running as root

... and I get the prompt back. I don't think malmo is running!

Did I miss something?

@okkhoy
Copy link
Contributor Author

okkhoy commented Mar 18, 2018

@DaveyBiggers I noticed using xpra solves the problem on the bare-metal server. I am able to launch headless. However, docker is still a problem (as described above, I don't think Minecraft started on the docker).

@jayhardee9
Copy link

@okkhoy if you still need this to work with Docker, you just need to add python-rencode to the list of packages to install in the Dockerfile you linked, along with xpra. The "import error" you received was xpra's Python not finding the rencode module.

Also, change run.sh to:

#!/bin/sh

xpra start :100
export DISPLAY=:100
eval $*

Malmo didn't run because the last line of your Dockerfile:

ENTRYPOINT ["/root/run.sh", "/root/Malmo/Minecraft/launchClient.sh"]

is passing "/root/Malmo/Minecraft/launchClient.sh" as a parameter to run.sh. So whatever you change run.sh to will need to run its command line arg.

@okkhoy
Copy link
Contributor Author

okkhoy commented May 18, 2018

@jayhardee9 thanks for the pointer. I will try this next week and update/close this issue.

@okkhoy
Copy link
Contributor Author

okkhoy commented Jun 22, 2018

@DaveyBiggers this issue is resolved following @jayhardee9 's suggestion (using Malmo 0.34.0)

Wow! that took a looooong time for me to test and respond! 🙄 Sorry for the delays. 🙏

I will now close this issue.

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

3 participants