Crash on changing fillet radius

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: 53943
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash on changing fillet radius

Post by chrisb »

wmayer wrote: Sat Nov 07, 2020 10:02 am Since OCCT 7.5 has been officially released it might be worth to check with this version if the fillet operation still crashes.
Thanks for the investigation. I will create a ticket nevertheless, so we don't forget to retest.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Crash on changing fillet radius

Post by wmayer »

Just tested and it crashes with OCCT 7.5, too.
chrisb
Veteran
Posts: 53943
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash on changing fillet radius

Post by chrisb »

Thanks for testing.
I had already created the ticket and have now modified it and classified it as general "OCC bug". As the tag "OCC 7.6" already exists, should I tag it with that?

issue #4487
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Crash on changing fillet radius

Post by uwestoehr »

wmayer wrote: Sat Nov 07, 2020 10:02 am I don't think there is much we can do. When you look at the call stack you see that it crashes deep inside OCC code
Sorry that I lost track here. Meanwhile I worked several hours with FC every day on real-life projects and get at least one crash every half hour. To be honest, this is a bit disappointing.
However, I opened a new thread for which I opened a ticket:
https://forum.freecadweb.org/viewtopic.php?f=3&t=54353

As I stated there, I thought we can at least check if OCC failed and if so, revert/abort the fillet creation. As I understood chennes, we assume OCC succeeded and move on. This is maybe something that can be fixed in the FC code to avoid a crash of FC.
(Unfortunately I won't have time this week to dive into this code myself.)
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Crash on changing fillet radius

Post by wmayer »

uwestoehr wrote: Mon Jan 25, 2021 10:06 pm As I stated there, I thought we can at least check if OCC failed and if so, revert/abort the fillet creation.
This won't work in many cases because OCC code causes a segmentation fault. All what we can do here is to enable the SEH (Structured Exception Handling) of the compiler which converts a segmentation fault into an exception. This way we can at least avoid that FreeCAD crashes but on the other side it has the drawback that it hides the source of the problem.

So, the only good strategy is that OCC fixes its serious bugs. For the time being the best what the user can do is: save early, save often.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Crash on changing fillet radius

Post by uwestoehr »

wmayer wrote: Tue Jan 26, 2021 10:53 am This won't work in many cases because OCC code causes a segmentation fault. All what we can do here is to enable the SEH (Structured Exception Handling) of the compiler which converts a segmentation fault into an exception. This way we can at least avoid that FreeCAD crashes but on the other side it has the drawback that it hides the source of the problem.
This sounds good - for a release version of course. So for the FC 0.19 release I think @sgrogan could compile FC that way.

I would also learn how to compile FC that way since for example just now I sit here constructing and despite my coffee is not yet drunken, I got 2 crashes with chamfers :cry:

So how can I enable SEH?
sgrogan wrote: .
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Crash on changing fillet radius

Post by wmayer »

uwestoehr wrote: Tue Jan 26, 2021 11:28 am So how can I enable SEH?
By default it's already on: https://github.com/FreeCAD/FreeCAD/blob ... .cmake#L26
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Crash on changing fillet radius

Post by uwestoehr »

wmayer wrote: Tue Jan 26, 2021 12:36 pm By default it's already on: https://github.com/FreeCAD/FreeCAD/blob ... .cmake#L26
But I compiled a release version that way and use that for my daily work. Nevertheless I get permanently crashes. Why?
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Crash on changing fillet radius

Post by wmayer »

uwestoehr wrote: Tue Jan 26, 2021 3:08 pm
wmayer wrote: Tue Jan 26, 2021 12:36 pm By default it's already on: https://github.com/FreeCAD/FreeCAD/blob ... .cmake#L26
But I compiled a release version that way and use that for my daily work. Nevertheless I get permanently crashes. Why?
Well, I think for the SEH thing it must be set per thread but we have no control over when OCC spawns a new thread. In that case you should get a file crash.dmp that is located under %APPDATA%/FreeCAD. You can load it into VS and press F5. It should then give you a clue where it crashed.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Crash on changing fillet radius

Post by abdullah »

chrisb wrote: Sat Nov 07, 2020 9:44 pm
wmayer wrote: Sat Nov 07, 2020 10:02 am Since OCCT 7.5 has been officially released it might be worth to check with this version if the fillet operation still crashes.
Thanks for the investigation. I will create a ticket nevertheless, so we don't forget to retest.
I think it is good for it to be in the bugtracker, with a noted indicating is OCCT's fault. I have fixed some of these in OCCT. Then Kurt can patch the opencascade packages with it. My guess, when creating the win libpack or similar we could also include those patches until they get fixed upstream.
Post Reply