Start Failed. Internal error: java.lang.StackOverflowError

You may get the following error on IDE startup:

java.lang.StackOverflowError 
at java.util.zip.Deflater.deflate(Deflater.java:366)
at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:251)
at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:211)
at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1877)
at java.io.ObjectOutputStream$BlockDataOutputStream.write(ObjectOutputStream.java:1841)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1534)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)

The issue is caused by the automatic proxy configuration script (PAC) being huge and default JVM stack size is not enough to handle it (the script is evaluated using Nashorn JavaScript engine inside the JVM).

Adding -Xss4m into the .vmoptions file should workaround the problem (this option increases the stack size to 4m from the default value which should be 1m for the most operating systems and JVMs).

To improve the startup performance also add -Dcom.btr.proxy.pac.overrideLocalIP=127.0.0.1 JVM option to the same file.

Please see https://youtrack.jetbrains.com/issue/JRE-247 for more details.

We are considering making 4m the new default stack size for the future product updates.

1 comment

This error occurred for me when launching Rider.

This helped me but I had to modify the vmoptions in the bin directory.

I wasn't sure where in the user config folder to put it. 

I tried to paste into the C:\Users\myuser\.Rider2017.1\config but it didn't seem to work.

0

Please sign in to leave a comment.

Have more questions?

Submit a request