You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Oh just noticed the IceWalkSolver class, I only looked to IceWalkUtils while creating the issue. Seems like there are checks for is in ice walk room, but they are not volatile nor atomic so my guess is there's a concurrency issue here. Everything inside the new thread should use thread-safe logic or the multi threaded block scanning should just be removed to be honest, it shouldn't take that long to find the solution anyways? Especially since, to my knowledge, the room is not randomized or anything at all and a constant solution might very well work.
Also looking at that class I realized this probably silverfish walk puzzle and not ice fill. My bad.
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
The text was updated successfully, but these errors were encountered: