Angelica

Angelica

9.7k Downloads

Constant freezing during long play sessions

queeek180 opened this issue ยท 16 comments

commented

Your GTNH Discord Username

queeek180

Mod Version

1.0.0-alpha13 to 1.0.0-alpha15

Java Version

Java 17

Bug Report

During very long play sessions (5+ hours) the game will start periodically freezing and eventually will not unfreeze. This does not appear random and instead seems to happen after looking at certain blocks, checking recipes in NEI and opening block GUIs. This does not occur in 1.0.0-alpha12 and earlier.

I do not currently have a full log but I do have a copy of what appears to be the error (I am not completely sure this is related).
I will provide a full log the next time this occurs.

java.lang.NullPointerException: Cannot invoke "net.minecraft.server.MinecraftServer.func_71203_ab()" because the return value of "cpw.mods.fml.common.FMLCommonHandler.getMinecraftServerInstance()" is null
	at cpw.mods.fml.common.network.FMLOutboundHandler$OutboundTarget$7.selectNetworks(FMLOutboundHandler.java:193) ~[forge-1.7.10-10.13.4.1614-1.7.10-universal.jar:?]
	at cpw.mods.fml.common.network.FMLOutboundHandler.write(FMLOutboundHandler.java:273) ~[forge-1.7.10-10.13.4.1614-1.7.10-universal.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.invokeWrite(DefaultChannelHandlerContext.java:644) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:698) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:637) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:115) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.invokeWrite(DefaultChannelHandlerContext.java:644) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:698) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.writeAndFlush(DefaultChannelHandlerContext.java:688) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.writeAndFlush(DefaultChannelHandlerContext.java:717) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:893) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:239) ~[netty-all-4.0.10.Final.jar:?]
	at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.sendToAllAround(SimpleNetworkWrapper.java:210) ~[forge-1.7.10-10.13.4.1614-1.7.10-universal.jar:?]
	at com.gtnewhorizon.structurelib.StructureLibAPI.sendAlignment(StructureLibAPI.java:246) ~[?:?]
	at gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase.setExtendedFacing(GT_MetaTileEntity_EnhancedMultiBlockBase.java:64) ~[?:?]
	at com.gtnewhorizon.structurelib.alignment.IAlignment.checkedSetExtendedFacing(IAlignment.java:161) ~[?:?]
	at com.gtnewhorizon.structurelib.alignment.IAlignment.toolSetDirection(IAlignment.java:70) ~[?:?]
	at gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase.onFacingChange(GT_MetaTileEntity_EnhancedMultiBlockBase.java:106) ~[?:?]
	at gregtech.api.metatileentity.BaseMetaTileEntity.setFrontFacing(BaseMetaTileEntity.java:900) ~[?:?]
	at blockrenderer6343.integration.gregtech.GT_GUI_MultiblocksHandler.placeMultiblock(GT_GUI_MultiblocksHandler.java:201) ~[?:?]
	at blockrenderer6343.common.GUI_MultiblocksHandler.initializeSceneRenderer(GUI_MultiblocksHandler.java:280) ~[?:?]
	at blockrenderer6343.integration.gregtech.GT_GUI_MultiblocksHandler.loadNewMultiblock(GT_GUI_MultiblocksHandler.java:104) ~[?:?]
	at blockrenderer6343.common.GUI_MultiblocksHandler.loadMultiblock(GUI_MultiblocksHandler.java:102) ~[?:?]
	at blockrenderer6343.integration.nei.GT_NEI_MultiblocksHandler.tryLoadMultiblocks(GT_NEI_MultiblocksHandler.java:147) ~[?:?]
	at blockrenderer6343.integration.nei.GT_NEI_MultiblocksHandler.loadCraftingRecipes(GT_NEI_MultiblocksHandler.java:102) ~[?:?]
	at codechicken.nei.recipe.TemplateRecipeHandler.loadCraftingRecipes(TemplateRecipeHandler.java:418) ~[?:?]
	at blockrenderer6343.integration.nei.GT_NEI_MultiblocksHandler.loadCraftingRecipes(GT_NEI_MultiblocksHandler.java:97) ~[?:?]
	at codechicken.nei.recipe.TemplateRecipeHandler.getRecipeHandler(TemplateRecipeHandler.java:556) ~[?:?]
	at codechicken.nei.recipe.GuiCraftingRecipe.lambda$getCraftingHandlers$0(GuiCraftingRecipe.java:69) ~[?:?]
	at codechicken.nei.recipe.RecipeHandlerQuery.lambda$null$2(RecipeHandlerQuery.java:77) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) [?:?]
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) [?:?]
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) [?:?]
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) [?:?]
	at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:960) [?:?]
	at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:934) [?:?]
	at java.base/java.util.stream.AbstractTask.compute(AbstractTask.java:327) [?:?]
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754) [?:?]
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) [?:?]
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) [?:?]
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) [?:?]
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) [?:?]
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) [?:?]
[12:47:13] [ForkJoinPool-1-worker-305/ERROR] [FML/]: SimpleChannelHandlerWrapper exception
java.lang.NullPointerException: Cannot invoke "net.minecraft.server.MinecraftServer.func_71203_ab()" because the return value of "cpw.mods.fml.common.FMLCommonHandler.getMinecraftServerInstance()" is null
	at cpw.mods.fml.common.network.FMLOutboundHandler$OutboundTarget$7.selectNetworks(FMLOutboundHandler.java:193) ~[forge-1.7.10-10.13.4.1614-1.7.10-universal.jar:?]
	at cpw.mods.fml.common.network.FMLOutboundHandler.write(FMLOutboundHandler.java:273) ~[forge-1.7.10-10.13.4.1614-1.7.10-universal.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.invokeWrite(DefaultChannelHandlerContext.java:644) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:698) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:637) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:115) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.invokeWrite(DefaultChannelHandlerContext.java:644) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:698) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.writeAndFlush(DefaultChannelHandlerContext.java:688) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.writeAndFlush(DefaultChannelHandlerContext.java:717) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:893) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:239) ~[netty-all-4.0.10.Final.jar:?]
	at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.sendToAllAround(SimpleNetworkWrapper.java:210) ~[forge-1.7.10-10.13.4.1614-1.7.10-universal.jar:?]
	at com.gtnewhorizon.structurelib.StructureLibAPI.sendAlignment(StructureLibAPI.java:246) ~[?:?]
	at gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase.setExtendedFacing(GT_MetaTileEntity_EnhancedMultiBlockBase.java:64) ~[?:?]
	at com.gtnewhorizon.structurelib.alignment.IAlignment.checkedSetExtendedFacing(IAlignment.java:161) ~[?:?]
	at com.gtnewhorizon.structurelib.alignment.IAlignment.toolSetDirection(IAlignment.java:70) ~[?:?]
	at gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase.onFacingChange(GT_MetaTileEntity_EnhancedMultiBlockBase.java:106) ~[?:?]
	at gregtech.api.metatileentity.BaseMetaTileEntity.setFrontFacing(BaseMetaTileEntity.java:900) ~[?:?]
	at blockrenderer6343.integration.gregtech.GT_GUI_MultiblocksHandler.placeMultiblock(GT_GUI_MultiblocksHandler.java:201) ~[?:?]
	at blockrenderer6343.common.GUI_MultiblocksHandler.initializeSceneRenderer(GUI_MultiblocksHandler.java:280) ~[?:?]
	at blockrenderer6343.integration.gregtech.GT_GUI_MultiblocksHandler.loadNewMultiblock(GT_GUI_MultiblocksHandler.java:104) ~[?:?]
	at blockrenderer6343.common.GUI_MultiblocksHandler.loadMultiblock(GUI_MultiblocksHandler.java:102) ~[?:?]
	at blockrenderer6343.integration.nei.GT_NEI_MultiblocksHandler.tryLoadMultiblocks(GT_NEI_MultiblocksHandler.java:147) ~[?:?]
	at blockrenderer6343.integration.nei.GT_NEI_MultiblocksHandler.loadCraftingRecipes(GT_NEI_MultiblocksHandler.java:102) ~[?:?]
	at codechicken.nei.recipe.TemplateRecipeHandler.loadCraftingRecipes(TemplateRecipeHandler.java:418) ~[?:?]
	at blockrenderer6343.integration.nei.GT_NEI_MultiblocksHandler.loadCraftingRecipes(GT_NEI_MultiblocksHandler.java:97) ~[?:?]
	at codechicken.nei.recipe.TemplateRecipeHandler.getRecipeHandler(TemplateRecipeHandler.java:556) ~[?:?]
	at codechicken.nei.recipe.GuiCraftingRecipe.lambda$getCraftingHandlers$0(GuiCraftingRecipe.java:69) ~[?:?]
	at codechicken.nei.recipe.RecipeHandlerQuery.lambda$null$2(RecipeHandlerQuery.java:77) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) [?:?]
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) [?:?]
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) [?:?]
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) [?:?]
	at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:960) [?:?]
	at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:934) [?:?]
	at java.base/java.util.stream.AbstractTask.compute(AbstractTask.java:327) [?:?]
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754) [?:?]
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) [?:?]
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) [?:?]
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) [?:?]
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) [?:?]
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) [?:?]
[12:47:13] [ForkJoinPool-1-worker-305/ERROR] [FML/]: SimpleChannelHandlerWrapper exception
java.lang.NullPointerException: Cannot invoke "net.minecraft.server.MinecraftServer.func_71203_ab()" because the return value of "cpw.mods.fml.common.FMLCommonHandler.getMinecraftServerInstance()" is null
	at cpw.mods.fml.common.network.FMLOutboundHandler$OutboundTarget$7.selectNetworks(FMLOutboundHandler.java:193) ~[forge-1.7.10-10.13.4.1614-1.7.10-universal.jar:?]
	at cpw.mods.fml.common.network.FMLOutboundHandler.write(FMLOutboundHandler.java:273) ~[forge-1.7.10-10.13.4.1614-1.7.10-universal.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.invokeWrite(DefaultChannelHandlerContext.java:644) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:698) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:637) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:115) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.invokeWrite(DefaultChannelHandlerContext.java:644) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:698) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.writeAndFlush(DefaultChannelHandlerContext.java:688) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelHandlerContext.writeAndFlush(DefaultChannelHandlerContext.java:717) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:893) ~[netty-all-4.0.10.Final.jar:?]
	at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:239) ~[netty-all-4.0.10.Final.jar:?]
	at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.sendToAllAround(SimpleNetworkWrapper.java:210) ~[forge-1.7.10-10.13.4.1614-1.7.10-universal.jar:?]
	at com.gtnewhorizon.structurelib.StructureLibAPI.sendAlignment(StructureLibAPI.java:246) ~[?:?]
	at gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase.setExtendedFacing(GT_MetaTileEntity_EnhancedMultiBlockBase.java:64) ~[?:?]
	at com.gtnewhorizon.structurelib.alignment.IAlignment.checkedSetExtendedFacing(IAlignment.java:161) ~[?:?]
	at com.gtnewhorizon.structurelib.alignment.IAlignment.toolSetDirection(IAlignment.java:70) ~[?:?]
	at gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase.onFacingChange(GT_MetaTileEntity_EnhancedMultiBlockBase.java:106) ~[?:?]
	at gregtech.api.metatileentity.BaseMetaTileEntity.setFrontFacing(BaseMetaTileEntity.java:900) ~[?:?]
	at blockrenderer6343.integration.gregtech.GT_GUI_MultiblocksHandler.placeMultiblock(GT_GUI_MultiblocksHandler.java:201) ~[?:?]
	at blockrenderer6343.common.GUI_MultiblocksHandler.initializeSceneRenderer(GUI_MultiblocksHandler.java:280) ~[?:?]
	at blockrenderer6343.integration.gregtech.GT_GUI_MultiblocksHandler.loadNewMultiblock(GT_GUI_MultiblocksHandler.java:104) ~[?:?]
	at blockrenderer6343.common.GUI_MultiblocksHandler.loadMultiblock(GUI_MultiblocksHandler.java:102) ~[?:?]
	at blockrenderer6343.integration.nei.GT_NEI_MultiblocksHandler.tryLoadMultiblocks(GT_NEI_MultiblocksHandler.java:147) ~[?:?]
	at blockrenderer6343.integration.nei.GT_NEI_MultiblocksHandler.loadCraftingRecipes(GT_NEI_MultiblocksHandler.java:102) ~[?:?]
	at codechicken.nei.recipe.TemplateRecipeHandler.loadCraftingRecipes(TemplateRecipeHandler.java:418) ~[?:?]
	at blockrenderer6343.integration.nei.GT_NEI_MultiblocksHandler.loadCraftingRecipes(GT_NEI_MultiblocksHandler.java:97) ~[?:?]
	at codechicken.nei.recipe.TemplateRecipeHandler.getRecipeHandler(TemplateRecipeHandler.java:556) ~[?:?]
	at codechicken.nei.recipe.GuiCraftingRecipe.lambda$getCraftingHandlers$0(GuiCraftingRecipe.java:69) ~[?:?]
	at codechicken.nei.recipe.RecipeHandlerQuery.lambda$null$2(RecipeHandlerQuery.java:77) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) [?:?]
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) [?:?]
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) [?:?]
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) [?:?]
	at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:960) [?:?]
	at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:934) [?:?]
	at java.base/java.util.stream.AbstractTask.compute(AbstractTask.java:327) [?:?]
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754) [?:?]
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) [?:?]
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) [?:?]
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) [?:?]
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) [?:?]
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) [?:?]

Mod List or GTNH Pack Version

GTNH-2.5.1 w/ recommended changes

Final Checklist

  • I have searched the issues and haven't found a similar issue.
  • I have read the known incompatibilities and this is not related to one of those.
  • I am running an officially released version. (Or, if I've compiled it myself I plan to fix the issue)
  • This issue is not shader related (they aren't ready yet for testing)
commented

Currently experiencing this consistently in newest Angelica (alpha30). What can I do to help to deduce the issue?

Current relevant mods:
+unimixins-all-1.7.10-0.1.16
angelica-1.0.0-alpha30
CodeChickenCore-1.2.0
gtnhlib-0.2.9
hodgepodge-2.4.6

commented

Sure, I'll submit the logs to this current play session once I start to notice the freezing. I have the feeling however, that this could be more of a gradual thing.

Which logs specifically would you like,

ALSO
Would a VisualVM profile be useful, I've tried diagnosing my frame issues with it before but I honestly don't really know what to look for. You guys might get more insight than I.

Do you have logs? Can you run an instance and determine when in the log the issue begins? Especially if you've got different hardware from queeek that can be very useful.

commented

Do you have logs? Can you run an instance and determine when in the log the issue begins? Especially if you've got different hardware from queeek that can be very useful.

commented

It'll likely take a while/possibly crash depending on your ram -- but see if you can compute the dominators by retained size -- and see where they're coming from. Alternatively, dig through the biggest objects and see where they're being referenced from.

A sampling of the memory allocations might also be useful - the longer the better, and with as small of a sampling rate as is reasonable for not killing performance.

commented

Here's a Thread dump I believe I caught while during a big lag spike. See what you can get from this.
LagSpike.txt

I'll do a sampler run once I get home

commented

Here's a screenshot from my sample of about 20 minutes:

image

Here's the overview tab for the entire 5ish hours:
image

commented

While freezing is occuring:
image

After instance restart:
image

commented

Any additional info as to what is referencing these two?

image

First one is probably obvious enough, second one though needs more insight

commented

You should run the Memory sampler, not the CPU sampler

commented

Any additional info as to what is referencing these two?

image

First one is probably obvious enough, second one though needs more insight

When getting my freezing again, the same two (GT_IconFlipped and Object[]) were present again at the top. I'm unsure how to deduce any more info unless you let me know how cause I'm already out of me depths. :)

commented

oops, didn't mean to close. here is the log, appears to be a memory leak so i am not sure how helpful it will be. i switched to java 21 since the initial report
fml-client-latest.log

commented

I haven't been able to play GTNH much recently so I will leave some random notes here. I will try to properly track down the issue the next time I can.

  • This appears to be a memory leak
  • It is much quicker to reproduce with less memory allocated
  • The leak is contained within the JVM, memory is limited to proper allocation and cleared upon closing the game
  • Possibly related to item or GUI rendering (inconclusive)
  • The error I noted in my initial post appears to be caused by the JVM running out of memory and not related to the cause of the leak
  • As stated in the initial post, Angelica 1.0.0-alpha13 is where this leak was introduced
  • I have so far only tested under LWjGL3 and Linux
  • Minecraft versions which use LWjGL2 have a chunk-rendering related memory leak under Linux which is not contained to the JVM, making me unable to test LWjGL2 for this particular issue
commented

I'll note: that we added the pooled quads in alpha13, which reuses previously allocated quads after they've been released, so that will maintain allocation of the maximum number of quads that were ever in use. We could potentially look into tracking the size over time and shrinking if needed, but at the potential cost of more allocations later....

Might also be good to track to make sure everything is getting properly released...

commented

Also as it stands, any reusable buffer grows to a maximum size and stays there, so it might not actually be a leak.

commented

If this continues to happen, please run VisualVM or Intellij's profiler (memory) and see what's being allocated.

I'd also suggest taking a few heap dumps and seeing what objects are piling up to help track this down.

commented

I collected two heap dumps yesterday, one of alpha 12 and one of alpha 23. I have yet to do any profiling or collect a heap dump at total memory saturation. with 5.5gb of memory allocated, freezing started to occur around 4 hours in on Alpha 23. Over the course of this 4 hour period, the amount of memory cleared by garbage collection continued to decrease with freezing starting around 60% saturation.

I'm still learning my way around things. Alpha23 has a very high instance count for gregtech.common.render.GT_IconFlipped, accounting for 32% of all items in the "Classes by Number of Instances" list and 12.9% in "Classes by Size of Instances" list.

I have attached screenshots of the two heap dump's summaries, if there is anything in specific that would be useful to provide I can do so. It's worth noting Alpha 23's heap dump was collected after a garbage collection run and Alpha 12 had less memory allocated as I did not have enough time to fully replicate Alpha 23's testing.

Alpha 23
Alpha 12