-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Basically this been happened a lot of times to me in the past and whenever it happens my memory allocation rate goes above upwards of 1 GB/s trash being generated and garbage collected by the JVM, which makes the game have extreme lag and makes it unplayable. I always restarted to fix it and kinda lived with it, although everytime I tried to find the cause as well before restarting; i always failed to find the cause.
I couldn't find the cause before because I only looked at heap dumps since i suspected a memory leak or something. But today I took thread dump and I saw the findSolution method is perhaps stuck in an infinite recursion. Why it doesn't give StackOverflowError and abort is beyond my understanding. Also I'm out of dungeons and it still keeps appearing on thread dumps a.k.a it still tries to find a solution.
Please use a loop instead of recursion and minimize/remove Point and ArrayList allocations altogether, and perhaps add a isInDungeons or even isInIceFillRoom check to not continue trying to find a solution if not in ice fill room or in dungeons.
Thanks

