discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Recursion detected in non-recursive function.

NH
nop head
Wed, Feb 28, 2018 5:43 PM

I go this error from a large library

ERROR: Recursion detected calling function 'len'

It is very difficult to find where the error is because it is a recursive
function that calls len, not len itself and many recursive functions call
len. I ended up doing a binary chop of my test code to find the regression.

It seems to me that when the stack overflows it needs to show more context.
At the very least if the function that detects it is a built in it should
pop that and print the function or module that called it.

I go this error from a large library ERROR: Recursion detected calling function 'len' It is very difficult to find where the error is because it is a recursive function that calls len, not len itself and many recursive functions call len. I ended up doing a binary chop of my test code to find the regression. It seems to me that when the stack overflows it needs to show more context. At the very least if the function that detects it is a built in it should pop that and print the function or module that called it.
N
NateTG
Wed, Feb 28, 2018 6:36 PM

"It seems to me that when the stack overflows it needs to show more context.
At the very least if the function that detects it is a built in it should
pop that and print the function or module that called it."

Or maybe show the most common 10 things in the stack, or the top 10-15 or
something.

--
Sent from: http://forum.openscad.org/

"It seems to me that when the stack overflows it needs to show more context. At the very least if the function that detects it is a built in it should pop that and print the function or module that called it." Or maybe show the most common 10 things in the stack, or the top 10-15 or something. -- Sent from: http://forum.openscad.org/
TP
Torsten Paul
Wed, Feb 28, 2018 7:28 PM

On 02/28/2018 07:36 PM, NateTG wrote:

Or maybe show the most common 10 things in the stack, or the
top 10-15 or something.

Yes, that's pretty much the result of discussion in
https://github.com/openscad/openscad/issues/1443

(related also https://github.com/openscad/openscad/issues/1828)

ciao,
Torsten.

On 02/28/2018 07:36 PM, NateTG wrote: > Or maybe show the most common 10 things in the stack, or the > top 10-15 or something. > Yes, that's pretty much the result of discussion in https://github.com/openscad/openscad/issues/1443 (related also https://github.com/openscad/openscad/issues/1828) ciao, Torsten.
T
Troberg
Thu, Mar 1, 2018 1:18 PM

It seems to me that when the stack overflows it needs to show more context.

To be honest, that's needed for all errors...

--
Sent from: http://forum.openscad.org/

> It seems to me that when the stack overflows it needs to show more context. To be honest, that's needed for all errors... -- Sent from: http://forum.openscad.org/