Crash on editing sketch
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Crash on editing sketch
I have a reproducible crash:
- open the attached file: - open the Sketch "Sketch-Pinpad"
- set for the Edge 2 a vertical constraint (e.g. 3mm)
- close the sketch
result: crash
One out of 5 times it does not crash and I get an "access violation" in the report view.
Can anybody confirm this?
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17505 (Git)
Build type: Release
Branch: master
Hash: 755536e9df94d2d39da1468420f1fd333c35da7a
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
- open the attached file: - open the Sketch "Sketch-Pinpad"
- set for the Edge 2 a vertical constraint (e.g. 3mm)
- close the sketch
result: crash
One out of 5 times it does not crash and I get an "access violation" in the report view.
Can anybody confirm this?
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17505 (Git)
Build type: Release
Branch: master
Hash: 755536e9df94d2d39da1468420f1fd333c35da7a
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Re: Crash on editing sketch
I made the dimension 5.4 at first and decreased it until it crashed. Looks like the crash occurs when the middle bottom opening is cleared. Then I started deleting fillets/chamfers and I had to delete all of them to fix the issue. So probably some edge gets remapped to something weird and that creates the crash. It should not crash but probably just give a warning.
OS: Windows 8.1 (6.3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17651 (Git)
Build type: Release
Branch: master
Hash: 16c26cb3b1cd7209ea8efc8cb30b3b18fd80cf95
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Bulgarian/Bulgaria (bg_BG)
OS: Windows 8.1 (6.3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17651 (Git)
Build type: Release
Branch: master
Hash: 16c26cb3b1cd7209ea8efc8cb30b3b18fd80cf95
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Bulgarian/Bulgaria (bg_BG)
Re: Crash on editing sketch
Confirmed on Mac too.
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17512 (Git)
Build type: Release
Branch: master
Hash: 7b315d3a15f6c0a3e796b2bf000cb791092de079
Python version: 3.7.3
Qt version: 5.9.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17512 (Git)
Build type: Release
Branch: master
Hash: 7b315d3a15f6c0a3e796b2bf000cb791092de079
Python version: 3.7.3
Qt version: 5.9.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Veteran
- Posts: 5505
- Joined: Thu Apr 05, 2018 1:53 am
Re: Crash on editing sketch
In Windows I only get an exception message (access violation) in the report view, no crash in 3 tries.
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17505 (Git)
Build type: Release
Branch: master
Hash: 755536e9df94d2d39da1468420f1fd333c35da7a
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
In Ubuntu debug build I get crash at line 100 of FeatureFillet.cpp.
The line is mkFillet->Build();
mkFillet is of type BRepFilletAPI_MakeFillet, which is an open cascade object.
It crashes even though the function is called inside a try except block. I tried using catch(...), which is a catch all for all exceptions in c++, but still the exception handler isn't called, only the crash happens. I'm not a c++ wizard by any means, but I don't see a way to avoid this type of crash simply by using try/catch blocks no matter even if a catchall type is used.
If found this information in the OCCT documentation:
I wonder if it would work to call OCCT library functions via a child process? If this could be done, then perhaps only the child process would crash and not FreeCAD? Likely, the idea has been already considered and dismissed at some point, but if it could work I can think of a number of benefits: 1) FreeCAD is much more stable against crashes; 2) Operations that are taking too long could be canceled by killing the child process; 3) There could be ways to use this for multi-threading, perhaps by spawning multiple instances of the child process, perhaps by allowing the user to continue using FreeCAD while the operation is pending.
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17505 (Git)
Build type: Release
Branch: master
Hash: 755536e9df94d2d39da1468420f1fd333c35da7a
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
In Ubuntu debug build I get crash at line 100 of FeatureFillet.cpp.
The line is mkFillet->Build();
mkFillet is of type BRepFilletAPI_MakeFillet, which is an open cascade object.
It crashes even though the function is called inside a try except block. I tried using catch(...), which is a catch all for all exceptions in c++, but still the exception handler isn't called, only the crash happens. I'm not a c++ wizard by any means, but I don't see a way to avoid this type of crash simply by using try/catch blocks no matter even if a catchall type is used.
If found this information in the OCCT documentation:
I don't know if either of the 2 documented cases that are not handled apply in this particular case, but my guess would be the 2nd one is the issue. But that is only a guess. One way FreeCAD could prevent this crash then would be to check to see if one of these cases are present before calling Build(), but this is beyond my meager skills.virtual void BRepFilletAPI_MakeFillet::Build ( )
virtual
Builds the fillets on all the contours in the internal data structure of this algorithm and constructs the resulting shape. Use the function IsDone to verify that the filleted shape is built. Use the function Shape to retrieve the filleted shape. Warning The construction of fillets implements highly complex construction algorithms. Consequently, there may be instances where the algorithm fails, for example if the data defining the radius of the fillet is not compatible with the geometry of the initial shape. There is no initial analysis of errors and they only become evident at the construction stage. Additionally, in the current software release, the following cases are not handled:
the end point of the contour is the point of intersection of 4 or more edges of the shape, or
the intersection of the fillet with a face which limits the contour is not fully contained in this face.
Reimplemented from BRepBuilderAPI_MakeShape.
I wonder if it would work to call OCCT library functions via a child process? If this could be done, then perhaps only the child process would crash and not FreeCAD? Likely, the idea has been already considered and dismissed at some point, but if it could work I can think of a number of benefits: 1) FreeCAD is much more stable against crashes; 2) Operations that are taking too long could be canceled by killing the child process; 3) There could be ways to use this for multi-threading, perhaps by spawning multiple instances of the child process, perhaps by allowing the user to continue using FreeCAD while the operation is pending.
Re: Crash on editing sketch
Many thanks for having a look and the analysis.
I created now issue #4129.
I created now issue #4129.
Re: Crash on editing sketch
Hi All.
I have same problem.
When I edit a complex sketch, the program starts to crash regularly. And it crashes whenever you try to create a new line, size, or constraint. Sometimes any click on the sketch causes a drop.
Regards, Friv.
OS: Debian GNU/Linux 10 (buster)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.
Build type: Release
Python version: 3.7.2+
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
I have same problem.
When I edit a complex sketch, the program starts to crash regularly. And it crashes whenever you try to create a new line, size, or constraint. Sometimes any click on the sketch causes a drop.
Regards, Friv.
OS: Debian GNU/Linux 10 (buster)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.
Build type: Release
Python version: 3.7.2+
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Re: Crash on editing sketch
Please upload an example file.
EDIT:- Upgrade your version is way out of date.
EDIT:- Upgrade your version is way out of date.
Re: Crash on editing sketch
The program "breaks" with this file.
- Attachments
-
- Crash.FCStd
- Program crash
- (8.25 KiB) Downloaded 29 times