• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what is StackOverflowError(code)

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

[ July 25, 2005: Message edited by: henry akoma ]
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pretty large code, Can you post the detail log message, so that we can narrow down on the error
 
henry akoma
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JAIKIRAN,
i am sorry, i dont know what u mean by the log message.
but if paradventure u mean the console display, it reads: Exception in thread "main" java.lang.StackOverflowError.

if this is not what u requested, please direct me how to get it.
thank u
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Henry,
What i can make out from the error message is that your program is recursively invoking some method(infinite loop scenario) and control is NOT coming out of some funcation. Will have go through the entire code once to find out which method is being invoked recursively.

One option to find out the problem is to place a
System.out.println("Entering theNameOfTheMethod");
at the start of each method. This will help you track the flow
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, in the code there are some looping statements. Even these might be cause of the exception. Reason might be the condition for breaking out of the loop is NEVER met. Check it out
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by jaikiran pai:
Even these might be cause of the exception. Reason might be the condition for breaking out of the loop is NEVER met.



This would cause the program to loop forever, but it would not cause a StackOverflowException.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ya you are right. Accept my mistake. Just wanted, Henry to confirm that if there are any method invocations in the looping statement, then that method
might have been called continuously because of the condition for breaking the loop never being met

Thanks for pointing the mistake
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic