Crash on recomputing faulty fillet

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!
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Crash on recomputing faulty fillet

Post by chrisb »

Recomputing the attached file causes a crash. It is not with all faulty fillets, e.g. if I remove one of the previous pockets the fillet is still faulty, but recompute doesn't crash.

Some notes about the model:
- Tip was set to the second feature
- The state of the model was created by editing the first sketch and saving before closing. Thus no recompute was performed.

Steps to reproduce:
- Load the attached file crash.fcstd
- click recompute
-> FreeCAD crashes

OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22474 (Git)
Build type: Release
Branch: master
Hash: a44f8ffd427fa9b23b1f00dbf62d66cd152cd774
Python version: 3.8.5
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
Attachments
crash.fcstd
(133.27 KiB) Downloaded 37 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: Crash on recomputing faulty fillet

Post by Syres »

Confirmed using:

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22474 (Git)
Build type: Release
Branch: master
Hash: a44f8ffd427fa9b23b1f00dbf62d66cd152cd774
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)

Report View output:

Code: Select all

10:44:41  Sketcher::setUpSketch()-T:0
10:44:41  Sketcher::Solve()-DogLeg-T:0
10:44:41  Sketcher::setUpSketch()-T:0
10:44:41  Sketcher::Solve()-DogLeg-T:0
10:44:41  Illegal storage access...
10:44:41  <Exception> Illegal storage access! Please save your work under a new file name and restart the application!
10:44:41  Recompute failed! Please check report view.
User avatar
papyblaise
Veteran
Posts: 8024
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: Crash on recomputing faulty fillet

Post by papyblaise »

As you said 2 or 3 days ago, you have to change the branches of your tree (don't knock down the birds that sleep there: lol :)
you make the filet before finishing the wings by adding material and not by subtraction
Obviously Partdesign crash in this breakthrough :!:
Attachments
aile de RAF.PNG
aile de RAF.PNG (20.66 KiB) Viewed 698 times
aile de RAF.FCStd
(245.75 KiB) Downloaded 17 times
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash on recomputing faulty fillet

Post by chrisb »

I was aware of the broken fillet, and I know how to fix, but it is not uncommon to have a fillet at the end of the tree which breaks when making changes to earlier steps. So FreeCAD shouldn't crash.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Vincent B
Veteran
Posts: 4741
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Crash on recomputing faulty fillet

Post by Vincent B »

Check your tip! ;)
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: Crash on recomputing faulty fillet

Post by TheMarkster »

No crash here. I just get an exception message in the report view:

<Exception> Access Violation

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22411 (Git)
Build type: Release
Branch: master
Hash: d4519d5aec15bc08f029da5ed15410a494b57b2c
Python version: 3.8.5
Qt version: 5.12.6
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
User avatar
papyblaise
Veteran
Posts: 8024
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: Crash on recomputing faulty fillet

Post by papyblaise »

shouldn't crash
should :!: shouldn't that 's eternal question :lol:
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash on recomputing faulty fillet

Post by chrisb »

Thanks for the tips and investigations.
GlouGlou wrote: Sun Sep 20, 2020 3:55 pm Check your tip! ;)
To tell the whole story: I had a working model, including fillets. No errors, no crashes, tip at the last feature.
I had to change some details, which included inserting a new feature after the Draft. So I set Tip to the Draft, and edited the model which finally lead to the situation in the uploaded model. Changing Tip will cause a recompute which will immediately crash FreeCAD. So I left Tip where it was.

I have already repaired the model by removing the fillet and reiserting it after the changes.

I guess the error comes from OCC's fillet code. The question is: Is this something which can be improved, or is the crash unavoidable. In the former case I would create a bug report, in the latter case I would register it and just do nothing.
wmayer wrote: pinged by pinger macro
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Crash on recomputing faulty fillet

Post by vocx »

chrisb wrote: Sun Sep 20, 2020 9:36 am Steps to reproduce:
- Load the attached file crash.fcstd
- click recompute
-> FreeCAD crashes
Backtrace. The crash is in OpenCASCADE but it's probably due to some code in PartDesign::Fillet.

Please add the information that you described about the tip to the opening post as well.

Code: Select all

Thread 1 "FreeCAD" received signal SIGSEGV, Segmentation fault.
0x00007fffb7a2d3c4 in Geom2d_Curve::Value(double) const () from /usr/lib/x86_64-linux-gnu/libTKG2d.so.7
(gdb) bt 
#0  0x00007fffb7a2d3c4 in Geom2d_Curve::Value(double) const () at /usr/lib/x86_64-linux-gnu/libTKG2d.so.7
#1  0x00007fffbc4750ae in ChFi3d_Builder::PerformOneCorner(int, bool) () at /usr/lib/x86_64-linux-gnu/libTKFillet.so.7
#2  0x00007fffbc411218 in ChFi3d_Builder::PerformFilletOnVertex(int) () at /usr/lib/x86_64-linux-gnu/libTKFillet.so.7
#3  0x00007fffbc4121d1 in ChFi3d_Builder::Compute() () at /usr/lib/x86_64-linux-gnu/libTKFillet.so.7
#4  0x00007fffbc5ca283 in BRepFilletAPI_MakeFillet::Build() () at /usr/lib/x86_64-linux-gnu/libTKFillet.so.7
#5  0x00007fff49a44720 in PartDesign::Fillet::execute() (this=0x55555ba3e320)
    at /opt/freecad-source-vocx/src/Mod/PartDesign/App/FeatureFillet.cpp:100
#6  0x00007ffff53457e7 in App::DocumentObject::recompute() (this=0x55555ba3e320) at /opt/freecad-source-vocx/src/App/DocumentObject.cpp:111
#7  0x00007fffbcb9beb1 in Part::Feature::recompute() (this=0x55555ba3e320) at /opt/freecad-source-vocx/src/Mod/Part/App/PartFeature.cpp:101
#8  0x00007ffff5250276 in App::Document::_recomputeFeature(App::DocumentObject*) (this=0x55555640d4a0, Feat=0x55555ba3e320)
    at /opt/freecad-source-vocx/src/App/Document.cpp:3724
#9  0x00007ffff524dffe in App::Document::recompute(std::vector<App::DocumentObject*, std::allocator<App::DocumentObject*> > const&, bool, bool*, int) (this=0x55555640d4a0, objs=std::vector of length 0, capacity 0, force=true, hasError=0x0, options=4)
    at /opt/freecad-source-vocx/src/App/Document.cpp:3475
#10 0x00007ffff53d0e7a in App::DocumentPy::recompute(_object*) (this=0x555558187d20, args=(None, True, True))
    at /opt/freecad-source-vocx/src/App/DocumentPyImp.cpp:503
#11 0x00007ffff53c86ce in App::DocumentPy::staticCallback_recompute(_object*, _object*) (self=<App.Document at remote 0x555558187d28>, args=(None, True, True)) at /opt/freecad-build-debug-vocx/src/App/DocumentPy.cpp:1609
#12 0x00007ffff3fad53b in _PyCFunction_FastCallDict (func_obj=
    <built-in method recompute of App.Document object at remote 0x555558187d28>, args=0x7fffbf2e83c8, nargs=<optimized out>, kwargs=<optimized out>) at ../Objects/methodobject.c:234
#13 0x00007ffff3f161ec in call_function (pp_stack=0x7fffffffb8b0, oparg=<optimized out>, kwnames=0x0) at ../Python/ceval.c:4851
#14 0x00007ffff3f1c303 in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:3335
---Type <return> to continue, or q <return> to quit---
#15 0x00007ffff3f15a0f in _PyEval_EvalCodeWithName (_co=<code at remote 0x7fffa6cdca50>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=0, kwnames=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at ../Python/ceval.c:4166

Code: Select all

OS: Ubuntu 18.04.5 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22465 (Git)
Build type: Debug
Branch: master
Hash: a028ea94ccdc0c024c73e6d583fcf11b2c039d46
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
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.
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash on recomputing faulty fillet

Post by chrisb »

vocx wrote: Sun Sep 20, 2020 6:10 pm Please add the information that you described about the tip to the opening post as well.
Done. And I added information how I was able to save such state of the model.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply