Open YangQY320 opened 2 years ago
Hey, did you try using xvfb
? Seems like OpenGL libraries are not available, and this can happen when there is no display attached or no xvfb
is used (see docs on this).
If this does not work, it might be the old issue where xvfb
and nvidia opengl drivers do not play well together. The old solution to this was to install nvidia drivers again but without opengl libraries, but I am not sure if there are better options nowadays. You could also explore this tip.
When I tried to run the line "obs = env.reset()", I got the error belowed.
''''''''''' Traceback (most recent call last): File "test.py", line 6, in
obs = env.reset()
File "/home/yangqiuyu/anaconda3/envs/minerl/lib/python3.7/site-packages/gym/wrappers/time_limit.py", line 27, in reset
return self.env.reset(*kwargs)
File "/home/yangqiuyu/anaconda3/envs/minerl/lib/python3.7/site-packages/minerl/env/_singleagent.py", line 22, in reset
multi_obs = super().reset()
File "/home/yangqiuyu/anaconda3/envs/minerl/lib/python3.7/site-packages/minerl/env/_multiagent.py", line 455, in reset
self._setup_instances()
File "/home/yangqiuyu/anaconda3/envs/minerl/lib/python3.7/site-packages/minerl/env/_multiagent.py", line 556, in _setup_instances
self.instances.extend([f.result() for f in instance_futures])
File "/home/yangqiuyu/anaconda3/envs/minerl/lib/python3.7/site-packages/minerl/env/_multiagent.py", line 556, in
self.instances.extend([f.result() for f in instance_futures])
File "/home/yangqiuyu/anaconda3/envs/minerl/lib/python3.7/concurrent/futures/_base.py", line 425, in result
return self.get_result()
File "/home/yangqiuyu/anaconda3/envs/minerl/lib/python3.7/concurrent/futures/_base.py", line 384, in get_result
raise self._exception
File "/home/yangqiuyu/anaconda3/envs/minerl/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn( self.args, **self.kwargs)
File "/home/yangqiuyu/anaconda3/envs/minerl/lib/python3.7/site-packages/minerl/env/_multiagent.py", line 807, in _get_new_instance
instance.launch(replaceable=self._is_fault_tolerant)
File "/home/yangqiuyu/anaconda3/envs/minerl/lib/python3.7/site-packages/minerl/env/malmo.py", line 530, in launch
error_str + "\n\nMinecraft process finished unexpectedly. There was an error with Malmo.")
EOFError: /tmp/tmp58ndapg1/Minecraft
''''''''''''
There are also some outputs:
'''''''''''' Configuration file Autogenerated from command-line options
malmoports { I:portOverride=9816 } malmoscore { I:policy=0 }
malmoperformance { I:outDir=NONE }
malmoseed { I:seed=NONE }
runtype { B:replaceable=true }
envtype { B:env=true }
/tmp/tmp58ndapg1/Minecraft/run
[18:48:13] [main/INFO]: Extra: [] [18:48:13] [main/INFO]: Found and added coremod: com.microsoft.Malmo.OverclockingPlugin [18:48:13] [main/INFO]: Running with arguments: [--userProperties, {}, --assetsDir, /tmp/tmp58ndapg1/Minecraft/run/gradle/caches/minecraft/assets, --assetIndex, 1.11, --accessToken{REDACTED}, --version, 1.11.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, com.microsoft.Malmo.Launcher.tweakers.CoremodTweaker] [18:48:13] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [18:48:13] [main/INFO]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [18:48:13] [main/INFO]: Loading tweak class name com.microsoft.Malmo.Launcher.tweakers.CoremodTweaker [18:48:13] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [18:48:13] [main/INFO]: Forge Mod Loader version 13.20.1.2588 for Minecraft 1.11.2 loading [18:48:13] [main/INFO]: Java is OpenJDK 64-Bit Server VM, version 1.8.0_312, running on Linux:amd64:3.10.0-1160.49.1.el7.x86_64, installed at /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-1.el7_9.x86_64/jre [18:48:13] [main/INFO]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [18:48:13] [main/INFO]: Found a command line coremod : com.microsoft.Malmo.OverclockingPlugin [18:48:13] [main/WARN]: The coremod com.microsoft.Malmo.OverclockingPlugin does not have a MCVersion annotation, it may cause issues with this version of Minecraft [18:48:19] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.7.5 Source=file:/tmp/tmp58ndapg1/Minecraft/build/libs/MalmoMod-0.37.0-fat.jar Service=LaunchWrapper Env=CLIENT [18:48:19] [main/INFO]: Compatibility level set to JAVA_8 [18:48:19] [main/INFO]: Calling tweak class com.microsoft.Malmo.Launcher.tweakers.CoremodTweaker [18:48:19] [main/INFO]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [18:48:19] [main/INFO]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [18:48:19] [main/INFO]: Injecting location in coremod com.microsoft.Malmo.OverclockingPlugin [18:48:19] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [18:48:19] [main/INFO]: Loading tweak class name org.spongepowered.asm.mixin.EnvironmentStateTweaker [18:48:19] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [18:48:19] [main/INFO]: Loading tweak class name com.microsoft.Malmo.Launcher.tweakers.AccessTransformerTweaker [18:48:19] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [18:48:19] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [18:48:19] [main/INFO]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [18:48:19] [main/ERROR]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [18:48:20] [main/ERROR]: FML appears to be missing any signature data. This is not a good thing [18:48:20] [main/INFO]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [18:48:20] [main/INFO]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [18:48:20] [main/INFO]: Calling tweak class org.spongepowered.asm.mixin.EnvironmentStateTweaker [18:48:20] [main/INFO]: Initialised Mixin FML Remapper Adapter with net.minecraftforge.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper@210386e0 [18:48:20] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [18:48:20] [main/INFO]: Calling tweak class com.microsoft.Malmo.Launcher.tweakers.AccessTransformerTweaker [18:48:20] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [18:48:20] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [18:48:20] [main/WARN]: Reference map 'mixins.malmo.refmap.json' for mixins.overclocking.malmomod.json could not be read. If this is a development environment you can ignore this message [18:48:20] [main/INFO]: Launching wrapped minecraft {net.minecraft.client.main.Main} [18:48:20] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:insertTextureHandler:120]: MALMO: Found GlStateManager, attempting to transform it [18:48:20] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:insertTextureHandler:126]: MALMO: Found GlStateManager.bindTexture() method, attempting to transform it [18:48:20] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:insertTextureHandler:139]: MALMO: Hooked into call to GlStateManager.bindTexture() [18:48:20] [main/INFO]: A re-entrant transformer '$wrapper.com.microsoft.Malmo.OverclockingClassTransformer' was detected and will no longer process meta class data [18:48:20] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:transform:42]: Transformed Name: net.minecraft.client.entity.EntityPlayerSP [18:48:20] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:transform:42]: Transformed Name: net.minecraft.client.entity.AbstractClientPlayer [18:48:23] [Client thread/INFO]: Setting user: Player39 [18:48:24] [Client thread/WARN]: Skipping bad option: lastServer: [18:48:24] [Client thread/INFO]: LWJGL Version: 2.9.4 [18:48:33] [Client thread/INFO]: [STDOUT]: MALMO: Found GlStateManager, attempting to transform it [18:48:33] [Client thread/INFO]: [STDOUT]: MALMO: Found GlStateManager.bindTexture() method, attempting to transform it [18:48:33] [Client thread/INFO]: [STDOUT]: MALMO: Hooked into call to GlStateManager.bindTexture() [18:48:33] [Client thread/INFO]: Could not load splash.properties, will create a default one [18:48:33] [Client thread/INFO]: -- System Details -- Details: Minecraft Version: 1.11.2 Operating System: Linux (amd64) version 3.10.0-1160.49.1.el7.x86_64 Java Version: 1.8.0_312, Red Hat, Inc. Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Red Hat, Inc. Memory: 1020412592 bytes (973 MB) / 1216348160 bytes (1160 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.37.0-fat.jar) com.microsoft.Malmo.OverclockingClassTransformer GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 470.94' Renderer: 'NVIDIA TITAN RTX/PCIe/SSE2' [18:48:33] [Client thread/INFO]: [STDERR]: org.lwjgl.LWJGLException: X Error - disp: 0x7fbbb5794a60 serial: 126 error: GLXBadContextTag request_code: 146 minor_code: 5 [18:48:33] [Client thread/INFO]: [STDERR]: at org.lwjgl.opengl.LinuxDisplay.globalErrorHandler(LinuxDisplay.java:320) [18:48:33] [Client thread/INFO]: [STDERR]: at org.lwjgl.opengl.LinuxContextImplementation.nReleaseCurrentContext(Native Method) [18:48:33] [Client thread/INFO]: [STDERR]: at org.lwjgl.opengl.LinuxContextImplementation.releaseCurrentContext(LinuxContextImplementation.java:101) [18:48:33] [Client thread/INFO]: [STDERR]: at org.lwjgl.opengl.ContextGL.releaseCurrent(ContextGL.java:144) [18:48:33] [Client thread/INFO]: [STDERR]: at org.lwjgl.opengl.DrawableGL.releaseContext(DrawableGL.java:118) [18:48:33] [Client thread/INFO]: [STDERR]: at net.minecraftforge.fml.client.SplashProgress.start(SplashProgress.java:239) [18:48:33] [Client thread/INFO]: [STDERR]: at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:218) [18:48:33] [Client thread/INFO]: [STDERR]: at net.minecraft.client.Minecraft.init(Minecraft.java:440) [18:48:33] [Client thread/INFO]: [STDERR]: at net.minecraft.client.Minecraft.run(Minecraft.java:352) [18:48:33] [Client thread/INFO]: [STDERR]: at net.minecraft.client.main.Main.main(SourceFile:124) [18:48:33] [Client thread/INFO]: [STDERR]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [18:48:33] [Client thread/INFO]: [STDERR]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [18:48:33] [Client thread/INFO]: [STDERR]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [18:48:33] [Client thread/INFO]: [STDERR]: at java.lang.reflect.Method.invoke(Method.java:498) [18:48:33] [Client thread/INFO]: [STDERR]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [18:48:33] [Client thread/INFO]: [STDERR]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [18:48:33] [Client thread/INFO]: [STDERR]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [18:48:33] [Client thread/INFO]: [STDERR]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [18:48:33] [Client thread/INFO]: [STDERR]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [18:48:33] [Client thread/INFO]: [STDERR]: at java.lang.reflect.Method.invoke(Method.java:498) [18:48:33] [Client thread/INFO]: [STDERR]: at com.microsoft.Malmo.Launcher.GradleStartCommon.launch(GradleStartCommon.java:98) [18:48:33] [Client thread/INFO]: [STDERR]: at com.microsoft.Malmo.Launcher.GradleStart.main(GradleStart.java:27) [18:48:33] [Client thread/INFO]: [net.minecraft.init.Bootstrap:printToSYSOUT:523]: ---- Minecraft Crash Report ---- // I blame Dinnerbone.
Time: 2/22/22 6:48 PM Description: Initializing game
SplashProgress has detected a error loading Minecraft. This can sometimes be caused by bad video drivers. We have automatically disabled the new Splash Screen in config/splash.properties. Try reloading minecraft before reporting any errors. net.minecraftforge.fml.client.SplashProgress$4: org.lwjgl.LWJGLException: X Error - disp: 0x7fbbb5794a60 serial: 126 error: GLXBadContextTag request_code: 146 minor_code: 5 at net.minecraftforge.fml.client.SplashProgress.disableSplash(SplashProgress.java:683) at net.minecraftforge.fml.client.SplashProgress.start(SplashProgress.java:245) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:218) at net.minecraft.client.Minecraft.init(Minecraft.java:440) at net.minecraft.client.Minecraft.run(Minecraft.java:352) at net.minecraft.client.main.Main.main(SourceFile:124) 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 com.microsoft.Malmo.Launcher.GradleStartCommon.launch(GradleStartCommon.java:98) at com.microsoft.Malmo.Launcher.GradleStart.main(GradleStart.java:27) Caused by: org.lwjgl.LWJGLException: X Error - disp: 0x7fbbb5794a60 serial: 126 error: GLXBadContextTag request_code: 146 minor_code: 5 at org.lwjgl.opengl.LinuxDisplay.globalErrorHandler(LinuxDisplay.java:320) at org.lwjgl.opengl.LinuxContextImplementation.nReleaseCurrentContext(Native Method) at org.lwjgl.opengl.LinuxContextImplementation.releaseCurrentContext(LinuxContextImplementation.java:101) at org.lwjgl.opengl.ContextGL.releaseCurrent(ContextGL.java:144) at org.lwjgl.opengl.DrawableGL.releaseContext(DrawableGL.java:118) at net.minecraftforge.fml.client.SplashProgress.start(SplashProgress.java:239) ... 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.minecraftforge.fml.client.SplashProgress.disableSplash(SplashProgress.java:683) at net.minecraftforge.fml.client.SplashProgress.start(SplashProgress.java:245) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:218) at net.minecraft.client.Minecraft.init(Minecraft.java:440)
-- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:352) at net.minecraft.client.main.Main.main(SourceFile:124) 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 com.microsoft.Malmo.Launcher.GradleStartCommon.launch(GradleStartCommon.java:98) at com.microsoft.Malmo.Launcher.GradleStart.main(GradleStart.java:27)
-- System Details -- Details: Minecraft Version: 1.11.2 Operating System: Linux (amd64) version 3.10.0-1160.49.1.el7.x86_64 Java Version: 1.8.0_312, Red Hat, Inc. Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Red Hat, Inc. Memory: 1010290544 bytes (963 MB) / 1216348160 bytes (1160 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.37.0-fat.jar) com.microsoft.Malmo.OverclockingClassTransformer GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 470.94' Renderer: 'NVIDIA TITAN RTX/PCIe/SSE2' Launched Version: 1.11.2 LWJGL: 2.9.4 OpenGL: NVIDIA TITAN RTX/PCIe/SSE2 GL version 4.6.0 NVIDIA 470.94, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported.
''''''''''''