Freecad 0.19 daily crash on fillet

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
brjhaverkamp
Posts: 126
Joined: Thu Sep 24, 2015 3:14 pm

Freecad 0.19 daily crash on fillet

Post by brjhaverkamp »

Hello all,

I have been quiet on this forum. This means that freecad is working very well and stable on my side.
But this morning I ran into an unexpected hickup while trying to create a new handle for my moka,
In the attached model, when I increase the radius of my fillet from 2 to 3 mm, Freecad crashes completely.
I think I can see why the fillet would fail above 2.5 mm, but a crash is a bit exagerated:-)
Can someone please have a check why the fillet doesn't fail gracefully?

OS: Ubuntu 19.10 (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: be47670c6a3c2dc054039bf7a83def6b77dfbece
Python version: 3.7.5
Qt version: 5.12.4
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
Attachments
handle.FCStd
(109.4 KiB) Downloaded 42 times
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Freecad 0.19 daily crash on fillet

Post by kisolre »

Because Ubuntu :) Sorry but there were multiple times where an OCCT crash will crash the whole FreeCAD under Linux and at the same time Windows version handles that without an app crash. Maybe it is handled on per case basis and checks are added when and where it happens?

You dont need those construction lines. Length from point to straight edge works the same. Create the first pad symmetric and instead of referencing edges from the solid you could reference edge from the sketch. And dont map sketches to faces if that can be avoided.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Freecad 0.19 daily crash on fillet

Post by vocx »

brjhaverkamp wrote: Sun May 03, 2020 5:49 am ...
I think I can see why the fillet would fail above 2.5 mm, but a crash is a bit exagerated:-)
...

Code: Select all

Thread 1 "FreeCAD" received signal SIGSEGV, Segmentation fault.
0x00007fffc2ee80ca in BRep_Tool::Curve(TopoDS_Edge const&, TopLoc_Location&, double&, double&) ()
   from /usr/lib/x86_64-linux-gnu/libTKBRep.so.7
(gdb) bt
#0  0x00007fffc2ee80ca in BRep_Tool::Curve(TopoDS_Edge const&, TopLoc_Location&, double&, double&) ()
    at /usr/lib/x86_64-linux-gnu/libTKBRep.so.7
#1  0x00007fffc2eeb556 in BRep_Tool::Curve(TopoDS_Edge const&, double&, double&) () at /usr/lib/x86_64-linux-gnu/libTKBRep.so.7
#2  0x00007fffc5e2bef5 in ChFi3d_Builder::PerformIntersectionAtEnd(int) () at /usr/lib/x86_64-linux-gnu/libTKFillet.so.7
#3  0x00007fffc5e34307 in ChFi3d_Builder::PerformOneCorner(int, bool) () at /usr/lib/x86_64-linux-gnu/libTKFillet.so.7
#4  0x00007fffc5dd2218 in ChFi3d_Builder::PerformFilletOnVertex(int) () at /usr/lib/x86_64-linux-gnu/libTKFillet.so.7
#5  0x00007fffc5dd31d1 in ChFi3d_Builder::Compute() () at /usr/lib/x86_64-linux-gnu/libTKFillet.so.7
#6  0x00007fffc5f8b283 in BRepFilletAPI_MakeFillet::Build() () at /usr/lib/x86_64-linux-gnu/libTKFillet.so.7
#7  0x00007fff69d743da in PartDesign::Fillet::execute() (this=0x55555b741be0)
    at /opt/freecad-source-vocx/src/Mod/PartDesign/App/FeatureFillet.cpp:100
#8  0x00007ffff53a7961 in App::DocumentObject::recompute() (this=0x55555b741be0)
    at /opt/freecad-source-vocx/src/App/DocumentObject.cpp:111
#9  0x00007fffc65a6de3 in Part::Feature::recompute() (this=0x55555b741be0)
    at /opt/freecad-source-vocx/src/Mod/Part/App/PartFeature.cpp:100
#10 0x00007ffff52b50f8 in App::Document::_recomputeFeature(App::DocumentObject*) (this=0x5555575aab90, Feat=0x55555b741be0)
    at /opt/freecad-source-vocx/src/App/Document.cpp:3675
#11 0x00007ffff52b5df5 in App::Document::recomputeFeature(App::DocumentObject*, bool) (this=0x5555575aab90, Feat=0x55555b741be0, recursive=false) at /opt/freecad-source-vocx/src/App/Document.cpp:3733
#12 0x00007fff68d5e449 in PartDesignGui::TaskFilletParameters::onLengthChanged(double) (this=
    0x55555bf12710, len=2.6000000000000001) at /opt/freecad-source-vocx/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp:205
#13 0x00007fff68d5e8f1 in PartDesignGui::TaskFilletParameters::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x55555bf12710, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffffffbf40)
    at /opt/freecad-build-debug-vocx/src/Mod/PartDesign/Gui/moc_TaskFilletParameters.cpp:75
---Type <return> to continue, or q <return> to quit---
#14 0x00007ffff29e7555 in QMetaObject::activate(QObject*, int, int, void**) (sender=0x55555bd28ee0, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3767
#15 0x00007ffff708f937 in Gui::QuantitySpinBox::valueChanged(double) (this=0x55555bd28ee0, _t1=2.6000000000000001)
    at /opt/freecad-build-debug-vocx/src/Gui/moc_QuantitySpinBox.cpp:294
#16 0x00007ffff708d0bc in Gui::QuantitySpinBox::userInput(QString const&) (this=0x55555bd28ee0, text=...)
    at /opt/freecad-source-vocx/src/Gui/QuantitySpinBox.cpp:576
#17 0x00007ffff708f0ff in Gui::QuantitySpinBox::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x55555bd28ee0, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fffffffc1d0)
    at /opt/freecad-build-debug-vocx/src/Gui/moc_QuantitySpinBox.cpp:138
#18 0x00007ffff29e7555 in QMetaObject::activate(QObject*, int, int, void**) (sender=0x55555c1727c0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffffffc1d0) at kernel/qobject.cpp:3767
#19 0x00007ffff29e7c27 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=<optimized out>, m=m@entry=0x7ffff3e05080 <QLineEdit::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffffffc1d0)
    at kernel/qobject.cpp:3629
#20 0x00007ffff3877cf2 in QLineEdit::textChanged(QString const&) (this=<optimized out>, _t1=...) at .moc/moc_qlineedit.cpp:430
#21 0x00007ffff387e129 in QLineEdit::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x55555c1727c0, _c=<optimized out>, _id=<optimized out>, _a=0x7fffffffc360) at .moc/moc_qlineedit.cpp:250
According to Qt Creator, it seems to stop around here in PartDesign/App/FeatureFillet.cpp

Code: Select all

        mkFillet.Build();
        if (!mkFillet.IsDone())
            return new App::DocumentObjectExecReturn("Failed to create fillet");
Stack from Qt Creator.

Code: Select all

1   BRep_Tool::Curve(TopoDS_Edge const&, TopLoc_Location&, double&, double&)                                   0x7fffc2ee80ca 
2   BRep_Tool::Curve(TopoDS_Edge const&, double&, double&)                                                     0x7fffc2eeb556 
3   ChFi3d_Builder::PerformIntersectionAtEnd(int)                                                              0x7fffc5e2bef5 
4   ChFi3d_Builder::PerformOneCorner(int, bool)                                                                0x7fffc5e34307 
5   ChFi3d_Builder::PerformFilletOnVertex(int)                                                                 0x7fffc5dd2218 
6   ChFi3d_Builder::Compute()                                                                                  0x7fffc5dd31d1 
7   BRepFilletAPI_MakeFillet::Build()                                                                          0x7fffc5f8b283 
8   PartDesign::Fillet::execute                                              FeatureFillet.cpp            100  0x7fff6b5773da 
9   App::DocumentObject::recompute                                           DocumentObject.cpp           111  0x7ffff53a7961 
10  Part::Feature::recompute                                                 PartFeature.cpp              100  0x7fffc65a6de3 
11  App::Document::_recomputeFeature                                         Document.cpp                 3675 0x7ffff52b50f8 
12  App::Document::recomputeFeature                                          Document.cpp                 3733 0x7ffff52b5df5 
13  PartDesignGui::TaskFilletParameters::onLengthChanged                     TaskFilletParameters.cpp     205  0x7fff6a561449 
14  PartDesignGui::TaskFilletParameters::qt_static_metacall                  moc_TaskFilletParameters.cpp 75   0x7fff6a5618f1 
15  QMetaObject::activate                                                    qobject.cpp                  3767 0x7ffff29e7555 
16  Gui::QuantitySpinBox::valueChanged                                       moc_QuantitySpinBox.cpp      294  0x7ffff708f937 
17  Gui::QuantitySpinBox::userInput                                          QuantitySpinBox.cpp          576  0x7ffff708d0bc 
18  Gui::QuantitySpinBox::qt_static_metacall                                 moc_QuantitySpinBox.cpp      138  0x7ffff708f0ff 
19  QMetaObject::activate                                                    qobject.cpp                  3767 0x7ffff29e7555 
20  QMetaObject::activate                                                    qobject.cpp                  3629 0x7ffff29e7c27 
... <More>                                                                                                                    
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
brjhaverkamp
Posts: 126
Joined: Thu Sep 24, 2015 3:14 pm

Re: Freecad 0.19 daily crash on fillet

Post by brjhaverkamp »

kisolre wrote: Sun May 03, 2020 6:29 am Because Ubuntu :) Sorry but there were multiple times where an OCCT crash will crash the whole FreeCAD under Linux and at the same time Windows version handles that without an app crash. Maybe it is handled on per case basis and checks are added when and where it happens?
Thx for the clarification. I hope this example helps handling at least one case in that case.
You dont need those construction lines. Length from point to straight edge works the same. Create the first pad symmetric and instead of referencing edges from the solid you could reference edge from the sketch. And dont map sketches to faces if that can be avoided.
Thanks for the pointers. I didn't know the point to straight edge! Will use it more often now:-)
I did hear about don't map sketches to faces. And I know the danger of loosing linked edges. But I still haven't gotten used to putting shape binders in.
And for such simple models, it isn't too bad:-) (And so bloody convenient! But still am waiting (im) patiently for topological naming.

Regards,

Bert
Post Reply