It is not easy to debug a recursive code when you get a recursion error:
there is no indication of which recursion is the culprit. Things get worst
when a non-recursive code generates a recursion error message like that:
echo([for(b=0; b!=1; b=0) b]);
That is an infinite loop, I know, but couldn't we have a better error
message?
I get:
ERROR: Recursion detected calling for loop '' in file echo.scad, line 1
from a recent build of master.
The error messages get better day by day due to the great work of Michael
Fry.
On Fri, 18 Jan 2019 at 15:35, Ronaldo Persiano rcmpersiano@gmail.com
wrote:
It is not easy to debug a recursive code when you get a recursion error:
there is no indication of which recursion is the culprit. Things get worst
when a non-recursive code generates a recursion error message like that:
echo([for(b=0; b!=1; b=0) b]);
That is an infinite loop, I know, but couldn't we have a better error
message?
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Sorry that should be Michael Frey
On Fri, 18 Jan 2019 at 18:05, nop head nop.head@gmail.com wrote:
I get:
ERROR: Recursion detected calling for loop '' in file echo.scad, line 1
from a recent build of master.
The error messages get better day by day due to the great work of Michael
Fry.
On Fri, 18 Jan 2019 at 15:35, Ronaldo Persiano rcmpersiano@gmail.com
wrote:
It is not easy to debug a recursive code when you get a recursion error:
there is no indication of which recursion is the culprit. Things get worst
when a non-recursive code generates a recursion error message like that:
echo([for(b=0; b!=1; b=0) b]);
That is an infinite loop, I know, but couldn't we have a better error
message?
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
I get:
ERROR: Recursion detected calling for loop '' in file echo.scad, line 1
from a recent build of master.
Well, that is a lot better than what I got with version 2018.01.06 (git
3473eb1) :
ERROR: Recursion detected calling for loop ''
although the recursion mention is misleading yet.
I need to update my OpenSCAD version...
Yes the real error is stack overflow, which is normally due to recursion
but in this case the ever growing list. Not sure how you would distinguish
that.
Also why is there a quote between loop and in?
On Fri, 18 Jan 2019 at 18:19, Ronaldo Persiano rcmpersiano@gmail.com
wrote:
I get:
ERROR: Recursion detected calling for loop '' in file echo.scad, line 1
from a recent build of master.
Well, that is a lot better than what I got with version 2018.01.06 (git
3473eb1) :
ERROR: Recursion detected calling for loop ''
although the recursion mention is misleading yet.
I need to update my OpenSCAD version...
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
On 18.01.19 16:34, Ronaldo Persiano wrote:
It is not easy to debug a recursive code when you get a recursion
error: there is no indication of which recursion is the culprit.
Are you on a release or on a development version?
The development version should output filename and line number.
A stack trace is in development:
https://github.com/openscad/openscad/pull/2645
(It works fine, so the question is not how to get it working, but to get
it cleanly implemented)
Things get worst when a non-recursive code generates a recursion error
message like that:
echo([for(b=0; b!=1; b=0) b]);
That is an infinite loop, I know, but couldn't we have a better error
message?
I will look into that once the trace PR has gone trough.
Having multiple PRs open in the same proximity has a tendency to create
merge conflicts and failing tests.
With kind regards,
Michael Frey
I have installed the last snapshot development version. Wow! I take my hat
off to the nice job done with the error messages! Now it is a lot easy to
debug codes.
I understand the stack overflow may be what fired the recursion message for
an infinite loop. I hope you find a way to distinguish the two cases.
On 18.01.19 16:34, Ronaldo Persiano wrote:
It is not easy to debug a recursive code when you get a recursion error:
there is no indication of which recursion is the culprit.
Are you on a release or on a development version?
The development version should output filename and line number.
A stack trace is in development:
https://github.com/openscad/openscad/pull/2645
(It works fine, so the question is not how to get it working, but to get
it cleanly implemented)
Things get worst when a non-recursive code generates a recursion error
message like that:
echo([for(b=0; b!=1; b=0) b]);
That is an infinite loop, I know, but couldn't we have a better error
message?
I will look into that once the trace PR has gone trough.
Having multiple PRs open in the same proximity has a tendency to create
merge conflicts and failing tests.
With kind regards,
Michael Frey
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org