RC dumps core

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

RC dumps core

adrianv
openscad -o out.echo test_hull.scad
AppRun.wrapped: src/value.cc:211: Value Value::clone() const: Assertion
`false && "unknown Value variant type"' failed.

Not sure how to debug this.  I'm also having a hard time figuring out what's
going on in general because the error messages have wrong line numbers (past
the end of the file).  




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

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

Re: RC dumps core

adrianv
It seems like adding an "echo" statement provokes this segfault.  Not sure if
that's significant.  I can get the code to fail without a segfault if I
remove echo statements.  


adrianv wrote

> openscad -o out.echo test_hull.scad
> AppRun.wrapped: src/value.cc:211: Value Value::clone() const: Assertion
> `false && "unknown Value variant type"' failed.
>
> Not sure how to debug this.  I'm also having a hard time figuring out
> what's
> going on in general because the error messages have wrong line numbers
> (past
> the end of the file).  
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





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

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

Re: RC dumps core

thehans
Did you mean to include an example script in your post because I'm not seeing anything?

On Sat, Dec 12, 2020 at 8:32 PM adrianv <[hidden email]> wrote:
It seems like adding an "echo" statement provokes this segfault.  Not sure if
that's significant.  I can get the code to fail without a segfault if I
remove echo statements. 


adrianv wrote
> openscad -o out.echo test_hull.scad
> AppRun.wrapped: src/value.cc:211: Value Value::clone() const: Assertion
> `false && "unknown Value variant type"' failed.
>
> Not sure how to debug this.  I'm also having a hard time figuring out
> what's
> going on in general because the error messages have wrong line numbers
> (past
> the end of the file). 
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





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

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

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

Re: RC dumps core

adrianv
All I can tell you at the moment is that the problem is caused by running the
hull function from BOSL2, which was why I was wondering about
troubleshooting strategies.  (The hull function doesn't always cause the
segfault, only sometimes.)

If I try to run the BOSL2 regression tests, specifically the file
tests/test_hull.scad, I get a segfault.  

Do I need to do a binary search on the code (comment out half, see if it
works, etc) to try to isolate the problem more?  There's no way to get any
information about what causes the problem since it just crashes.    


thehans wrote
> Did you mean to include an example script in your post because I'm not
> seeing anything?
>
> On Sat, Dec 12, 2020 at 8:32 PM adrianv &lt;

> avm4@

> &gt; wrote:
>
>> It seems like adding an "echo" statement provokes this segfault.  Not
>> sure
>> if
>> that's significant.  I can get the code to fail without a segfault if I
>> remove echo statements.
>>
>>
>> adrianv wrote
>> > openscad -o out.echo test_hull.scad
>> > AppRun.wrapped: src/value.cc:211: Value Value::clone() const: Assertion
>> > `false && "unknown Value variant type"' failed.
>> >
>> > Not sure how to debug this.  I'm also having a hard time figuring out
>> > what's
>> > going on in general because the error messages have wrong line numbers
>> > (past
>> > the end of the file).
>> >
>> >
>> >
>> >
>> > --
>> > Sent from: http://forum.openscad.org/
>> >
>> > _______________________________________________
>> > OpenSCAD mailing list
>>
>> > Discuss@.openscad
>>
>> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
>>
>>
>>
>>
>> --
>> Sent from: http://forum.openscad.org/
>>
>> _______________________________________________
>> OpenSCAD mailing list
>>

> Discuss@.openscad

>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





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

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

Re: RC dumps core

thehans
Normally for debugging, I would run the example on a debug build of OpenSCAD, under gdb, and get a full backtrace as a first step.
We don't distribute binaries with full debug info since they take up a few hundred extra MB of space, so you'd need to build from source yourself.


On Sun, Dec 13, 2020 at 7:58 AM adrianv <[hidden email]> wrote:
All I can tell you at the moment is that the problem is caused by running the
hull function from BOSL2, which was why I was wondering about
troubleshooting strategies.  (The hull function doesn't always cause the
segfault, only sometimes.)

If I try to run the BOSL2 regression tests, specifically the file
tests/test_hull.scad, I get a segfault. 

Do I need to do a binary search on the code (comment out half, see if it
works, etc) to try to isolate the problem more?  There's no way to get any
information about what causes the problem since it just crashes.   


thehans wrote
> Did you mean to include an example script in your post because I'm not
> seeing anything?
>
> On Sat, Dec 12, 2020 at 8:32 PM adrianv &lt;

> avm4@

> &gt; wrote:
>
>> It seems like adding an "echo" statement provokes this segfault.  Not
>> sure
>> if
>> that's significant.  I can get the code to fail without a segfault if I
>> remove echo statements.
>>
>>
>> adrianv wrote
>> > openscad -o out.echo test_hull.scad
>> > AppRun.wrapped: src/value.cc:211: Value Value::clone() const: Assertion
>> > `false && "unknown Value variant type"' failed.
>> >
>> > Not sure how to debug this.  I'm also having a hard time figuring out
>> > what's
>> > going on in general because the error messages have wrong line numbers
>> > (past
>> > the end of the file).
>> >
>> >
>> >
>> >
>> > --
>> > Sent from: http://forum.openscad.org/
>> >
>> > _______________________________________________
>> > OpenSCAD mailing list
>>
>> > Discuss@.openscad
>>
>> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
>>
>>
>>
>>
>> --
>> Sent from: http://forum.openscad.org/
>>
>> _______________________________________________
>> OpenSCAD mailing list
>>

> Discuss@.openscad

>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





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

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

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

Re: RC dumps core

thehans
Just a quick update.  After much head scratching and diagnostics, the cause was whittled down to a minimal test script, and the issue was logged in Github: https://github.com/openscad/openscad/issues/3541

A PR has already been created to fix this class of error.  With any luck the fix should be merged shortly and included in upcoming RC3.

Thanks for the report.


On Sun, Dec 13, 2020 at 8:46 AM Hans L <[hidden email]> wrote:
Normally for debugging, I would run the example on a debug build of OpenSCAD, under gdb, and get a full backtrace as a first step.
We don't distribute binaries with full debug info since they take up a few hundred extra MB of space, so you'd need to build from source yourself.


On Sun, Dec 13, 2020 at 7:58 AM adrianv <[hidden email]> wrote:
All I can tell you at the moment is that the problem is caused by running the
hull function from BOSL2, which was why I was wondering about
troubleshooting strategies.  (The hull function doesn't always cause the
segfault, only sometimes.)

If I try to run the BOSL2 regression tests, specifically the file
tests/test_hull.scad, I get a segfault. 

Do I need to do a binary search on the code (comment out half, see if it
works, etc) to try to isolate the problem more?  There's no way to get any
information about what causes the problem since it just crashes.   


thehans wrote
> Did you mean to include an example script in your post because I'm not
> seeing anything?
>
> On Sat, Dec 12, 2020 at 8:32 PM adrianv &lt;

> avm4@

> &gt; wrote:
>
>> It seems like adding an "echo" statement provokes this segfault.  Not
>> sure
>> if
>> that's significant.  I can get the code to fail without a segfault if I
>> remove echo statements.
>>
>>
>> adrianv wrote
>> > openscad -o out.echo test_hull.scad
>> > AppRun.wrapped: src/value.cc:211: Value Value::clone() const: Assertion
>> > `false && "unknown Value variant type"' failed.
>> >
>> > Not sure how to debug this.  I'm also having a hard time figuring out
>> > what's
>> > going on in general because the error messages have wrong line numbers
>> > (past
>> > the end of the file).
>> >
>> >
>> >
>> >
>> > --
>> > Sent from: http://forum.openscad.org/
>> >
>> > _______________________________________________
>> > OpenSCAD mailing list
>>
>> > Discuss@.openscad
>>
>> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
>>
>>
>>
>>
>> --
>> Sent from: http://forum.openscad.org/
>>
>> _______________________________________________
>> OpenSCAD mailing list
>>

> Discuss@.openscad

>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





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

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

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

Re: RC dumps core

adrianv
Thanks for the effort troubleshooting and reducing the problem.


thehans wrote
> Just a quick update.  After much head scratching and diagnostics, the
> cause
> was whittled down to a minimal test script, and the issue was logged in
> Github: https://github.com/openscad/openscad/issues/3541
>
> A PR has already been created to fix this class of error.  With any luck
> the fix should be merged shortly and included in upcoming RC3.
>
> Thanks for the report.





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

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