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 crashes due to OutOfMemoryError #505

Closed
okkhoy opened this Issue Apr 17, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@okkhoy
Contributor

okkhoy commented Apr 17, 2017

After about 98 hours of running the experiment Malmo crashed.

Stack trace:

Exception in thread "Thread-7185" [13:12:14] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: java.lang.OutOfMemoryError: Java heap space
[13:12:30] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.util.Arrays.copyOf(Arrays.java:3332)
[13:12:35] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
[13:12:42] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:649)
[13:12:49] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.lang.StringBuffer.append(StringBuffer.java:381)
[13:12:51] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOM.characters(SchemaDOM.java:198)
[13:12:56] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.characters(SchemaDOMParser.java:213)
[13:12:59] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:455)
[13:13:04] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:629)
[13:13:10] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:685)
[13:13:13] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:530)
[13:13:16] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2179)
[13:13:21] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.resolveSchema(XSDHandler.java:2100)
[13:13:25] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:1104)
[13:13:29] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:1124)
[13:13:33] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:623)
[13:13:36] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:613)
[13:13:40] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:572)
[13:13:45] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:538)
[13:13:50] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:255)
[13:13:52] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:638)
[13:13:56] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:670)
[13:14:01] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.microsoft.Malmo.Utils.SchemaHelper.deserialiseObject(SchemaHelper.java:106)
[13:14:04] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.microsoft.Malmo.Client.ClientStateMachine.decodeMissionInit(ClientStateMachine.java:347)
[13:14:08] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.microsoft.Malmo.Client.ClientStateMachine$1.onCommand(ClientStateMachine.java:511)
[13:14:12] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.microsoft.Malmo.Utils.TCPInputPoller.commandReceived(TCPInputPoller.java:232)
[13:14:15] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at com.microsoft.Malmo.Utils.TCPInputPoller$TCPConnectionHandler.run(TCPInputPoller.java:326)
[13:14:19] [Thread-7185/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.lang.Thread.run(Thread.java:745)
Exception in thread "Netty Local Client IO #13" [13:16:37] [Netty Local Client IO #13/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: java.lang.OutOfMemoryError: Java heap space
[13:15:01] [Client thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
	at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_121]
	at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_121]
	at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(Unknown Source) [FMLCommonHandler.class:?]
	at net.minecraft.client.Minecraft.runGameLoop(Unknown Source) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Unknown Source) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Unknown Source) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
	at GradleStart.main(Unknown Source) [start/:?]
Caused by: java.lang.OutOfMemoryError: Java heap space
	at java.util.concurrent.locks.ReentrantLock.<init>(ReentrantLock.java:257) ~[?:1.8.0_121]
	at net.minecraft.client.renderer.chunk.RenderChunk.<init>(Unknown Source) ~[RenderChunk.class:?]
	at net.minecraft.client.renderer.chunk.ListedRenderChit>(Unknown Source) ~[ListedRenderChunk.class:?]
	at net.minecraft.client.renderer.chunk.ListChunkFactory.makeRenderChunk(Unknown Source) ~[ListChunkFactory.class:?]
	at net.minecraft.client.renderer.ViewFrustum.createRenderChunks(Unknown Source) ~[ViewFrustum.class:?]
	at net.minecraft.client.renderer.ViewFrustum.<init>(Unknown Source) ~[ViewFrustum.class:?]
	at net.minecraft.client.renderer.RenderGlobal.loadRenderers(Unknown Source) ~[RenderGlobal.class:?]
	at net.minecraft.client.renderer.RenderGlobal.setWorldAndLoadRenderers(Unknown Source) ~[RenderGlobal.class:?]
	at net.minecraft.client.Minecraft.loadWorld(Unknown Source) ~[Minecraft.class:?]
	at net.minecraft.client.Minecraft.loadWorld(Unknown Source) ~[Minecraft.class:?]
	at net.minecraft.client.network.NetHandlerPlayClient.handleJoinGame(Unknown Source) ~[NetHandlerPlayClient.class:?]
	at net.minecraft.network.play.server.S01PacketJoinGame.processPacket(Unknown Source) ~[S01PacketJoinGame.class:?]
	at net.minecraft.network.play.server.S01PacketJoinGame.processPacket(Unknown Source) ~[S01PacketJoinGame.class:?]
	at net.minecraft.network.PacketThreadUtil$1.run(Unknown Source) ~[PacketThreadUtil$1.class:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_121]
	... 16 more
Apr 15, 2017 1:15:05 PM io.netty.channel.nio.NioEventLoop run
WARNING: Unexpected exception in the selector loop.
java.lang.OutOfMemoryError: Java heap space
	at java.util.concurrent.ConcurrentLinkedQueue.offer(ConcurrentLinkedQueue.java:328)
	at java.util.concurrent.ConcurrentLinkedQueue.add(ConcurrentLinkedQueue.java:297)
	at io.netty.util.concurrent.SingleThreadEventExecutor.fetchFromDelayedQueue(SingleThreadEventExecutor.java:254)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:343)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353)
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
	at java.lang.Thread.run(Thread.java:745)

[13:18:22] [Client thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.NullPointerException
java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_121]
	at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_121]
	at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(Unknown Source) [FMLCommonHandler.class:?]
	at net.minecraft.client.Minecraft.runGameLoop(Unknown Source) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Unknown Source) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Unknown Source) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
	at GradleStart.main(Unknown Source) [start/:?]
Caused by: java.lang.NullPointerException
	at net.minecraft.client.network.NetHandlerPlayClient.handleCustomPayload(Unknown Source) ~[NetHandlerPlayClient.class:?]
	at net.minecraft.network.play.server.S3FPacketCustomPayload.process(Unknown Source) ~[S3FPacketCustomPayload.class:?]
	at net.minecraft.network.play.server.S3FustomPayload.processPacket(Unknown Source) ~[S3FPacketCustomPayload.class:?]
	at net.minecraft.network.PacketThreadUtil$1.run(Unknown Source) ~[PacketThreadUtil$1.class:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_121]
	... 16 more
	
	.
	.
	.
	

[13:38:56] [Server thread/INFO]: Stopping server
[13:38:56] [Server thread/INFO]: Saving players
[13:38:56] [Server thread/INFO]: Saving worlds
[13:38:56] [Server thread/INFO]: Saving chunks for level 'TEMP_10000_14d03ea7-c9c5-4daa-af4b-34991d281ea5'/Overworld
[13:38:58] [Server thread/ERROR]: Exception stopping the server
java.lang.OutOfMemoryError: Java heap space
[13:38:59] [Server thread/INFO] [FML]: Applying holder lookups
[13:38:59] [Server thread/INFO] [FML]: Holder lookups applied
[13:39:01] [Client thread/FATAL]: Unreported exception thrown!
java.lang.NullPointerException
	at net.minecraft.client.multiplayer.PlayerControllerMP.syncCurrentPlayItem(Unknown Source) ~[PlayerControllerMP.class:?]
	at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(Unknown Source) ~[PlayerControllerMP.class:?]
	at net.minecraft.client.Minecraft.runTick(Unknown Source) ~[Minecraft.class:?]
	at net.minecraft.client.Minecraft.runGameLoop(Unknown Source) ~[Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Unknown Source) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Unknown Source) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
	at GradleStart.main(Unknown Source) [start/:?]
[13:39:03] [Client thread/INFO]: Stopping!
[13:39:03] [Client thread/INFO]: SoundSystem shutting down...
[13:39:03] [File IO Thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: java.io.IOException: Stream Closed
[13:39:03] [File IO Thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.io.RandomAccessFile.length(Native Method)
[13:39:03] [File IO Thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at net.minecraft.world.chunk.storage.RegionFile.write(Unknown Source)
[13:39:03] [File IO Thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at net.minecraft.world.chunk.storage.RegionFile$ChunkBuffer.close(Unknown Source)
[13:39:03] [File IO Thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:241)
[13:39:03] [File IO Thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.io.FilterOutputStream.close(FilterOutputStream.java:159)
[13:39:03] [File IO Thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkNBTTags(Unknown Source)
[13:39:03] [File IO Thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeNextIO(Unknown Source)
[13:39:03] [File IO Thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at net.minecraft.world.storage.ThreadedFileIOBase.processQueue(Unknown Source)
[13:39:03] [File IO Thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at net.minecraft.world.storage.ThreadedFileIOBase.run(Unknown Source)
[13:39:03] [File IO Thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.lang.Thread.run(Thread.java:745)
[13:39:04] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com

BUILD SUCCESSFUL

Total time: 98 hrs 15 mins 17.9 secs

@andre-amorim

This comment has been minimized.

Show comment
Hide comment
@andre-amorim

andre-amorim Apr 17, 2017

98 hrs 15 mins 17.9 secs without crash looks like a new record. In the mean while I will visiting.

/* http://www.tpc.org */

andre-amorim commented Apr 17, 2017

98 hrs 15 mins 17.9 secs without crash looks like a new record. In the mean while I will visiting.

/* http://www.tpc.org */

@DaveyBiggers

This comment has been minimized.

Show comment
Hide comment
@DaveyBiggers

DaveyBiggers Apr 18, 2017

Member

We've found Malmo to be pretty reliable regarding memory consumption - eg see #312, or #288.
Generally speaking, the java garbage collector does its job, and I've not seen any significant leakage even after running for > 100 hours. Minecraft itself seems remarkably stable.

Looks like you ran out of heap space while deserialising the MissionInit message - check the size of the XML that was getting sent to the mod - I suspect the way you are building your mission object is resulting in more XML getting appended to it each episode. (This was certainly the case before, in #500). If even one line gets added per episode, assuming 100 bytes per line, 4 secs per episode, I reckon that's about 8.5GB extra XML by the end of 98 hours.

The MissionSpec object has a getAsXML method that will allow you to spit out the raw XML you are generating, or, if you are recording missions, the raw XML should be archived in each recording.

Member

DaveyBiggers commented Apr 18, 2017

We've found Malmo to be pretty reliable regarding memory consumption - eg see #312, or #288.
Generally speaking, the java garbage collector does its job, and I've not seen any significant leakage even after running for > 100 hours. Minecraft itself seems remarkably stable.

Looks like you ran out of heap space while deserialising the MissionInit message - check the size of the XML that was getting sent to the mod - I suspect the way you are building your mission object is resulting in more XML getting appended to it each episode. (This was certainly the case before, in #500). If even one line gets added per episode, assuming 100 bytes per line, 4 secs per episode, I reckon that's about 8.5GB extra XML by the end of 98 hours.

The MissionSpec object has a getAsXML method that will allow you to spit out the raw XML you are generating, or, if you are recording missions, the raw XML should be archived in each recording.

@okkhoy

This comment has been minimized.

Show comment
Hide comment
@okkhoy

okkhoy Apr 18, 2017

Contributor

I fixed the "append more to XML" issue. Here is what gets sent before every episode now (obtained using getAsXML method):

 <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Mission xmlns="http://ProjectMalmo.microsoft.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ProjectMalmo.microsoft.com Mission.xsd">
  <About>
    <Summary>Taxi kind of experiment modeled in Malmo</Summary>
  </About>
  <ServerSection>
    <ServerInitialConditions>
      <Time>
        <StartTime>1</StartTime>
      </Time>
      <Weather>clear</Weather>
    </ServerInitialConditions>
    <ServerHandlers>
      <FlatWorldGenerator destroyAfterUse="true" forceReset="true" generatorString="3;7,220*1,5*3,2;3;,biome_1" seed=""/>
      <DrawingDecorator>
        <DrawCuboid type="air" x1="0" x2="6" y1="46" y2="50" z1="0" z2="6"/>
        <DrawCuboid type="sandstone" x1="0" x2="6" y1="45" y2="45" z1="0" z2="6"/>
        <DrawBlock type="redstone_block" x="1" y="45" z="2"/>
        <DrawBlock type="emerald_block" x="2" y="45" z="5"/>
        <DrawBlock type="lapis_block" x="5" y="45" z="6"/>
        <DrawBlock type="gold_block" x="5" y="45" z="2"/>
        <DrawBlock type="bedrock" x="3" y="45" z="2"/>
        <DrawBlock type="bedrock" x="3" y="46" z="2"/>
        <DrawBlock type="bedrock" x="3" y="47" z="2"/>
        <DrawBlock type="beacon" x="3" y="48" z="2"/>
        <DrawBlock type="bedrock" x="4" y="45" z="2"/>
        <DrawBlock type="bedrock" x="4" y="46" z="2"/>
        <DrawBlock type="bedrock" x="4" y="47" z="2"/>
        <DrawBlock type="beacon" x="4" y="48" z="2"/>
        <DrawBlock type="bedrock" x="4" y="45" z="3"/>
        <DrawBlock type="bedrock" x="4" y="46" z="3"/>
        <DrawBlock type="bedrock" x="4" y="47" z="3"/>
        <DrawBlock type="beacon" x="4" y="48" z="3"/>
        <DrawBlock type="bedrock" x="5" y="45" z="3"/>
        <DrawBlock type="bedrock" x="5" y="46" z="3"/>
        <DrawBlock type="bedrock" x="5" y="47" z="3"/>
        <DrawBlock type="beacon" x="5" y="48" z="3"/>
        <DrawBlock type="bedrock" x="2" y="45" z="4"/>
        <DrawBlock type="bedrock" x="2" y="46" z="4"/>
        <DrawBlock type="bedrock" x="2" y="47" z="4"/>
        <DrawBlock type="beacon" x="2" y="48" z="4"/>
        <DrawBlock type="bedrock" x="3" y="45" z="5"/>
        <DrawBlock type="bedrock" x="3" y="46" z="5"/>
        <DrawBlock type="bedrock" x="3" y="47" z="5"/>
        <DrawBlock type="beacon" x="3" y="48" z="5"/>
        <DrawBlock type="bedrock" x="3" y="45" z="6"/>
        <DrawBlock type="bedrock" x="3" y="46" z="6"/>
        <DrawBlock type="bedrock" x="3" y="47" z="6"/>
        <DrawBlock type="beacon" x="3" y="48" z="6"/>
      </DrawingDecorator>
      <DrawingDecorator>
        <DrawItem type="gold_block" x="5" y="47" z="6"/>
      </DrawingDecorator>
      <ServerQuitFromTimeUp description="" timeLimitMs="720000"/>
      <ServerQuitWhenAnyAgentFinishes description=""/>
    </ServerHandlers>
  </ServerSection>
  <AgentSection mode="Survival">
    <Name>ButterFingers</Name>
    <AgentStart>
      <Placement pitch="0" x="1.5" y="46" yaw="90" z="2.5"/>
      <Inventory/>
    </AgentStart>
    <AgentHandlers>
      <ObservationFromFullStats/>
      <ObservationFromFullInventory/>
      <ObservationFromDiscreteCell/>
      <ObservationFromRay/>
      <VideoProducer viewpoint="1" want_depth="false">
        <Width>480</Width>
        <Height>320</Height>
      </VideoProducer>
      <RewardForSendingCommand dimension="0" distribution="" reward="-1"/>
      <DiscreteMovementCommands autoFall="false" autoJump="false"/>
      <InventoryCommands/>
      <MissionQuitCommands quitDescription=""/>
    </AgentHandlers>
  </AgentSection>
</Mission>
Contributor

okkhoy commented Apr 18, 2017

I fixed the "append more to XML" issue. Here is what gets sent before every episode now (obtained using getAsXML method):

 <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Mission xmlns="http://ProjectMalmo.microsoft.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ProjectMalmo.microsoft.com Mission.xsd">
  <About>
    <Summary>Taxi kind of experiment modeled in Malmo</Summary>
  </About>
  <ServerSection>
    <ServerInitialConditions>
      <Time>
        <StartTime>1</StartTime>
      </Time>
      <Weather>clear</Weather>
    </ServerInitialConditions>
    <ServerHandlers>
      <FlatWorldGenerator destroyAfterUse="true" forceReset="true" generatorString="3;7,220*1,5*3,2;3;,biome_1" seed=""/>
      <DrawingDecorator>
        <DrawCuboid type="air" x1="0" x2="6" y1="46" y2="50" z1="0" z2="6"/>
        <DrawCuboid type="sandstone" x1="0" x2="6" y1="45" y2="45" z1="0" z2="6"/>
        <DrawBlock type="redstone_block" x="1" y="45" z="2"/>
        <DrawBlock type="emerald_block" x="2" y="45" z="5"/>
        <DrawBlock type="lapis_block" x="5" y="45" z="6"/>
        <DrawBlock type="gold_block" x="5" y="45" z="2"/>
        <DrawBlock type="bedrock" x="3" y="45" z="2"/>
        <DrawBlock type="bedrock" x="3" y="46" z="2"/>
        <DrawBlock type="bedrock" x="3" y="47" z="2"/>
        <DrawBlock type="beacon" x="3" y="48" z="2"/>
        <DrawBlock type="bedrock" x="4" y="45" z="2"/>
        <DrawBlock type="bedrock" x="4" y="46" z="2"/>
        <DrawBlock type="bedrock" x="4" y="47" z="2"/>
        <DrawBlock type="beacon" x="4" y="48" z="2"/>
        <DrawBlock type="bedrock" x="4" y="45" z="3"/>
        <DrawBlock type="bedrock" x="4" y="46" z="3"/>
        <DrawBlock type="bedrock" x="4" y="47" z="3"/>
        <DrawBlock type="beacon" x="4" y="48" z="3"/>
        <DrawBlock type="bedrock" x="5" y="45" z="3"/>
        <DrawBlock type="bedrock" x="5" y="46" z="3"/>
        <DrawBlock type="bedrock" x="5" y="47" z="3"/>
        <DrawBlock type="beacon" x="5" y="48" z="3"/>
        <DrawBlock type="bedrock" x="2" y="45" z="4"/>
        <DrawBlock type="bedrock" x="2" y="46" z="4"/>
        <DrawBlock type="bedrock" x="2" y="47" z="4"/>
        <DrawBlock type="beacon" x="2" y="48" z="4"/>
        <DrawBlock type="bedrock" x="3" y="45" z="5"/>
        <DrawBlock type="bedrock" x="3" y="46" z="5"/>
        <DrawBlock type="bedrock" x="3" y="47" z="5"/>
        <DrawBlock type="beacon" x="3" y="48" z="5"/>
        <DrawBlock type="bedrock" x="3" y="45" z="6"/>
        <DrawBlock type="bedrock" x="3" y="46" z="6"/>
        <DrawBlock type="bedrock" x="3" y="47" z="6"/>
        <DrawBlock type="beacon" x="3" y="48" z="6"/>
      </DrawingDecorator>
      <DrawingDecorator>
        <DrawItem type="gold_block" x="5" y="47" z="6"/>
      </DrawingDecorator>
      <ServerQuitFromTimeUp description="" timeLimitMs="720000"/>
      <ServerQuitWhenAnyAgentFinishes description=""/>
    </ServerHandlers>
  </ServerSection>
  <AgentSection mode="Survival">
    <Name>ButterFingers</Name>
    <AgentStart>
      <Placement pitch="0" x="1.5" y="46" yaw="90" z="2.5"/>
      <Inventory/>
    </AgentStart>
    <AgentHandlers>
      <ObservationFromFullStats/>
      <ObservationFromFullInventory/>
      <ObservationFromDiscreteCell/>
      <ObservationFromRay/>
      <VideoProducer viewpoint="1" want_depth="false">
        <Width>480</Width>
        <Height>320</Height>
      </VideoProducer>
      <RewardForSendingCommand dimension="0" distribution="" reward="-1"/>
      <DiscreteMovementCommands autoFall="false" autoJump="false"/>
      <InventoryCommands/>
      <MissionQuitCommands quitDescription=""/>
    </AgentHandlers>
  </AgentSection>
</Mission>
@DaveyBiggers

This comment has been minimized.

Show comment
Hide comment
@DaveyBiggers

DaveyBiggers Apr 19, 2017

Member

Yes, does indeed look stable. And the memory consumption seems stable too, so far.
Looking more closely at the stack trace, I see that it was during the call to load the schema that the heap ran out:

        Schema schema = schemaFactory.newSchema(schemaURL);

This reminds me of #407 - were you running other experiments at the time it crashed? In particular, had you just run launchClient.sh in the same folder as the running version? I've never been able to reproduce it here, but I think part of the gradle build process can somehow trash the schema just as a running instance of Malmo tries to load it. Not sure why that would result in a heap error, but I guess it's just possible that JAXB is going nuts trying to parse a malformed XSD file...?

Member

DaveyBiggers commented Apr 19, 2017

Yes, does indeed look stable. And the memory consumption seems stable too, so far.
Looking more closely at the stack trace, I see that it was during the call to load the schema that the heap ran out:

        Schema schema = schemaFactory.newSchema(schemaURL);

This reminds me of #407 - were you running other experiments at the time it crashed? In particular, had you just run launchClient.sh in the same folder as the running version? I've never been able to reproduce it here, but I think part of the gradle build process can somehow trash the schema just as a running instance of Malmo tries to load it. Not sure why that would result in a heap error, but I guess it's just possible that JAXB is going nuts trying to parse a malformed XSD file...?

@okkhoy

This comment has been minimized.

Show comment
Hide comment
@okkhoy

okkhoy Apr 19, 2017

Contributor

I was running just one instance of Malmo and only one instance of my experiment.
I have since then restarted and am running another round of the experiments, I will monitor the set up and update here if I find anything/encounter this again.

I just made the change related to hitDistance documentation of MissionHandler.xsd to get the distance in ObservationFromRay. But I believe this is not an issue as I have had multiple runs after that without any issues.

Contributor

okkhoy commented Apr 19, 2017

I was running just one instance of Malmo and only one instance of my experiment.
I have since then restarted and am running another round of the experiments, I will monitor the set up and update here if I find anything/encounter this again.

I just made the change related to hitDistance documentation of MissionHandler.xsd to get the distance in ObservationFromRay. But I believe this is not an issue as I have had multiple runs after that without any issues.

@DaveyBiggers

This comment has been minimized.

Show comment
Hide comment
@DaveyBiggers

DaveyBiggers Jul 10, 2017

Member

@okkhoy I'm closing this as it's been a while since we heard anything, but if you are still getting out-of-memory issues please reopen and provide some more details.

Member

DaveyBiggers commented Jul 10, 2017

@okkhoy I'm closing this as it's been a while since we heard anything, but if you are still getting out-of-memory issues please reopen and provide some more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment