View Issue Details

IDProjectCategoryView StatusLast Update
0004561PathBugpublic2021-08-29 18:31
Reportersliptonic Assigned To 
Status newResolutionopen 
Product Version0.19 
Target Version0.19 
Summary0004561: OpenCamLib (OCL) raises an error on incorrect tool attributes and causes FreeCAD segfault

The sample file requires the legacy tools to be enabled but appears to be related to passing incorrectly defined tools to OCL.

FreeCAD: /home/brad/opencamlib/src/cutters/ballcutter.cpp:41: ocl::BallCutter::BallCutter(double, double): Assertion `length>0.0' failed.
Aborted (core dumped)

Tool type: Engraver
FreeCAD: /home/brad/opencamlib/src/cutters/conecutter.cpp:46: ocl::ConeCutter::ConeCutter(double, double, double): Assertion `center_height > 0.0' failed.
Aborted (core dumped
Steps To ReproduceOpen the cone crasher file. Change the surface operation to use one of the other tools and recompute.
Additional InformationMay not affect all platforms.
Known to crash on Mint and Fedora

We don't plan to fix legacy tools to prevent bad user data but handling of the OCL error should be fixed
TagsNo tags attached.
FreeCAD InformationOS: Linux Mint 20 (i3/i3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23964 +1 (Git)
Build type: Unknown
Branch: (HEAD detached at upstream/pr/4383)
Hash: 9dce167073d90460478efb0d38056e4fcb116e6e
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.3.0
Locale: English/United States (en_US)



2021-02-11 15:05


cone-crasher.FCStd (224,307 bytes)


2021-02-11 17:23

reporter   ~0015325

C++ assert() will cause a core dump unless NBEBUG is set. That may need doing for release builds.


2021-02-15 09:52

reporter   ~0015346


2021-02-22 21:37

reporter   ~0015419

The pull request has been merged, so this can be closed, correct?


2021-02-23 07:59

reporter   ~0015421

The PR I provided fixed two specific errors in FC which were triggering coredumps. The question remains, is this error trap outcome desirable in a stable release or should it be trapped/handled differently.

If there is a future error condition is discovered, is it desirable that the user gets faced with a core dump?

This was clearly intended as debugging outcome in OCL and there is a variable to turn it off. Since OLC is currently compiled outside of FC and to all intents and purposes has no active developer this cannot be fixed from FC.

One option would be to fork OCL into FC tree and detect the error condition in a more contorlled manner or submit a PR to OLC if that is preferable.

In short the PR fixed a local bug triggering an instance of the problem, it does not fix the problem.


2021-08-29 18:29

administrator   ~0015882

FreeCAD master ab186aa0


2021-08-29 18:31

administrator   ~0015883

@sliptonic when you get a chance, can you weigh in on this ?


2022-03-03 13:55

administrator   ~0016992

This ticket has been migrated to GitHub as issue 6160.

Related Changesets

FreeCAD: master ab186aa0

2021-02-15 16:03:09


Committer: GitHub Details Diff
Merge pull request 0004433 from J-Dunn/master

[PATH] fix conecutter core dumps 0004561
Affected Issues
mod - src/Mod/Path/PathScripts/ Diff File

Issue History

Date Modified Username Field Change
2021-02-11 15:05 sliptonic New Issue
2021-02-11 15:05 sliptonic File Added: cone-crasher.FCStd
2021-02-11 17:23 fremen Note Added: 0015325
2021-02-15 09:52 fremen Note Added: 0015346
2021-02-22 21:37 StefanBruens Note Added: 0015419
2021-02-23 07:59 fremen Note Added: 0015421
2021-08-29 18:29 Kunda1 Note Added: 0015882
2021-08-29 18:30 Kunda1 Changeset attached => FreeCAD master ab186aa0
2021-08-29 18:31 Kunda1 Note Added: 0015883