Posted on 2008-11-17
Last Modified: 2013-11-23
Sorry, this is not really a repost but a subproblem of a thread I already closed.  Can you help me figure out why I'm getting a stack overflow error... I don't see how I'm doing infinite recursion.

All details at this thread.

Admin this is not a repost, just a new problem with the same program.

Thank you.
Question by:ubuntuguy
    LVL 13

    Assisted Solution

    Indeed, you are not doing an infinite recursion.

    But you are doing a recursion which is more big than your stack.

    Change your stack size with

    java -Xss<size>
    LVL 86

    Accepted Solution

    Stack overflow can occur when a loop is never-ending too. Check your loops and put debug code in if necessary
    LVL 1

    Author Comment

    Hey MicheleMarcon,

    Do I change the stack size inside that class? Or do I run the command on the terminal?  Also, what would be a good size?
    LVL 1

    Author Comment

    I checked my loops and I don't see any infinite work.... any ideas?
    LVL 86

    Expert Comment

    What are you getting from your debugging traces?

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Books that can get me started on JAVA 2 34
    strCount chalenge 3 35
    wordlen challenge 3 30
    groovy example issue 10 34
    Article by: Nadia
    Suppose you use Uber application as a rider and you request a ride to go from one place to another. Your driver just arrived at the parking lot of your place. The only thing you know about the ride is the license plate number. How do you find your U…
    Article by: Nadia
    Linear search (searching each index in an array one by one) works almost everywhere but it is not optimal in many cases. Let's assume, we have a book which has 42949672960 pages. We also have a table of contents. Now we want to read the content on p…
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now