LittleTiles

LittleTiles

12M Downloads

OutOfMemory - Direct buffer

em411 opened this issue ยท 1 comments

commented

LT ver: pre158
CC ver: 62

Sometimes when player is teleporting between 2 diffrent places with Little Tiles, they can get disconnected with this error in client log:

java.lang.OutOfMemoryError: Direct buffer memory
	at java.nio.Bits.reserveMemory(Bits.java:703)
	at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:128)
	at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
	at net.minecraft.client.renderer.GLAllocation.func_74524_c(SourceFile:41)
	at net.minecraft.client.renderer.BufferBuilder.<init>(BufferBuilder.java:78)
	at com.creativemd.littletiles.client.render.BlockLayerRenderBuffer.createVertexBuffer(BlockLayerRenderBuffer.java:57)
	at com.creativemd.littletiles.client.render.RenderingThread.run(RenderingThread.java:232)

After reconnect, client console gets a lots of spam with:

java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.creativemd.creativecore.client.rendering.model.BufferBuilderUtils.growBuffer(BufferBuilderUtils.java:32)
	at com.creativemd.littletiles.client.render.LittleChunkDispatcher.func_188245_a(LittleChunkDispatcher.java:153)
	at net.minecraft.client.renderer.chunk.ChunkRenderWorker.func_178474_a(SourceFile:126)
	at net.minecraft.client.renderer.chunk.ChunkRenderWorker.run(SourceFile:43)
	at java.lang.Thread.run(Thread.java:819)
Caused by: java.lang.OutOfMemoryError: Direct buffer memory
	at java.nio.Bits.reserveMemory(Bits.java:703)
	at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:128)
	at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
	at net.minecraft.client.renderer.GLAllocation.func_74524_c(SourceFile:41)
	at net.minecraft.client.renderer.BufferBuilder.func_181670_b(BufferBuilder.java:95)
	... 8 more
java.nio.BufferOverflowException
	at java.nio.DirectIntBufferU.put(DirectIntBufferU.java:354)
	at com.creativemd.creativecore.client.rendering.model.BufferBuilderUtils.addBuffer(BufferBuilderUtils.java:100)
	at com.creativemd.littletiles.client.render.LittleChunkDispatcher.func_188245_a(LittleChunkDispatcher.java:161)
	at net.minecraft.client.renderer.chunk.ChunkRenderWorker.func_178474_a(SourceFile:126)
	at net.minecraft.client.renderer.chunk.ChunkRenderWorker.run(SourceFile:43)
	at java.lang.Thread.run(Thread.java:819)```

And after a few seconds crash: https://paste.dimdev.org/bafigixudo.mccrash
commented

This error means you are running out of RAM, but this ram usage is not restricted by Java, so if you get this message it literally means there is no RAM available anymore.

If you build a lot of stuff with LT this can happen, however you have to build quite a lot to reach it (depends on how much RAM your computer has).

I ran into this issue quite frequently, until I figured out that Optifine has a memory leak. In combination with LT the RAM is full very fast. So if you are using Optifine I highly recommend to update to the newest pre-release F4 pre3. Other than that there is not much I can do about this issue :(