Thunderhead Engineering Forum

Public Forum => Pathfinder => Topic started by: alvarez.fpe on February 05, 2016, 03:53:00 pm

Title: StackOverflowError
Post by: alvarez.fpe on February 05, 2016, 03:53:00 pm
I have been working on a Pathfinder file of about 330 Mo. I save the file and close Pathfinder. When I tried to open it again, it says that there is a Stack overflow error.
Also, it asked me to open the backup file, which dates of the start of the day, even if I made lots of saves during the day.
Please, tell me how to save a full day of tedious work of extracting rooms in a very complex structure.
Thank you
Title: Re: StackOverflowError
Post by: Charlie Thornton on February 18, 2016, 11:34:43 am
The stack overflow error sounds like a bug in the system that calculates the dependencies between in-memory objects. Can you post your PTH file or email it to ?
Title: Re: StackOverflowError
Post by: danelyoung on May 25, 2020, 04:20:31 am
A StackOverflowError is simply signals that there is no more memory available. It is to the stack what an OutOfMemoryError is to the heap: it simply signals that there is no more memory available. JVM has a given memory allocated for each stack of each thread, and if an attempt to call a method happens to fill this memory, JVM throws an error. Just like it would do if you were trying to write at index N of an array of length N. No memory corruption can happen. The stack can not write into the heap.

The common cause for a stackoverflow ( is a bad recursive call. Typically, this is caused when your recursive functions doesn't have the correct termination condition, so it ends up calling itself forever. Or when the termination condition is fine, it can be caused by requiring too many recursive calls before fulfilling it.

Here's an example:

public class Overflow {
public static final void main(String[] args) {

That function calls itself repeatedly with no termination condition. Consequently, the stack fills up because each call has to push a return address on the stack, but the return addresses are never popped off the stack because the function never returns, it just keeps calling itself. If the stack is full you can't push, if you do you'll get stack overflow error. StackOverflowError is avoidable if recursive calls are bounded to prevent the aggregate total of incomplete in-memory calls (in bytes) from exceeding the stack size (in bytes).

Title: Re: StackOverflowError
Post by: Sooqa on July 01, 2020, 11:36:16 pm
Hey whatz up !!