SheerSt / pokewilds

PokeWilds - A Gen 2 Game/Engine using libGDX
2.71k stars 207 forks source link

[Bug]: Java heap space #389

Open SebastienNin opened 1 year ago

SebastienNin commented 1 year ago

Game Version

v0.8.8

Platform

Windows 10

What happened?

I can't reload my save. I played for 3 hours yesterday without any trouble. But now I got an error message when loading my save. Here is the error log if it can help:

Caused by: Java heap space

java.base/java.lang.StringLatin1.newString(Unknown Source)
java.base/java.lang.StringBuilder.toString(Unknown Source)
com.pkmngen.game.Specie.loadFromAsm(Specie.java:993)
com.pkmngen.game.Specie.init(Specie.java:347)
com.pkmngen.game.Specie.<init>(Specie.java:327)
com.pkmngen.game.Specie.<init>(Specie.java:323)
com.pkmngen.game.Pokemon.updateSpecieInfo(Pokemon.java:918)
com.pkmngen.game.Pokemon.updateSpecieInfo(Pokemon.java:888)
com.pkmngen.game.Pokemon.init(Pokemon.java:978)
com.pkmngen.game.Pokemon.<init>(Pokemon.java:797)
com.pkmngen.game.PkmnMap.loadMapFromFile(PkmnMap.java:4880)
com.pkmngen.game.PkmnMap.loadFromFile(PkmnMap.java:5084)
com.pkmngen.game.DrawSetupMenu.step(Action.java:2535)
com.pkmngen.game.Game.render(Game.java:1385)
com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:387)
com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:192)
com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:166)
com.pkmngen.game.desktop.DesktopLauncher.main(DesktopLauncher.java:30)

What should've happened? (Optional)

I should have my save loaded

SebastienNin commented 1 year ago

When trying to load my save, I can see my processor going to 100% use for pokewilds.

SebastienNin commented 1 year ago

I'll try using a smaller map size. I used XXL. i'll try with L play a bit and try to reload :)

SebastienNin commented 1 year ago

got the same issue with a L world after 30 minutes of play.

2023-01-28T10:07:44.7455154+01:00 java.lang.OutOfMemoryError: Java heap space

com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:172)
com.pkmngen.game.desktop.DesktopLauncher.main(DesktopLauncher.java:30)

Caused by: Java heap space

com.pkmngen.game.Tile.get(Tile.java:387)
com.pkmngen.game.PkmnMap.loadMapFromFile(PkmnMap.java:4805)
com.pkmngen.game.PkmnMap.loadFromFile(PkmnMap.java:5084)
com.pkmngen.game.DrawSetupMenu.step(Action.java:2535)
com.pkmngen.game.Game.render(Game.java:1385)
com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:387)
com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:192)
com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:166)
com.pkmngen.game.desktop.DesktopLauncher.main(DesktopLauncher.java:30)