Fixing memory issues
One of the most common issues encountered when installing Pixelmon is Minecraft running out of memory. Pixelmon has many large assets such as models, textures, and sounds, that require significantly more memory to load compared to vanilla Minecraft and many other mods. Not having enough memory will generally cause Minecraft to crash or freeze while loading, though it can also manifest as persistent stutter.
Identifying the issue
Memory issues are not the only cause of Minecraft not loading, though the issues listed below are often related to insufficient allocated memory.
If Minecraft crashes when attempting to start up, it is possible that the crash is caused by running out of memory. To check whether this is the case, you will need to look at the crash report that is displayed after Minecraft crashes. The first line of the crash report after "Description" is the start of the actual crash. Look for any of the following lines:
- "java.lang.OutOfMemoryError: Java heap space"
- "net.minecraftforge.fml.common.LoaderException: java.lang.OutOfMemoryError: Java heap space"
- "Caused by: java.lang.IllegalAccessError: tried to access field net.minecraft.client.renderer.entity.RenderManager.field_178636_l from class com.pixelmonmod.pixelmon.client.ClientProxy"
- "at net.minecraft.world.World.getSkyColorBody(World.java:1477)"
If the crash begins with any of these lines, then Minecraft is likely crashing because it ran out of memory.
- If Minecraft freezes on the loading screen, it is very likely that it has run out of memory. In particular, memory issues commonly cause the Forge loading screen to freeze while loading models and textures. (at the "Reloading — ModelManager" stage)
- If Minecraft freezes at a regular interval and then unfreezes after, it is possible that Minecraft does not have enough memory to run smoothly.
Allocating more memory
To improve performance and stability in a modded setup, more memory must be allocated to Minecraft. (at least 2GB)
- In the vanilla Minecraft launcher, select the "Launch options" tab.
- Make sure that the switch labeled "Advanced settings" is turned on!
- Find and click the Forge profile that you are using to play Pixelmon.
- Find the "JVM Arguments" text box, and then the text that reads
-Xmx#G. Change this to
- In the Technic launcher, click the gear icon with the "Launcher Options" label at the top right.
- Click into the "JAVA SETTINGS" tab.
- Click into the "Memory" box, and increase the allocation to at least 2GB.
- In the AT Launcher, click "Settings" to the right.
- Click into the "Java/Minecraft" tab.
- Click into the "Maximum Memory/Ram" box, and increase the allocation to at least 2GB.
If you cannot increase memory above 1GB or the game now crashes, see this section.
If Minecraft does not successfully start up after changing the allocation, there are several possible causes.
32 bit Java
You may be using a 32 bit Java version, which will not allow allocations higher than roughly 1GB. If you have a 64 bit version of Java installed, it's still possible that Minecraft is using your 32 bit Java installation instead. A way to check the Java version being used by Minecraft is to examine the game output when it fails to start. If Minecraft is using a 32-bit Java version, the following message will be displayed:
Error occurred during initialization of VM Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0 Could not reserve enough space for ###KB object heap
On the Technic launcher, you will not be able to allocate more than 1GB of RAM if you are using a 32-bit Java version. The AT Launcher will throw an error when being installed in a 32 bit environment.
You can download 64 bit installers for Java here. Make sure to choose a version that is labeled as 64 bit, as any unlabeled installers will still be 32 bit.
32 bit operating system
If you are using Windows and are unable to install a 64-bit Java version, it is possible that your operating system is 32 bit and cannot run 64 bit programs. Be warned that upgrading Windows from 32-bit to 64-bit is not a trivial task. If you are willing to upgrade, see one of the following links depending on the version of Windows you are using:
32 bit hardware
If you cannot upgrade to a 64 bit operating system, it is possible that your computer's processor only supports 32 bit operation. In this case, you will need to get a new computer with a 64 bit processor.
If you've already installed a 64 bit Java version and are still getting the same errors as before, your computer may not have enough memory to run Pixelmon.
You can check the amount of memory installed on your system by right-clicking "Computer" (Windows 7/8) or "This PC" (Windows 10) and choosing "Properties". Look for the "Installed memory (RAM)" entry under "System". If there is 2GB or less installed, you will need to add more memory to your computer in order to run Pixelmon.
Should you want to buy and install more memory, the process is explained in detail here.
Global Java options
Windows systems may have specific settings set that will limit the amount of memory that can be allocated to a Java program. Frequently, this limit is less than 2GB of memory and will override any manually-defined JVM arguments, causing too little memory to be allocated to Minecraft.
To check if this limit is affecting you, look at the "System Details" section of the Minecraft crash report, find the line that starts with "JVM Flags", and look for
-Xmx in this line. If you see multiple
-Xmx arguments, including one that is not in the "JVM Arguments" text box in your Minecraft profile, the global Java limit is preventing you from allocating enough memory.
The following snippet is an example of the JVM flags that are displayed in a crash report when the global Java limit problem occurs. Notice that there is a user-defined
-Xmx2G and an additional
-Xmx512M that the user did not manually add.
JVM Flags: 5 total; ... -XX:MaxPermSize=128m -Xmx2G -Xms256M -Xmx512M
To remove this global limit, follow these steps:
- In File Explorer, right-click on "Computer" (Windows 7/8) or "This PC" (Windows 10) and choose "Properties".
- A window will open. In the sidebar on the left of this window, select "Advanced system settings".
- A "System Properties" window will open. Select the "Environment Variables" button at the bottom of this window.
- In the "Environment Variables" window, scroll through the list labeled "System variables" until you find a variable labeled
- Select the
_JAVA_OPTIONSentry and click "Delete" to remove it.
- Restart your computer.
- After Windows restarts, start up Minecraft to verify that it is now able to start successfully.