Difference between revisions of "Fixing memory issues"
Line 16: | Line 16: | ||
===Pixelmon launcher=== | ===Pixelmon launcher=== | ||
− | The [[Pixelmon launcher]] will not start up ''Minecraft'' until | + | The [[Pixelmon launcher]] will not allow you start up ''Minecraft'' until at least 2G of memory is allocated. While this restriction usually prevents memory issues from occurring, there are certain situations that may still cause memory issues. |
*If you have already allocated at least 2G of memory through the Pixelmon launcher and ''Minecraft'' still crashes or freezes due to memory errors (as detailed above), see [[Fixing memory issues#Global Java options|this section]]. | *If you have already allocated at least 2G of memory through the Pixelmon launcher and ''Minecraft'' still crashes or freezes due to memory errors (as detailed above), see [[Fixing memory issues#Global Java options|this section]]. | ||
*If the Pixelmon launcher does not allow you to allocate more than 1200M of memory, see [[Fixing memory issues#32-bit Java|this section]]. | *If the Pixelmon launcher does not allow you to allocate more than 1200M of memory, see [[Fixing memory issues#32-bit Java|this section]]. |
Revision as of 00:23, 4 January 2017
One of the most common issues encountered when installing Pixelmon is the user's system running out of memory (RAM). Pixelmon has many large assets, such as models, textures, and music, that require significantly more memory to load compared to vanilla Minecraft and most other mods, and not having enough memory will cause Minecraft to either crash or freeze while loading.
Contents
Identifying the error
Memory errors are not the only cause of Minecraft not loading. Before attempting to fix a memory error, it must first be confirmed that a memory error is causing the problem.
Crashing
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"
- "net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: com/pixelmonmod/pixelmon/..."
- "SplashProgress has detected a error loading Minecraft."
- "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"
If the crash begins with any of these lines, then Minecraft is crashing because it ran out of memory.
Freezing
If Minecraft freezes on the loading screen, it is very likely that Minecraft has run out of memory. In particular, memory issues commonly cause the Forge loading screen to freeze while loading models and textures ("Reloading — ModelManager").
Pixelmon launcher
The Pixelmon launcher will not allow you start up Minecraft until at least 2G of memory is allocated. While this restriction usually prevents memory issues from occurring, there are certain situations that may still cause memory issues.
- If you have already allocated at least 2G of memory through the Pixelmon launcher and Minecraft still crashes or freezes due to memory errors (as detailed above), see this section.
- If the Pixelmon launcher does not allow you to allocate more than 1200M of memory, see this section.
Allocating more memory
To fix an issue with running out of memory, more memory must be allocated to Minecraft (at least 2G).
- On the Minecraft launcher, edit the profile that you are using to play Pixelmon.
- Under the "Java Settings (Advanced)" section, find the "JVM Arguments" text box.
- Inside this text box, find the text that reads "-Xmx". After this text, there will be a number and a letter; e.g., "-Xmx1G" or "-Xmx512M". Change this to "-Xmx2G".
- Start Minecraft. If it completes start-up successfully, you have allocated enough memory.
Other problems
If Minecraft does not successfully start up after changing the JVM arguments, there are several possible causes.
32-bit Java
If you are using Windows, you may be using a 32-bit Java version, which cannot allocate the needed 2G of memory needed to run Pixelmon. One way to check this is to examine the Minecraft game output when Minecraft fails to start. If you have 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 1048576KB object heap
You can download a 64-bit version of Java here. Make sure to choose the version of Java that is labeled "Windows x64".
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. You can also check the initial crash report before you attempted to change the JVM arguments. In the "System Details" section at the bottom of the crash report, look for a line starting with "Operating System". If it contains "(x86)", your operating system is 32-bit; you will need to upgrade to a 64-bit operating system in order to play Pixelmon. Below is an example of a 32-bit operating system:
Operating System: Windows 10 (x86) version 10.0
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:
Insufficient RAM
If you have already installed a 64-bit Java version and you're still getting the same error as before, then your computer may not have enough RAM to run Pixelmon. Check the amount of RAM on your system by right-clicking on "Computer" (Windows 7/8) or "This PC" (Windows 10) and choosing "Properties". Look for the "Installed memory (RAM)" entry under "System". If you have 2.00 GB RAM or less installed, you will need to install more RAM on your system in order to run Pixelmon. This will require you to physically buy more RAM and insert it into your computer; details about this process can be found here.
Global Java options
Windows systems have a feature that limits the amount of memory that can be allocated to a Java program. Frequently, this limit is less than 2G 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, and 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 "_JAVA_OPTIONS".
- Select the "_JAVA_OPTIONS" entry 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.