[Crash]: Out of memory with Twisted tablet
sloth501 opened this issue · 3 comments
Summary:
When i am joinnig a world and spawn next to a Twisted tablet it makes my game crash with out of memory exception.
Context:
- minecraft modded server with FSR The Journey -1.18.2-5A
- Minecraft 1.18.2
- Forge 40.1.20
- malum-1.18.2-1.3.6
- Server with 7GB of memory
- Minecraft client with 8GB of RAM allocated to JVM
- block setup
Step to reproduce:
- On a minecraft server (not reproduce in solo world with the same save as on server)
- put a Twisted Tablet next to spirit crucible
----- everythings works fine no memory problem - disconnect from server
- reconnect to server
Issue:
=> error from client not enough memory during "loading world" step
error from client logs 2022-05-20-6.log
[22:41:13] [Render thread/ERROR]: Out of memory
java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.resize(HashMap.java:702) ~[?:?]
at java.util.HashMap.putVal(HashMap.java:661) ~[?:?]
at java.util.HashMap.put(HashMap.java:610) ~[?:?]
at net.minecraft.nbt.CompoundTag.m_128405_(CompoundTag.java:171) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at com.sammy.malum.core.helper.BlockHelper.saveBlockPos(BlockHelper.java:47) ~[malum-1.18.2-1.3.4.jar%23143!/:1.18.2-1.3.4]
at com.sammy.malum.common.blockentity.tablet.ITabletTracker.saveTwistedTabletData(ITabletTracker.java:59) ~[malum-1.18.2-1.3.4.jar%23143!/:1.18.2-1.3.4]
at com.sammy.malum.common.blockentity.crucible.SpiritCrucibleCoreBlockEntity.m_183515_(SpiritCrucibleCoreBlockEntity.java:129) ~[malum-1.18.2-1.3.4.jar%23143!/:1.18.2-1.3.4]
at net.minecraft.world.level.block.entity.BlockEntity.m_187482_(BlockEntity.java:77) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at com.sammy.malum.core.systems.blockentity.SimpleBlockEntity.m_5995_(SimpleBlockEntity.java:43) ~[malum-1.18.2-1.3.4.jar%23143!/:1.18.2-1.3.4]
at net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket$$Lambda$32861/0x000000080376e098.apply(Unknown Source) ~[?:?]
at net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket.m_195642_(ClientboundBlockEntityDataPacket.java:21) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket.m_195640_(ClientboundBlockEntityDataPacket.java:25) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at com.sammy.malum.core.systems.blockentity.SimpleBlockEntity.getUpdatePacket(SimpleBlockEntity.java:55) ~[malum-1.18.2-1.3.4.jar%23143!/:1.18.2-1.3.4]
at com.sammy.malum.core.systems.blockentity.SimpleBlockEntity.onDataPacket(SimpleBlockEntity.java:61) ~[malum-1.18.2-1.3.4.jar%23143!/:1.18.2-1.3.4]
at net.minecraft.client.multiplayer.ClientPacketListener.m_205555_(ClientPacketListener.java:1007) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at net.minecraft.client.multiplayer.ClientPacketListener$$Lambda$32819/0x000000080375d8a0.accept(Unknown Source) ~[?:?]
at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
at net.minecraft.client.multiplayer.ClientPacketListener.m_7545_(ClientPacketListener.java:1006) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket.m_5797_(ClientboundBlockEntityDataPacket.java:49) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket.m_5797_(ClientboundBlockEntityDataPacket.java:14) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at net.minecraft.network.protocol.PacketUtils.m_131356_(PacketUtils.java:22) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at net.minecraft.network.protocol.PacketUtils$$Lambda$30796/0x00000008034ca1c8.run(Unknown Source) ~[?:?]
at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:157) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:131) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:116) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1013) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:663) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at net.minecraft.client.main.Main.main(Main.java:205) ~[client-1.18.2-20220404.173914-srg.jar%23207!/:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
[22:41:17] [Render thread/INFO]: Stopping!
[22:41:17] [Render thread/INFO]: Shutting down map thread
i can observe on RAM monitoring that my PC use 16/16GB of RAM when joining world even with JVM limited to 8GB. Maybe there is a memory leak somewhere
Why i am reporting here
- malum and twisted tablet is mentioned in error log
- when i remove twisted tablet from world i can disconnect / reconnect no memory problem
note
i know that is a king poor report for you to debug that, tell me if i can give you more informations
'poor report' nah this shit is fire :P
I've heard this issue mentioned earlier at some point, I'm not really sure why it happens.
I'll look into it, you might be able to just break the tablet before you log off and cope with it that way.