-
-
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
Re fix for issue #53. Two problems #148
Comments
i confirm here that 2011.12 works and 2012.7.15 doesnt. backtrace from linux crash [New Thread 0xb08a2b40 (LWP 22316)] Program received signal SIGABRT, Aborted. which is right here at the 'transform' line
289> N.p3->transform(t); |
crash also happens on master branch from date 2012-03-10 crash also happens on 'cgalpngtest' from the testsuite. crash also happens on 64 bit AMD/intel and 32 bit x86 linux crash also on 64 bit PPC linux git checkout from 2012 02 20 - crashes 2012-2-19 HEAD from c5703b4 ---- crash |
I can confirm that the text doesn't show on master. |
ok first problem i see.... apparently N.dim3 being true does not always guarantee that N.p3 will be OK. i inserted some printfs into CGAL_Nef_Polyhedron::copy and its clearly showing that both p2 and p3 are 0 while 'dim' still says '3' interesting that they become 0 after this message from OpenSCAD: Warning: Scaling a 3D object with 0 - removing object |
by removing this single line, the bug disappears. from CGALEvaluator.cc:
change to
the crash is no longer there. however the output is now kind of garbled, the letters dont appear properly. |
A better fix would be to set N.dim = 0; after the reset() - for both the 2D and 3D case. |
isolated a little bit. minimal example: scale([8,8,0]) where circle.dxf is from openscad/testdata/dxf/circle.dxf the last version that works can be built by this: git checkout 955e0f1 In CGALEvaluator.cc, comparison of the node->matrix.toString() right before the 3d transformation involved gives this: old openscad (works): multmatrix([[8, 0, 0, 0], [0, 8, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) the determinant() of old openscad matrix is 64. and it has no 'reset()' for the Nef Polyhedron. the determinant() of new openscad matrix is 0, so the Nef_Polyhedron does get reset(), and we have the stuff we have discussed above (dim==3, etc). Curiouser and curiouser. |
from what i can tell, old openscad was taking 'scale 8,8,0' and making it into 'scale 8,8,1'. happens in transform.cc this was changed in patch c5703b4 to maintain backwards compatability, it seems like new openscad would have to do the same thing, altering 'scale()' input so that zeroes become ones. but if you just want to fix printrbot.scad, you can do this sed -i s/"scale_y,0"/"scale_y,1"/g printrbot.scad this will make printrbot work fine in the new openscad (without patching) i am submitting a small patch that will prevent openscad from crashing when '0' is given to scale .. . but i will have to leave the backwards compatability issue for others to discuss |
Thanks Don, did that and it no longer crashes. I did not another issue though, Compile does not show the RoundedCornersCube (just a cube) or the two holes, only after rendering do you see it, unlike the old version. I will raise another issue. ps I presume I should not close this issue? |
so since several people have said 'scale 0' should throw a warning, but produce no output, i will close this... and consider the new issue to be #166 , the lack of proper warning. |
After testing the fix for issue 53, OpenSCAD 2012.17.15 has two reproducible issues - so far.
A .scad based on Thingiverse Thing 14728, with minor modification - different number. (just confirmed it happens with the vanilla Thing)
With version 2011.12.30 when Compiled it correctly shows the text on the badge.
With 2012.17.15 the text does not display - just the badge, then when Rendering it gets:
MS V C++ Runtime Library Dialog Box;
Assertion failed!
Program: .../openscad.exe
File: /home/dond/mxe/usr/lib/gcc/i686-pc.../shared_ptr.hpp
Line: 424
Expression: px != 0
For infomation blah blah
Abort/Retry/Ignore
Retry & Ignore then crashes OpenSCAD.
There was also one case of a crash when loading this Thing & Auto compiling, detailed in Issue #53, so far only a single instance, it was after editing a number of other files.
The text was updated successfully, but these errors were encountered: