-
Notifications
You must be signed in to change notification settings - Fork 29
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
tests/test_assembly.py::test_colors_assy0[chassis0_assy-expected0] Fatal Python error: Segmentation fault #149
Comments
Would you be able to step through the failing test in python share the object (as |
I don't understand what you're asking me to provide. There're more than two segfaulting tests, as i'm commenting them out. Is your request about |
So the idea was that you debug (in pdb) the first segfaulting test and share the problematic shape as a |
It's compiled by a Gentoo ebuild. Will try with pdb in a while. |
I failed to export brep, but produced a minimal segfault reproducer:
|
That does not look too weird. I assume that Looking at your cmake flags, |
On Fri, May 17, 2024 at 10:38:20AM GMT, AU wrote:
That does not look too weird. I assume that `cq.Workplane("YZ").circle(r_wheel).extrude(w_wheel, both=True, clean=False)` does not segfault, right?
Yes, this doesn't segfault.
…--
() ascii ribbon campaign - against html mail
/\ http://arc.pasp.de/ - against proprietary attachments
|
No effect. |
OK, could you then check with a debug build of OCCT and share the coredump? |
On Fri, May 17, 2024 at 11:26:42AM GMT, AU wrote:
OK, could you then check with a debug build of OCCT and share the coredump?
I have the coredump. I doubt it would be of any use without the accompanying symbols tho, and i'm not sure how to provide them nicely.
The backtrace and a little more info when compiled with -Og -ggdb3:
```
(gdb) bt
#0 TopoDS_TShape::setFlag (theIsOn=false, theFlag=TopoDS_TShape::TopoDS_TShape_Flags_Free, this=0x0) at /var/tmp/portage/sci-libs/opencascade-7.7.2-r1/work/OCCT-7_7_2/src/TopoDS/TopoDS_TShape.hxx:170
#1 TopoDS_TShape::Free (theIsFree=false, this=0x0) at /var/tmp/portage/sci-libs/opencascade-7.7.2-r1/work/OCCT-7_7_2/src/TopoDS/TopoDS_TShape.hxx:64
#2 TopoDS_Builder::Add ***@***.***=0x7ffd23863063, aShape=..., aComponent=...) at /var/tmp/portage/sci-libs/opencascade-7.7.2-r1/work/OCCT-7_7_2/src/TopoDS/TopoDS_Builder.cxx:49
#3 0x00007f6f811b9c34 in ShapeUpgrade_UnifySameDomain::IntUnifyFaces ***@***.***=0x564f88339690, theInpShape=..., theGMapEdgeFaces=..., theGMapFaceShells=..., theFreeBoundMap=...)
at /var/tmp/portage/sci-libs/opencascade-7.7.2-r1/work/OCCT-7_7_2/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx:3613
#4 0x00007f6f811bb4b0 in ShapeUpgrade_UnifySameDomain::UnifyFaces ***@***.***=0x564f88339690) at /var/tmp/portage/sci-libs/opencascade-7.7.2-r1/work/OCCT-7_7_2/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx:2807
#5 0x00007f6f811bb7da in ShapeUpgrade_UnifySameDomain::Build (this=0x564f88339690) at /var/tmp/portage/sci-libs/opencascade-7.7.2-r1/work/OCCT-7_7_2/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx:3900
#6 0x00007f6f897d09b7 in pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, ShapeUpgrade_UnifySameDomain, , pybind11::name, pybind11::is_method, pybind11::sibling, char [53]>(void (ShapeUpgrade_UnifySameDomain::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&, char const (&) [53])::{lambda(ShapeUpgrade_UnifySameDomain*)#1}, void, ShapeUpgrade_UnifySameDomain*, pybind11::name, pybind11::is_method, pybind11::sibling, char [53]>(pybind11::cpp_function::initialize<void, ShapeUpgrade_UnifySameDomain, , pybind11::name, pybind11::is_method, pybind11::sibling, char [53]>(void (ShapeUpgrade_UnifySameDomain::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&, char const (&) [53])::{lambda(ShapeUpgrade_UnifySameDomain*)#1}&&, void (*)(ShapeUpgrade_UnifySameDomain*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&, char const (&) [53])::{lambda(pybind11::detail::function_call&)#1}::_FUN(pybind11::detail::function_call&) () from /usr/lib/python3.11/site-packages/OCP.cpython-311-x86_64-linux-gnu.so
#7 0x00007f6f84a27da3 in pybind11::cpp_function::dispatcher(_object*, _object*, _object*) () from /usr/lib/python3.11/site-packages/OCP.cpython-311-x86_64-linux-gnu.so
#8 0x00007f6f8f9175d3 in cfunction_call () from /usr/lib64/libpython3.11.so.1.0
#9 0x00007f6f8f8d34ff in _PyObject_MakeTpCall () from /usr/lib64/libpython3.11.so.1.0
#10 0x00007f6f8f8864e3 in _PyEval_EvalFrameDefault () from /usr/lib64/libpython3.11.so.1.0
#11 0x00007f6f8f9afbf0 in _PyEval_Vector () from /usr/lib64/libpython3.11.so.1.0
#12 0x00007f6f8f9afcb1 in PyEval_EvalCode () from /usr/lib64/libpython3.11.so.1.0
#13 0x00007f6f8f9f1653 in run_eval_code_obj () from /usr/lib64/libpython3.11.so.1.0
#14 0x00007f6f8f9f1876 in run_mod () from /usr/lib64/libpython3.11.so.1.0
#15 0x00007f6f8f9f1950 in pyrun_file () from /usr/lib64/libpython3.11.so.1.0
#16 0x00007f6f8f9f438d in _PyRun_SimpleFileObject () from /usr/lib64/libpython3.11.so.1.0
#17 0x00007f6f8f9f48f4 in _PyRun_AnyFileObject () from /usr/lib64/libpython3.11.so.1.0
#18 0x00007f6f8fa121f0 in Py_RunMain () from /usr/lib64/libpython3.11.so.1.0
#19 0x00007f6f8fa1272b in Py_BytesMain () from /usr/lib64/libpython3.11.so.1.0
#20 0x00007f6f8f65f2e0 in __libc_start_call_main () from /lib64/libc.so.6
#21 0x00007f6f8f65f399 in __libc_start_main () from /lib64/libc.so.6
#22 0x0000564f81293095 in _start ()
(gdb) down
Bottom (innermost) frame selected; you cannot go down.
(gdb) up
#1 TopoDS_TShape::Free (theIsFree=false, this=0x0) at /var/tmp/portage/sci-libs/opencascade-7.7.2-r1/work/OCCT-7_7_2/src/TopoDS/TopoDS_TShape.hxx:64
64 void Free (Standard_Boolean theIsFree) { setFlag (TopoDS_TShape_Flags_Free, theIsFree); }
(gdb) down
#0 TopoDS_TShape::setFlag (theIsOn=false, theFlag=TopoDS_TShape::TopoDS_TShape_Flags_Free, this=0x0) at /var/tmp/portage/sci-libs/opencascade-7.7.2-r1/work/OCCT-7_7_2/src/TopoDS/TopoDS_TShape.hxx:170
170 else myFlags &= ~(Standard_Integer )theFlag;
(gdb) up
#1 TopoDS_TShape::Free (theIsFree=false, this=0x0) at /var/tmp/portage/sci-libs/opencascade-7.7.2-r1/work/OCCT-7_7_2/src/TopoDS/TopoDS_TShape.hxx:64
64 void Free (Standard_Boolean theIsFree) { setFlag (TopoDS_TShape_Flags_Free, theIsFree); }
(gdb) up
#2 TopoDS_Builder::Add ***@***.***=0x7ffd23863063, aShape=..., aComponent=...) at /var/tmp/portage/sci-libs/opencascade-7.7.2-r1/work/OCCT-7_7_2/src/TopoDS/TopoDS_Builder.cxx:49
49 aComponent.TShape()->Free(Standard_False);
(gdb) p aComponent
$1 = (const TopoDS_Shape &) @0x7ffd238631f0: {myTShape = {entity = 0x0}, myLocation = {myItems = {myNode = {entity = 0x0}}}, myOrient = TopAbs_EXTERNAL}
(gdb) up
#3 0x00007f6f811b9c34 in ShapeUpgrade_UnifySameDomain::IntUnifyFaces ***@***.***=0x564f88339690, theInpShape=..., theGMapEdgeFaces=..., theGMapFaceShells=..., theFreeBoundMap=...)
at /var/tmp/portage/sci-libs/opencascade-7.7.2-r1/work/OCCT-7_7_2/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx:3613
3613 BB.Add(aNewWire, CurEdge);
(gdb) p aNewWire
$2 = {<TopoDS_Shape> = {myTShape = {entity = 0x564f88489250}, myLocation = {myItems = {myNode = {entity = 0x0}}}, myOrient = TopAbs_FORWARD}, <No data fields>}
(gdb) p CurEdge
$3 = {<TopoDS_Shape> = {myTShape = {entity = 0x0}, myLocation = {myItems = {myNode = {entity = 0x0}}}, myOrient = TopAbs_EXTERNAL}, <No data fields>}
(gdb) up
#4 0x00007f6f811bb4b0 in ShapeUpgrade_UnifySameDomain::UnifyFaces ***@***.***=0x564f88339690) at /var/tmp/portage/sci-libs/opencascade-7.7.2-r1/work/OCCT-7_7_2/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx:2807
2807 IntUnifyFaces(exps.Current(), aGMapEdgeFaces, aGMapFaceShells, aFreeBoundMap);
```
…--
() ascii ribbon campaign - against html mail
/\ http://arc.pasp.de/ - against proprietary attachments
|
AFAICT |
For any future travelers: this was fixed for me by applying the blobfish patch. For some reason the new set of patches does not seem to fix it. |
Indeed, this patch fixes the segfaults for me, thank you for your nicely-documented investigation (erooke/ocp.nix#2)! |
I'm packaging CadQuery for Gentoo. I've built OCP with the pre-generated "ubuntu" bindings sources as suggested in #132 (comment)
CadQuery master pytest segfaults in (through?) OCP:
gdb on the core dump says:
How do i address this?
The text was updated successfully, but these errors were encountered: