This discussion is archived
1 2 Previous Next 16 Replies Latest reply: Dec 29, 2009 2:26 PM by 791266 Go to original post RSS
  • 15. Re: Exception in thread "main" java.lang.StackOverflowError
    jschellSomeoneStoleMyAlias Expert
    Currently Being Moderated
    Misev wrote:
    jschell, relax man ;-)
    Misev, learn "man"....forum policy forbids resurrecting old threads.
    fishon, there's a switch to the jvm to increase the stack size, check
    this for example (though it didn't work for me, probably because I actually get the exception in Scala).
    Experience, which I have, suggests that the causes for this error are
    1. They have recursive code that NEVER terminates. This is the most likely cause.
    2. They have created a recursive method unintentionally.
    3. They have recursive code with works for a smaller test and doesn't for a larger. In many cases they want to do a much larger test. Least likely.

    In cases 1 and 2 your suggestion will not help at all. In case 3 it might help but only if the following is true
    1. They have a test case that is only slightly bigger.
    2. There is only one test case and there will never be any others (future ones will not be bigger.)
  • 16. Re: Exception in thread "main" java.lang.StackOverflowError
    791266 Explorer
    Currently Being Moderated
    @All who are resurrecting threads.

    Please, don't resurrect old threads. Start a new thread if you have a specific question. I'm locking this zombie.

    Kaj
1 2 Previous Next