Crash with thickness tool

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
guillaumec
Posts: 3
Joined: Tue Mar 27, 2018 5:04 pm

Crash with thickness tool

Post by guillaumec »

Hello all,

Thanks a lot for this very nice software.

I am trying to use freecad for 3d printing shell parts, that I model first as volumes before applying a thickness operation on it.
Alas, I get a lot of errors and crashes with this, even with simple shapes. I attach an example of a shape that doesn't work.

If I try to apply the thickness operation on the top face of this solid, it doesn't do anything, and if I try to make the thickness inward, the program crashes.

It sometimes seems to work fine, but I cannot see what would make a given shape work or not.

Best regards,
Guillaume

OS: Ubuntu 17.10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13463 (Git)
Build type: None
Branch: master
Hash: a4714ce778ea3ccbae12230b835ccb835c4305d4
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
Screenshot from 2018-03-28 01-11-22.png
Screenshot from 2018-03-28 01-11-22.png (8.46 KiB) Viewed 1896 times
Attachments
test.fcstd
(30.61 KiB) Downloaded 56 times
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash with thickness tool

Post by chrisb »

That's strange: Part->Thickness applied to the body works, while PartDesign->Thickness does not.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Crash with thickness tool

Post by NormandC »

Hello Guillaume,

Welcome to the forum.

Same issue with OCCT 7.2.0, and like for chrisb, it works with Part Thickness.

I do not get a hard crash, but FreeCAD hangs; I haven't waited more than a couple of minutes before closing FreeCAD myself.

EDIT: PartDesign Thickness works if I select the bottom face (Face7)...

OS: Ubuntu 16.04.4 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13464 (Git)
Build type: Unknown
Branch: master
Hash: d4f835ab39beff5d434f23ed7533b0dcc326c8e0
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: French/Canada (fr_CA)
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Crash with thickness tool

Post by NormandC »

With this alternate method of constructing the shape, the PD Thickness succeeds with the top face selected, but only if thickness is set inward; the Intersection Join Type (which allows for sharp edges inside instead of filleted edges produced with Arc) does not work either.
Attachments
test_normandc1.fcstd
(86.59 KiB) Downloaded 56 times
guillaumec
Posts: 3
Joined: Tue Mar 27, 2018 5:04 pm

Re: Crash with thickness tool

Post by guillaumec »

Yes, I also find out that depending on how a shape is created, the thickness tool would work or not. If I had some idea of what cause the problem I could avoid dangerous constructions, but for now I end up trying anything until I get something that works, and it's a bit frustrating.
herrdeh
Posts: 431
Joined: Wed Sep 03, 2014 12:15 pm

Re: Crash with thickness tool

Post by herrdeh »

I've been suffering from crashes when applying thickness quite often. Need to deal with rounded plastic parts often, this seems to be difficult for Parts WB > thickness.

Just now I had a crash:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7fdb523ddf20]
#1  0x7fdb1039b3c4 in Geom2d_Curve::Value(double) const from /usr/lib/x86_64-linux-gnu/libTKG2d.so.7+0x14
#2  /usr/lib/x86_64-linux-gnu/libTKOffset.so.7(+0x11de47) [0x7fdaf87ebe47]
#3  /usr/lib/x86_64-linux-gnu/libTKOffset.so.7(+0x128272) [0x7fdaf87f6272]
#4  0x7fdaf87ff10f in BRepOffset_Tool::ExtentFace(TopoDS_Face const&, NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher>&, NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher>&, TopAbs_State, double, TopoDS_Face&) from /usr/lib/x86_64-linux-gnu/libTKOffset.so.7+0x154f
#5  0x7fdaf87a224a in BRepOffset_MakeOffset::ToContext(NCollection_DataMap<TopoDS_Shape, BRepOffset_Offset, TopTools_ShapeMapHasher>&) from /usr/lib/x86_64-linux-gnu/libTKOffset.so.7+0x52a
#6  0x7fdaf87a385f in BRepOffset_MakeOffset::BuildOffsetByArc() from /usr/lib/x86_64-linux-gnu/libTKOffset.so.7+0xc8f
#7  0x7fdaf87b3905 in BRepOffset_MakeOffset::MakeOffsetShape() from /usr/lib/x86_64-linux-gnu/libTKOffset.so.7+0xdb5
#8  0x7fdaf87b402c in BRepOffset_MakeOffset::MakeThickSolid() from /usr/lib/x86_64-linux-gnu/libTKOffset.so.7+0x2c
#9  0x7fdaf8744677 in BRepOffsetAPI_MakeThickSolid::MakeThickSolidByJoin(TopoDS_Shape const&, NCollection_List<TopoDS_Shape> const&, double, double, BRepOffset_Mode, bool, bool, GeomAbs_JoinType, bool) from /usr/lib/x86_64-linux-gnu/libTKOffset.so.7+0xc7
#10  0x7fdb2fce3679 in Part::TopoShape::makeThickSolid(NCollection_List<TopoDS_Shape> const&, double, double, bool, bool, short, short) const from /usr/lib/freecad-daily/lib/Part.so+0xa9
#11  0x7fdb2faf791a in Part::Thickness::execute() from /usr/lib/freecad-daily/lib/Part.so+0x56a
#12  0x7fdb549a0fb5 in App::DocumentObject::recompute() from /usr/lib/freecad-daily/lib/libFreeCADApp.so+0x155
#13  0x7fdb2fb0054b in Part::Feature::recompute() from /usr/lib/freecad-daily/lib/Part.so+0xb
#14  0x7fdb549552a4 in App::Document::_recomputeFeature(App::DocumentObject*) from /usr/lib/freecad-daily/lib/libFreeCADApp.so+0xb4
#15  0x7fdb5495cb0b in App::Document::recompute() from /usr/lib/freecad-daily/lib/libFreeCADApp.so+0x22b
#16  0x7fdb549d59b2 in App::DocumentPy::recompute(_object*) from /usr/lib/freecad-daily/lib/libFreeCADApp.so+0x42
#17  0x7fdb549d5b17 in App::DocumentPy::staticCallback_recompute(_object*, _object*) from /usr/lib/freecad-daily/lib/libFreeCADApp.so+0x37
#18  /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x8010) [0x7fdb53fc71d0]
#19  /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7d8) [0x7fdb540f7278]
#20  /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCode+0x19) [0x7fdb53fbf029]
#21  /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyRun_StringFlags+0x76) [0x7fdb54062546]
#22  0x7fdb54545896 in Base::InterpreterSingleton::runString[abi:cxx11](char const*) from /usr/lib/freecad-daily/lib/libFreeCADBase.so+0x66
#23  0x7fdb55140e83 in Gui::Command::doCommand(Gui::Command::DoCmd_Type, char const*, ...) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x123
#24  0x7fdb55141ab6 in Gui::Command::updateActive() from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x36
#25  0x7fdaf5ee4f08 in CmdPartThickness::activated(int) from /usr/lib/freecad-daily/lib/PartGui.so+0x308
#26  0x7fdb551462bb in Gui::Command::invoke(int) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x7b
#27  0x7fdb52ecff70 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x4d0
#28  0x7fdb533e1dc2 in QAction::triggered(bool) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x42
#29  0x7fdb533e3113 in QAction::activate(QAction::ActionEvent) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x83
#30  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x5a0fa3) [0x7fdb537c3fa3]
#31  0x7fdb537c40f4 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x74
#32  0x7fdb5388a0aa in QToolButton::mouseReleaseEvent(QMouseEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0xa
#33  0x7fdb5343e930 in QWidget::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x2a0
#34  0x7fdb533e803c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x8c
#35  0x7fdb533ef136 in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x476
#36  0x7fdb551197a8 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x88
#37  0x7fdb52ebb8ad in QCoreApplication::notifyInternal(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x8d
#38  0x7fdb533ee73d in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x14d
#39  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x249452) [0x7fdb5346c452]
#40  0x7fdb5346bce3 in QApplication::x11ProcessEvent(_XEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x16b3
#41  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x272592) [0x7fdb53495592]
#42  /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2e7) [0x7fdb4bc82387]
#43  /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4c5c0) [0x7fdb4bc825c0]
#44  /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7fdb4bc8264c]
#45  0x7fdb52eec20e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x7e
#46  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x272666) [0x7fdb53495666]
#47  0x7fdb52eba12f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x3f
#48  0x7fdb52eba495 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x1b5
#49  0x7fdb52ec0459 in QCoreApplication::exec() from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x99
#50  0x7fdb550a5c5a in Gui::Application::runApplication() from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x16ba
#51  freecad-daily(main+0x6db) [0x56119b4ec41b]
#52  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7fdb523c0b97]
#53  freecad-daily(_start+0x2a) [0x56119b4ed5ca]
Does it make sense to file a bug report - or is it likely to get the standard answer "geometry kernel" ?

Cheers,
Wolf

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15481 (Git)
Build type: Release
Branch: master
Hash: 763b5c362fe4b98dca858f86f5d1353075224651
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Attachments
test-crash-thickness.fcstd
(456.34 KiB) Downloaded 32 times
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Crash with thickness tool

Post by NormandC »

If you look at the log, as you guessed the error clearly comes from the OCC kernel. libTKOffset.so.7 is part of OCC.

The problem is, this should not make FreeCAD crash. But I don't know if it's possible for FreeCAD to catch the segmentation fault and prevent the crash. This problem is specific to Linux, on Windows it does not lead to a crash.
Post Reply