I recently tried doing some development with a nightly build,
2025.02.25.snap,
and have been running into a significant annoyance that when there is an
error, sometimes the backtrace omits the specific line where the error
actually occurred.
For example, in the dev version I got this:
ERROR: Assertion 'is_2d_transform(transform)' failed: "Transforms is 3D and
acts on Z, but points are 2D" in file libraries/BOSL2/transforms.scad, line
1569
TRACE: called by '_apply' in file libraries/BOSL2/transforms.scad, line 1549
TRACE: called by 'path_sweep' in file libraries/BOSL2/skin.scad, line 1943
TRACE: assignment to "trans_scale" in file libraries/BOSL2/skin.scad, line
1943
TRACE: called by 'path_sweep' in file ttest1.scad, line 20
But the error was not on any listed line. To find the error I ran the
stable version which gave me this:
ERROR: Assertion 'is_2d_transform(transform)' failed: "Transforms is 3D and
acts on Z, but points are 2D" in file libraries/BOSL2/transforms.scad, line
1569
TRACE: called by '_apply' in file libraries/BOSL2/transforms.scad, line 1549
TRACE: called by 'apply' in file libraries/BOSL2/skin.scad, line 2151
TRACE: called by 'path_sweep' in file libraries/BOSL2/skin.scad, line 1943
TRACE: called by 'path_sweep' in file ttest1.scad, line 20
And yep, line 2151 was the problem. So what's going on here?
It’s possible you found a bug :)
The typical way forward would be to try to isolate the different behavior as a minimal test case, then bisect or read code to figure out when and why this changed.
This is best handled as a GitHub issue, unless someone here already knows what’s up :)
-Marius
On Apr 14, 2025, at 17:00, Adrian Mariano via Discuss discuss@lists.openscad.org wrote:
I recently tried doing some development with a nightly build,2025.02.25.snap,
and have been running into a significant annoyance that when there is an error, sometimes the backtrace omits the specific line where the error actually occurred.
For example, in the dev version I got this:
ERROR: Assertion 'is_2d_transform(transform)' failed: "Transforms is 3D and acts on Z, but points are 2D" in file libraries/BOSL2/transforms.scad, line 1569 <>
TRACE: called by '_apply' in file libraries/BOSL2/transforms.scad, line 1549 <>
TRACE: called by 'path_sweep' in file libraries/BOSL2/skin.scad, line 1943 <>
TRACE: assignment to "trans_scale" in file libraries/BOSL2/skin.scad, line 1943 <>
TRACE: called by 'path_sweep' in file ttest1.scad, line 20 <>
But the error was not on any listed line. To find the error I ran the stable version which gave me this:
ERROR: Assertion 'is_2d_transform(transform)' failed: "Transforms is 3D and acts on Z, but points are 2D" in file libraries/BOSL2/transforms.scad, line 1569 <>
TRACE: called by '_apply' in file libraries/BOSL2/transforms.scad, line 1549 <>
TRACE: called by 'apply' in file libraries/BOSL2/skin.scad, line 2151 <>
TRACE: called by 'path_sweep' in file libraries/BOSL2/skin.scad, line 1943 <>
TRACE: called by 'path_sweep' in file ttest1.scad, line 20 <>
And yep, line 2151 was the problem. So what's going on here?
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
It's not exactly obvious how to go about constructing a minimal test case
for behavior like this that is arising in a huge code base...so I was
hoping not to need to do that. At the moment I don't have a test case at
all...unless I start randomly introducing errors in my code to try to
produce it again.
On Mon, Apr 14, 2025 at 5:48 PM Marius Kintel marius@kintel.net wrote:
It’s possible you found a bug :)
The typical way forward would be to try to isolate the different behavior
as a minimal test case, then bisect or read code to figure out when and why
this changed.
This is best handled as a GitHub issue, unless someone here already knows
what’s up :)
-Marius
On Apr 14, 2025, at 17:00, Adrian Mariano via Discuss <
discuss@lists.openscad.org> wrote:
I recently tried doing some development with a nightly build,
2025.02.25.snap,
and have been running into a significant annoyance that when there is an
error, sometimes the backtrace omits the specific line where the error
actually occurred.
For example, in the dev version I got this:
ERROR: Assertion 'is_2d_transform(transform)' failed: "Transforms is 3D
and acts on Z, but points are 2D" in file libraries/BOSL2/transforms.scad,
line 1569
TRACE: called by '_apply' in file libraries/BOSL2/transforms.scad, line
1549
TRACE: called by 'path_sweep' in file libraries/BOSL2/skin.scad, line 1943
TRACE: assignment to "trans_scale" in file libraries/BOSL2/skin.scad, line
1943
TRACE: called by 'path_sweep' in file ttest1.scad, line 20
But the error was not on any listed line. To find the error I ran the
stable version which gave me this:
ERROR: Assertion 'is_2d_transform(transform)' failed: "Transforms is 3D
and acts on Z, but points are 2D" in file libraries/BOSL2/transforms.scad,
line 1569
TRACE: called by '_apply' in file libraries/BOSL2/transforms.scad, line
1549
TRACE: called by 'apply' in file libraries/BOSL2/skin.scad, line 2151
TRACE: called by 'path_sweep' in file libraries/BOSL2/skin.scad, line 1943
TRACE: called by 'path_sweep' in file ttest1.scad, line 20
And yep, line 2151 was the problem. So what's going on here?
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Using the "git bisect" method doesn't require constructing a minimal
example. It only requires that you can build OpenSCAD for a specific git
SHA, and you can repeatedly run the failure case with results that are
stable and pass/fail. It could be automated, but when I do it, I check
out and build OpenSCAD from scratch for each bisect iteration, and just
kind of baby the process along in the background as time permits. I'd
might be able to do it for you if given a .tar of the complete sources
and a reliable method to check for failure.
Regards,
Curt
On 4/14/2025 3:04 PM, Adrian Mariano via Discuss wrote:
It's not exactly obvious how to go about constructing a minimal test
case for behavior like this that is arising in a huge code base...so I
was hoping not to need to do that. At the moment I don't have a test
case at all...unless I start randomly introducing errors in my code to
try to produce it again.
On Mon, Apr 14, 2025 at 5:48 PM Marius Kintel marius@kintel.net wrote:
It’s possible you found a bug :)
The typical way forward would be to try to isolate the different
behavior as a minimal test case, then bisect or read code to
figure out when and why this changed.
This is best handled as a GitHub issue, unless someone here
already knows what’s up :)
-Marius
On Apr 14, 2025, at 17:00, Adrian Mariano via Discuss
<discuss@lists.openscad.org> wrote:
I recently tried doing some development with a nightly
build,2025.02.25.snap,
and have been running into a significant annoyance that when
there is an error, sometimes the backtrace omits the specific
line where the error actually occurred. *
*
*
*
For example, in the dev version I got this:
*
*
ERROR: Assertion 'is_2d_transform(transform)' failed: "Transforms
is 3D and acts on Z, but points are 2D" in file
libraries/BOSL2/transforms.scad, line 1569
TRACE: called by '_apply' in file
libraries/BOSL2/transforms.scad, line 1549
TRACE: called by 'path_sweep' in file libraries/BOSL2/skin.scad,
line 1943
TRACE: assignment to "trans_scale" in file
libraries/BOSL2/skin.scad, line 1943
TRACE: called by 'path_sweep' in file ttest1.scad, line 20
But the error was not on any listed line. To find the error I ran
the stable version which gave me this:
ERROR: Assertion 'is_2d_transform(transform)' failed: "Transforms
is 3D and acts on Z, but points are 2D" in file
libraries/BOSL2/transforms.scad, line 1569
TRACE: called by '_apply' in file
libraries/BOSL2/transforms.scad, line 1549
TRACE: called by 'apply' in file libraries/BOSL2/skin.scad, line
2151
TRACE: called by 'path_sweep' in file libraries/BOSL2/skin.scad,
line 1943
TRACE: called by 'path_sweep' in file ttest1.scad, line 20
And yep, line 2151 was the problem. So what's going on here?
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org