Reputation: 31
I am trying to launch Minecraft with these settings:
-XX:MaxPermSize=512M -Xms4096M -Xmx4096M
But I get this error:
[19:19:13 INFO]: Client> Error occurred during initialization of VM
[19:19:13 INFO]: Client> Incompatible minimum and maximum heap sizes specified
[19:19:13 INFO]: Client> Picked up _JAVA_OPTIONS: -Xmx512M
[19:19:13 ERROR]: Game ended with bad state (exit code 1)
[19:19:13 INFO]: Deleting C:\Users\Phil\AppData\Roaming\.minecraft\versions\1.6.4 Forge9.11.1.953\1.6.4-Forge9.11.1.953-natives-13645892457185
[19:19:13 INFO]: Ignoring visibility rule and showing launcher due to a game crash
I have checked, and some say its due to the Java environment settings, however, I have checked, and there are no Java arguments in the environments settings of Windows 8.1.
Upvotes: 3
Views: 41577
Reputation: 291
Encountered same problem with android studio V2.0. Resolved using following steps:
_JAVA_OPTIONS
from your Environment Variables.studio.vmoptions
file specified here in order to increase IDE memory. (for me -Xms1024m -Xmx1024m
worked fine.)Upvotes: 6
Reputation: 23
Goto Start Menu, type Environment Variables, click the top option. Then in both System and User variables, delete the values for _JAVA_OPTIONS from your Environment Variables.
This video will show you how to do it: https://www.youtube.com/watch?v=JF_o8WNt3hs
Note: If System Variables are greyed out, type in System in the start menu, and then goto Advanced System Settings on the right side. This will ensure you're accessing Environment Variables as an administrator user.
Upvotes: 1
Reputation: 1743
Somewhere the _JAVA_OPTIONS are being set. Which overrides any commandline parameters. here's a previous answer I gave on how to override this.
export _JAVA_OPTIONS="-Xmx20m";
java Test
>> Picked up _JAVA_OPTIONS: -Xmx20m
>> mem: 19601168
>> total mem: 20447232
java -Xmx123m Test
>> Picked up _JAVA_OPTIONS: -Xmx20m
>> mem: 19601320
>> total mem: 20447232
# clear java options
export _JAVA_OPTIONS=
java -Xmx123m Test
>> Picked up _JAVA_OPTIONS:
>> mem: 121773128
>> total mem: 123731968
It might be you need to override this variable (or test if it is set) in your batch file that starts up. Alternatively (but it isn't preferred practice) you can set the variable when you start to force your settings, but then you may be causing this issue for someone else further down the line.
you could create a batch that saves the value, empties the variable, calls your program and re-sets the variable
Upvotes: 0
Reputation: 57
Commonly caused by poor programming practice, something on your computer is setting the environment variable _JAVA_OPTIONS.
Razer has a known issue with doing this.
You can get around it with a fairly dirty hack by setting up your own _JAVA_OPTIONS environment variable https://kb.wisc.edu/cae/page.php?id=24500
Set the values to your desired heap sizes.
If you have Razer Synapse, turning it off will not always fix the problem. You may have to uninstall it or tell it to not start on system startup then restart.
Updating to the latest version of synapse may fix the problem at some point in the future when Razer eventually fixes it. (23/12/2014 || 12/23/2014) Confirmation from Razer that a patch is in the works, no ETA provided.
Upvotes: 2
Reputation: 135
I suspect that you have "Razor Synapse 2.0" running, stop it and it will work. That solved it for me at least.
Upvotes: 0
Reputation: 409
On Unix specifying -Xms was giving me trouble. If you just use -Xmx there shouldn't be any problems. -XX:MaxPermSize as far as I know is not necessary.
Upvotes: 1