Recursion detected in non-recursive function.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Recursion detected in non-recursive function.

nophead
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.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Recursion detected in non-recursive function.

NateTG
"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/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Recursion detected in non-recursive function.

tp3
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.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: Recursion detected in non-recursive function.

Troberg
In reply to this post by nophead
> 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/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org