tags:

views:

60

answers:

2

What can cause a java.lang.StackOverflowError? The stack printout that I get is not very deep at all (only 5 methods).

A: 

One of the (optional) arguments to the JVM is the stack size. It's -Xss. I don't know what the default value is, but if the total amount of stuff on the stack exceeds that value, you'll get that error.

Generally, infinite recursion is the cause of this, but if you were seeing that, your stack trace would have more than 5 frames.

Try adding a -Xss argument (or increasing the value of one) to see if this goes away.

nsayer