View Issue Details

IDProjectCategoryView StatusLast Update
0002985Part[FreeCAD] Bugpublic2018-09-22 15:55
ReporternmtAssigned To 
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformMacOSMacOSXOS Version
Product Version[FreeCAD] 0.17 
Target VersionFixed in Version 
Summary0002985: Part.makeFilledFace is crashing FreeCAD (upstream OCC bug)
DescriptionThe following short script is crashing FreeCAD for me at the Part.makeFilledFace line

import Part
v1 = App.Vector(0.0,0.0,0.0)
v2 = App.Vector(10.0,0.0,0.0)
v3 = App.Vector(10.0,0.0,10.0)
v4 = App.Vector(0.0,0.0,10.0)
edge1 = Part.makeLine(v1, v2)
edge2 = Part.makeLine(v2, v3)
edge3 = Part.makeLine(v3, v4)
edge4 = Part.makeLine(v4, v1)
result = Part.makeFilledFace([edge1,edge2,edge3,edge4])


OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10641 (Git)
Build type: Release
Branch: (detached from 3074c2e)
Hash: 3074c2e756b14c2f06ada11da14b1123e9ecd0f8
Python version: 2.7.13
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0

Steps To ReproduceRun the above python script in the FC console
Additional InformationForum thread at: https://forum.freecadweb.org/viewtopic.php?f=22&t=21520
Tags#pending, distribution specific, MacOSX, OCC 7.2, OCC Bug, upstream

Relationships

has duplicate 0002842 assignedpeterl94 Crash on "Face from Edges" 

Activities

nmt

2017-03-26 09:37

reporter   ~0008708

This seem to crash only on MacOS systems. Running from command line gives the following message:
*** Abort *** an exception was raised, but no catch was found.
    ... The exception is:SIGILL 'illegal instruction' detected.

Kunda1

2017-03-27 07:50

administrator   ~0008711

Thanks for the ticket. FYI, please always remember to
1) post: Help > About FreeCAD > Copy to clipboard
2) create a forum thread first before a ticket (many bugs can be addressed before needing a ticket) then if the community determines it: create a ticket. Always bidirectionally link ticket <==> thread

nmt

2017-03-27 09:01

reporter   ~0008712

Forum thread at: https://forum.freecadweb.org/viewtopic.php?f=22&t=21520

blacey

2017-03-27 16:43

developer   ~0008716

Last edited: 2017-03-27 16:44

View 2 revisions

Confirmed using 10653 from GitHub on both Qt4 and Qt5. Did not crash when compiled locally (i.e. Debug build on 10.12) so traceback is from the GitHub/Travis build on 10.10.


Process 33965 stopped
* thread #1: tid = 0x4946fa, 0x000000011c57bf45 libTKGeomBase.7.dylib`AdvApp2Var_ApproxF2var::mma2fnc_(int*, 
int*, int*, double*, AdvApp2Var_EvaluatorFunc2Var const&, double*, int*, int*, double*, int*, int*, 
int*, int*, int*, double*, int*, double*, int*, double*, double*, double*, double*, double*, double*, 
double*, int*) + 6579, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, 
subcode=0x0)
    frame #0: 0x000000011c57bf45 libTKGeomBase.7.dylib`AdvApp2Var_ApproxF2var::mma2fnc_(int*, int*, int*, 
double*, AdvApp2Var_EvaluatorFunc2Var const&, double*, int*, int*, double*, int*, int*, int*, int*, 
int*, double*, int*, double*, int*, double*, double*, double*, double*, double*, double*, double*, int*) 
+ 6579
libTKGeomBase.7.dylib`AdvApp2Var_ApproxF2var::mma2fnc_:
->  0x11c57bf45 <+6579>: ud2    
    0x11c57bf47 <+6581>: jmp    0x11c57bf21               ; <+6543>
    0x11c57bf49 <+6583>: jmp    0x11c57bf21               ; <+6543>
    0x11c57bf4b <+6585>: ud2    
(lldb) bt
* thread #1: tid = 0x4946fa, 0x000000011c57bf45 libTKGeomBase.7.dylib`AdvApp2Var_ApproxF2var::mma2fnc_(int*, 
int*, int*, double*, AdvApp2Var_EvaluatorFunc2Var const&, double*, int*, int*, double*, int*, int*, 
int*, int*, int*, double*, int*, double*, int*, double*, double*, double*, double*, double*, double*, 
double*, int*) + 6579, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, 
subcode=0x0)
  * frame #0: 0x000000011c57bf45 libTKGeomBase.7.dylib`AdvApp2Var_ApproxF2var::mma2fnc_(int*, int*, int*, 
double*, AdvApp2Var_EvaluatorFunc2Var const&, double*, int*, int*, double*, int*, int*, int*, int*, 
int*, double*, int*, double*, int*, double*, double*, double*, double*, double*, double*, double*, int*) 
+ 6579
    frame #1: 0x000000011c581c88 libTKGeomBase.7.dylib`AdvApp2Var_Iso::MakeApprox(AdvApp2Var_Context 
const&, double, double, double, double, AdvApp2Var_EvaluatorFunc2Var const&, AdvApp2Var_Node&, 
AdvApp2Var_Node&) + 2504
    frame 0000002: 0x000000011c570b51 libTKGeomBase.7.dylib`AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(AdvApprox_Cutting 
const&, AdvApprox_Cutting const&, AdvApp2Var_EvaluatorFunc2Var const&, AdvApp2Var_Criterion 
const&) + 571
    frame 0000003: 0x000000011c56fcfd libTKGeomBase.7.dylib`AdvApp2Var_ApproxAFunc2Var::ComputePatches(AdvApprox_Cutting 
const&, AdvApprox_Cutting const&, AdvApp2Var_EvaluatorFunc2Var const&, AdvApp2Var_Criterion 
const&) + 181
    frame 0000004: 0x000000011c56e2ec libTKGeomBase.7.dylib`AdvApp2Var_ApproxAFunc2Var::AdvApp2Var_ApproxAFunc2Var(int, 
int, int, opencascade::handle<TColStd_HArray1OfReal> const&, opencascade::handle<TColStd_HArray1OfReal> 
const&, opencascade::handle<TColStd_HArray1OfReal> const&, opencascade::handle<TColStd_HArray2OfReal> 
const&, opencascade::handle<TColStd_HArray2OfReal> const&, opencascade::handle<TColStd_HArray2OfReal> 
const&, double, double, double, double, GeomAbs_IsoType, GeomAbs_Shape, GeomAbs_Shape, int, int, 
int, int, AdvApp2Var_EvaluatorFunc2Var const&, AdvApp2Var_Criterion const&, AdvApprox_Cutting&, 
AdvApprox_Cutting&) + 650
    frame 0000005: 0x000000011c247e03 libTKGeomAlgo.7.dylib`GeomPlate_MakeApprox::GeomPlate_MakeApprox(opencascade::handle<GeomPlate_Surface> 
const&, AdvApp2Var_Criterion const&, double, int, int, GeomAbs_Shape, double) + 921
    frame 0000006: 0x000000011b9c86cf libTKBool.7.dylib`BRepFill_Filling::Build() + 3867
    frame 0000007: 0x000000011a68038d Part.so`Part::Module::makeFilledFace(Py::Tuple const&) + 1037
    frame 0000008: 0x000000011a68dc2a Part.so`Part::Module::invoke_method_varargs(void*, Py::Tuple const&) 
+ 42
    frame 0000009: 0x0000000100e8088a libFreeCADBase.dylib`method_varargs_call_handler + 218
    frame 0000010: 0x000000010106f907 Python`PyEval_EvalFrameEx + 26252
    frame 0000011: 0x0000000101069089 Python`PyEval_EvalCodeEx + 1583
    frame 0000012: 0x0000000101068a54 Python`PyEval_EvalCode + 54
    frame 0000013: 0x0000000100247359 libFreeCADGui.dylib`Gui::InteractiveInterpreter::runCode(PyCodeObject*) 
const + 73
    frame 0000014: 0x0000000100247275 libFreeCADGui.dylib`Gui::InteractiveInterpreter::runSource(char const*) 
const + 101
    frame 0000015: 0x0000000100247530 libFreeCADGui.dylib`Gui::InteractiveInterpreter::push(char const*) 
+ 176
    frame 0000016: 0x0000000100249638 libFreeCADGui.dylib`Gui::PythonConsole::runSource(QString const&) 
+ 184
    frame 0000017: 0x0000000100248d00 libFreeCADGui.dylib`Gui::PythonConsole::keyPressEvent(QKeyEvent*) + 
656
    frame 0000018: 0x0000000103c4fe3d QtGui`QWidget::event(QEvent*) + 3325
    frame 0000019: 0x0000000103f5aef1 QtGui`QFrame::event(QEvent*) + 45
    frame 0000020: 0x0000000103fcc399 QtGui`QAbstractScrollArea::event(QEvent*) + 795
    frame 0000021: 0x0000000103fe55d2 QtGui`QPlainTextEdit::event(QEvent*) + 754
    frame 0000022: 0x0000000103c0ca7e QtGui`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 194
    
frame 0000023: 0x0000000103c0f28e QtGui`QApplication::notify(QObject*, QEvent*) + 5816
    frame 0000024: 0x00000001000f5c1b libFreeCADGui.dylib`Gui::GUIApplication::notify(QObject*, QEvent*) 
+ 75
    frame 0000025: 0x00000001049dba24 QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 118
    frame 0000026: 0x0000000103c0fc72 QtGui`qt_sendSpontaneousEvent(QObject*, QEvent*) + 45
    frame 0000027: 0x0000000103c6c51c QtGui`QKeyMapper::sendKeyEvent(QWidget*, bool, QEvent::Type, int, QFlags<Qt::KeyboardModifier>, 
QString const&, bool, int, unsigned int, unsigned int, unsigned int, bool*) + 138
    frame 0000028: 0x0000000103c6c109 QtGui`QKeyMapperPrivate::translateKeyEvent(QWidget*, OpaqueEventHandlerCallRef*, 
OpaqueEventRef*, void*, bool) + 1093
    frame 0000029: 0x0000000103bc3798 QtGui`qt_dispatchKeyEvent(void*, QWidget*) + 244
    frame 0000030: 0x0000000103bb9e3e QtGui`-[QCocoaView keyDown:] + 257
    frame 0000031: 0x00007fff9fdf233c AppKit`-[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] 
+ 4086
    frame 0000032: 0x00007fff9fdf0f7a AppKit`-[NSWindow(NSEventRouting) sendEvent:] + 541
    frame 0000033: 0x0000000103bbce76 QtGui`-[QCocoaWindow sendEvent:] + 113
    frame 0000034: 0x00007fff9fc76518 AppKit`-[NSApplication(NSEvent) sendEvent:] + 4768
    frame 0000035: 0x0000000103bc130a QtGui`-[QNSApplication sendEvent:] + 97
    frame 0000036: 0x00007fff9f4f07f7 AppKit`-[NSApplication run] + 1002
    frame 0000037: 0x0000000103bc95f4 QtGui`QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) 
+ 1494
    frame 0000038: 0x00000001049d90f1 QtCore`QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) 
+ 77
    frame #39: 0x00000001049d926c QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) 
+ 366
    frame #40: 0x00000001049dbe69 QtCore`QCoreApplication::exec() + 199
    frame 0000041: 0x00000001000af596 libFreeCADGui.dylib`Gui::Application::runApplication() + 7606
    frame 0000042: 0x0000000100009cea FreeCAD`main + 4058
    frame 0000043: 0x00007fffb7162235 libdyld.dylib`start + 1
(lldb) 


Kunda1

2017-06-16 12:43

administrator   ~0009409

Ping @wmayer (backtrace posted by blacey ^)

Kunda1

2017-06-28 22:09

administrator   ~0009585

Punting to wmayer so ticket does not get lost. Feel free to unassign if need be. Cheers!

wmayer

2017-07-04 08:34

administrator   ~0009666

IMO, this must be a bug in occ7.1.0 under macOS because with only this configuration this issue appeared so far.

Kunda1

2017-08-23 12:40

administrator   ~0010003

tagged as 'distribution specific' and with 'OCC 7.2' in order to test this once OCC7.2 is released in a few days

wmayer

2017-09-01 18:30

administrator   ~0010055

No crash with:
OS: Ubuntu 14.04.5 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.17.11949 (Git)
Build type: Unknown
Branch: master
Hash: 5d2b22ca286207775ddcbeabef7c5850fda32203
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)

But I didn't get a crash either with OCC 7.0.0 under Windows.

Kunda1

2017-10-06 22:08

administrator   ~0010258

@blacey can you recreate bug with OCC 7.2 ?

Kunda1

2017-12-11 19:47

administrator   ~0010573

@peterl94 care to test on OCC 7.2 ?

peterl94

2017-12-11 19:49

developer   ~0010574

@Kunda1 I'll have time to test after Dec 15.

blacey

2017-12-12 05:13

developer   ~0010580

@peterl94, FYI, a few weeks ago, I uploaded the OCCT 7.2 source tarball to the same location on the FreeCAD GitHub with plans to update the homebrew OCCT recipe. Point being, you should be able to leverage that for your testing by changing the download path in the open cascade homebrew formula.

Kunda1

2018-08-23 17:25

administrator   ~0011647

@peterl94 care to test now?

peterl94

2018-08-24 00:39

developer   ~0011649

@Kunda1 No crash anymore with:

OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14326 (Git)
Build type: Unknown
Branch: master
Hash: d5c63cf2119f3523396872e5e83b6b288ea0e587
Python version: 2.7.15
Qt version: 5.11.1
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)

Kunda1

2018-08-25 23:43

administrator   ~0011655

Thanks peter!
Closing ticket.

Issue History

Date Modified Username Field Change
2017-03-25 20:24 nmt New Issue
2017-03-26 09:37 nmt Note Added: 0008708
2017-03-27 07:50 Kunda1 Note Added: 0008711
2017-03-27 07:52 Kunda1 OS => MacOSX
2017-03-27 07:52 Kunda1 Platform => Mac
2017-03-27 07:52 Kunda1 Steps to Reproduce Updated View Revisions
2017-03-27 09:01 nmt Note Added: 0008712
2017-03-27 09:10 Kunda1 Description Updated View Revisions
2017-03-27 09:10 Kunda1 Additional Information Updated View Revisions
2017-03-27 09:12 Kunda1 Additional Information Updated View Revisions
2017-03-27 09:13 Kunda1 Tag Attached: MacOSX
2017-03-27 09:13 Kunda1 Tag Attached: Qt5
2017-03-27 16:43 blacey Note Added: 0008716
2017-03-27 16:44 blacey Note Edited: 0008716 View Revisions
2017-03-27 16:49 Kunda1 Status new => confirmed
2017-03-27 16:50 Kunda1 Target Version => 0.17
2017-06-16 12:43 Kunda1 Note Added: 0009409
2017-06-16 12:44 Kunda1 Tag Detached: Qt5
2017-06-28 22:08 Kunda1 Assigned To => wmayer
2017-06-28 22:08 Kunda1 Status confirmed => assigned
2017-06-28 22:09 Kunda1 Note Added: 0009585
2017-07-04 08:34 wmayer Note Added: 0009666
2017-07-04 11:19 Kunda1 Tag Attached: OCC 7.1
2017-07-04 11:19 Kunda1 Tag Attached: OCC Bug
2017-07-04 11:19 Kunda1 Tag Attached: upstream
2017-08-23 12:38 Kunda1 Tag Attached: distribution specific
2017-08-23 12:38 Kunda1 Tag Attached: OCC 7.2
2017-08-23 12:38 Kunda1 Tag Detached: OCC 7.1
2017-08-23 12:40 Kunda1 Note Added: 0010003
2017-09-01 18:30 wmayer Note Added: 0010055
2017-10-01 21:08 wmayer Relationship added has duplicate 0002842
2017-10-06 22:08 Kunda1 Note Added: 0010258
2017-10-07 09:24 wmayer Target Version 0.17 =>
2017-10-11 03:42 Kunda1 Summary Part.makeFilledFace is crashing FreeCAD => Part.makeFilledFace is crashing FreeCAD (upstream OCC bug)
2017-10-18 11:19 wmayer Project FreeCAD => Part
2017-12-11 19:47 Kunda1 Note Added: 0010573
2017-12-11 19:47 Kunda1 Tag Attached: #pending
2017-12-11 19:49 peterl94 Note Added: 0010574
2017-12-12 05:13 blacey Note Added: 0010580
2018-08-23 17:25 Kunda1 Note Added: 0011647
2018-08-24 00:39 peterl94 Note Added: 0011649
2018-08-25 23:43 Kunda1 Assigned To wmayer =>
2018-08-25 23:43 Kunda1 Status assigned => resolved
2018-08-25 23:43 Kunda1 Resolution open => fixed
2018-08-25 23:43 Kunda1 Note Added: 0011655
2018-09-22 15:55 wmayer Status resolved => closed