-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault on rendering #2847
Comments
The polyhedron is invalid (some faces are pointing in the wrong direction - see this FAQ entry). It should never crash OpenSCAD though. |
I can reproduce on macOS using CGAL 4.11. It works (reports error instead of crashing) with CGAL 4.8.1. This was tested using old dev snapshots of OpenSCAD, so there's theoretically a possibility that we have code changes influencing this, but the stack trace points quite strongly to an uncaught (uncatchable?) issue inside CGAL. |
I suspect this to be the culprit: Someone commented out an assertion check in CGAL: |
If someone can organize an upstream bug report that would be awesome |
I found that this code
crashes 2019.01-RC3 under Windows when I attempt to render. The first face of the polyhedron is backwards. If I fix that it doesn't crash any more. Is this the same bug? |
Did anyone 'organize an upstream bug report'? |
I have now ^^^
|
Well, that didn't quite go as planned. Already closed and completely ignored the issue of commented-out assertion which I described as carefully as I could. They did mention possibly calling orient_polygon_soup() which maybe we can use to auto-fix some bad inputs like this. Still would be nice to have catchable exceptions over crashes. I might try replying later when I've cooled off... not happy about how that was handled. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Please keep comments on-topic to the original test cases. Its getting very hard to keep track of these mixed up issues. The OP's case doesn't crash on 4.7 (nor 4.8 according to kintel), and it does crash on 4.11, regardless if built from 2019.05 tag or latest master. |
For completeness, 2019.11.24.nightly on Debian has: With the OP scad it gets
With adrianVmariano's it doesn't get an error and renders something like a 3 point star. |
I realized there were already some checks for whether a mesh is closed, and valid, but they were only used in debug messages. There is still some room for improvement, but at least I think this will avoid segfaults.
|
Fixed via #3526. |
openscad 2019.02.07, libcgal13 4.13-1+b2 (using the Debian repositories mentioned in http://www.openscad.org/downloads.html).
Running on the following file (which is a stupid model, granted) reliably produces a segfault when rendering, either in the GUI or in command-line via
openscad bug.txt -o bug.stl
.bug.txt
Since the model is correctly previewed, might this be a CGAL bug instead?
The text was updated successfully, but these errors were encountered: