• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.lang.StackOverflowError  RSS feed

 
Guadalupe Ortiz
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no recursive calls, but like five elements which call others secuencially. I get this error "java.lang.StackOverflowError" How can i solve it?
Any help is grateful
Gobellot
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stack space is usually so big that it takes serious recursion to run out. Check to make sure that none of your calls can circle back and call other methods in the chain. Such indirect recursion can be hard to spot. Maybe have each method write its name when it is called so you can spot repetition on the console. Hope that helps!
 
Guadalupe Ortiz
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank-you very much, there was no recursive call, but yes two method with the same name and it was referencing the wron one (then making a recursive call)
Thanks again
gobellot
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!