PhpStorm won't start: "Failed to create JVM: error code -4" dialog displays

I had a lot of files open in PhpStorm and was doing a search & replace and apparently it ran out of memory. A dialog popped up asking me if I wanted to change the maximum mounts of memory and there were three entries (I forget what they were for). I doubled the values in each of the textfields and clicked the button to shutdown. Now when I try to start up PhpStorm, a dialog pops up, saying "Failed to create JVM: error code -4."

What should I do?

3 comments
Comment actions Permalink

Change Xmx to some lower value:) Are you on Windows? the 32-bit JVM on Windows can't allocate more than 2 Gb of RAM. The actual max heap size limit is usually 1.4-1.6 Gb (see http://www.oracle.com/technetwork/java/hotspotfaq-138619.html#gc_heap_32bit). Plus it needs to allocate all the heap in a single continuous chunk (see the answer at http://stackoverflow.com/questions/13489469/how-to-increase-intellij-32bit-xmx-more-than-1gb/13489882#13489882). Try playing with Xmx and see what value it accepts

0
Comment actions Permalink

Thank you. I found this article which proved to be very helpful:

https://intellij-support.jetbrains.com/entries/23393413-The-JVM-could-not-be-started-The-main-method-may-have-thrown-an-exception?flash_digest=bcde2956092cb404cff376a0e01e7484e72ba5b3

I installed the 64-bit version of the Java SDK and and now running the 64-bit version of PhpStorm.

When I started the 64-bit version of PhpStorm it had me import my configuration, which leads me to believe the 32-bit and 64 bit versions of PhpStorm do not use the same configuration files. Is that correct? Will any issues present if I try copying my 64-bit config from this computer to another computer that is 32-bits?

0
Comment actions Permalink

They use the same configurations files normally. Seems that your profile folder returned by 64-bit JDK is different from the one returned by 32-bit one (as PHPStorm creates its config folders in user profile directory by default)

Will any issues present if I try copying my 64-bit config from this computer to another computer that is 32-bits?


instead of copying the folders, try exporting/importing settings (File/Export settings)
0

Please sign in to leave a comment.