Ajarmar / universal-pokemon-randomizer-zx

Public repository of source code for the Universal Pokemon Randomizer ZX
GNU General Public License v3.0
585 stars 149 forks source link

Stuck on the loading screen #91

Closed kappashell closed 3 years ago

kappashell commented 3 years ago

When i try to open a ROM, the launcher is stuck on the loading screen for some reasons.

kappashell commented 3 years ago

Here's the launcher-log :

Picked up _JAVA_OPTIONS: -Xmx512M Exception in thread "Thread-4" java.lang.OutOfMemoryError: Java heap space at com.dabomstew.pkrandom.ctr.RomfsFile.getContents(RomfsFile.java:52) at com.dabomstew.pkrandom.ctr.NCCH.getFile(NCCH.java:705) at com.dabomstew.pkrandom.romhandlers.Abstract3DSRomHandler.readFile(Abstract3DSRomHandler.java:185) at com.dabomstew.pkrandom.romhandlers.Abstract3DSRomHandler.readGARC(Abstract3DSRomHandler.java:174) at com.dabomstew.pkrandom.romhandlers.Gen7RomHandler.getAreaData(Gen7RomHandler.java:1248) at com.dabomstew.pkrandom.romhandlers.Gen7RomHandler.loadedROM(Gen7RomHandler.java:248) at com.dabomstew.pkrandom.romhandlers.Abstract3DSRomHandler.loadRom(Abstract3DSRomHandler.java:74) at com.dabomstew.pkrandom.newgui.NewRandomizerGUI.lambda$loadROM$94(NewRandomizerGUI.java:669) at com.dabomstew.pkrandom.newgui.NewRandomizerGUI$$Lambda$119/1936693334.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

tom-overton commented 3 years ago

Are you on Windows? Open a command prompt and do this: echo %_JAVA_OPTIONS%

And let me know what (if anything) shows up

kappashell commented 3 years ago

-Xmx512M shows up

tom-overton commented 3 years ago

Yeah, you'll need to do the following then:

  1. Hit the start button, then type "Edit the system environment variables" and select the option that looks like this: image
  2. In the window that pops up, click on the "Environment Variables" button: image
  3. In either the user or system variables, you should find _JAVA_OPTIONS. You'll need to find and delete it. Just click on it and press "Delete".

What's happening here is that your system is overriding the requested amount of memory for the Java process. Once you delete the _JAVA_OPTIONS variable, the randomizer will be able to use up to 4 GB of memory, and randomization should succeed. I'll update the wiki to have this information as well.