Re: v13 - how to manage not enough stack space error

2018-11-16 Thread Chip Scheide via 4D_Tech
Thanks I actually have this in place due to the fact that the initial call is for one parent (i.e maternal or paternal lineage), and subsequent (recursive) calls are for both parents; however I am reluctant to use the level limit as I do not know what a 'real' limit is. With a breeding

Re: v13 - how to manage not enough stack space error

2018-11-15 Thread Ingo Wolf via 4D_Tech
In such cases I use a longint parameter "level" to the recursive method. On first run this parameter is set to 1 and is incremented with every level of recursion. I then test for an arbitrary "level" (e.g. 1000) and abort the further recursion. HTH Ingo Wolf 4d_tech-requ...@lists.4d.com

Re: v13 - how to manage not enough stack space error

2018-11-15 Thread Chip Scheide via 4D_Tech
Chuck, The recursion issue is a data related issue. When the data is good, tested and running for years, there is no memory issue, and no crashing. It is the bad data which is causing the issue. -- I created a relative relationship where an animal was it's own parent... this is/was the data

RE: v13 - how to manage not enough stack space error

2018-11-15 Thread Justin Will via 4D_Tech
Chip I have some recursion stuff I do, sometimes it hit a bad data set that caused an infinite loop. What I have done is, created a process variable that gets incremented at the top of the recursion process and decrements at the end. I then put a check in my code to see if I'm more than say

Re: v13 - how to manage not enough stack space error

2018-11-15 Thread Charles Miller via 4D_Tech
You could keep track of memory, but why not increase size of process first. Additionally, you could get stack memory and meory data. Call it before exit get memory stats. You housl now have a ballpark of how much emory each call takes. You can then perhaps use a counter. Regards Chuck On Thu,