View Issue Details

IDProjectCategoryView StatusLast Update
0000478FreeCADBugpublic2012-05-05 18:42
Reportercstrachan1 Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionnot fixable 
Product Version0.11 
Summary0000478: Segfault on insert part into 2D drawing
DescriptionFile too large to attach, I can email privately as required. Screenshot attached to demonstrate drawing complexity

Segfault on insert part into 2D drawing; to reproduce:

Open Drawing workbench
Select "Fusion" part.
Select insert part into drawing icon
Segfault occurs.
Additional InformationUbuntu 11.10 Linux compiled from svn updated and compiled 10th Nov 2011.

Debugging session:

(gdb) r

Starting program: /home/colin/Downloads/free-cad/bin/FreeCAD

[Thread debugging using libthread_db enabled]

FreeCAD 0.12, Libs: 0.12R4851

© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2011

  ##### #### ### ####

  # # # # # #

  # ## #### #### # # # # #

  #### # # # # # # # ##### # #

  # # #### #### # # # # #

  # # # # # # # # # ## ## ##

  # # #### #### ### # # #### ## ## ##



[New Thread 0xb0c7eb70 (LWP 2382)]

[New Thread 0xb02ffb70 (LWP 2383)]

[New Thread 0xaf157b70 (LWP 2384)]

[New Thread 0xac5e8b70 (LWP 2385)]

[New Thread 0xabcbfb70 (LWP 2386)]

[New Thread 0xa5d84b70 (LWP 2387)]

[New Thread 0xa557cb70 (LWP 2388)]

[Thread 0xb0c7eb70 (LWP 2382) exited]

[Thread 0xa5d84b70 (LWP 2387) exited]

[Thread 0xa557cb70 (LWP 2388) exited]



Program received signal SIGSEGV, Segmentation fault.

0xa403960a in TopoDS_Builder::Add(TopoDS_Shape&, TopoDS_Shape const&) const ()

   from /usr/lib/libTKBRep-6.5.0.so

(gdb) bt

#0 0xa403960a in TopoDS_Builder::Add(TopoDS_Shape&, TopoDS_Shape const&) const

    () from /usr/lib/libTKBRep-6.5.0.so

#1 0xa1e4c8e8 in HLRTopoBRep_DSFiller::InsertFace(int, TopoDS_Face const&, Contap_Contour&, HLRTopoBRep_Data&, unsigned int) ()

   from /usr/lib/libTKHLR-6.5.0.so

0000002 0xa1e4fc33 in HLRTopoBRep_DSFiller::Insert(TopoDS_Shape const&, Contap_Contour&, HLRTopoBRep_Data&, BRepTopAdaptor_MapOfShapeTool&, int) ()

   from /usr/lib/libTKHLR-6.5.0.so

0000003 0xa1e586f3 in HLRTopoBRep_OutLiner::Fill(HLRAlgo_Projector const&, BRepTopAdaptor_MapOfShapeTool&, int) () from /usr/lib/libTKHLR-6.5.0.so

0000004 0xa1e4958e in HLRBRep_ShapeToHLR::Load(Handle_HLRTopoBRep_OutLiner const&, HLRAlgo_Projector const&, BRepTopAdaptor_MapOfShapeTool&, int) ()

   from /usr/lib/libTKHLR-6.5.0.so

0000005 0xa1e357b2 in HLRBRep_InternalAlgo::Update() ()

   from /usr/lib/libTKHLR-6.5.0.so

0000006 0xa1ec1be3 in Drawing::ProjectionAlgos::execute (this=0xbfffd808)

    at ProjectionAlgos.cpp:125

0000007 0xa1ec2ab3 in Drawing::ProjectionAlgos::ProjectionAlgos (this=0xbfffd808,

    Input=..., Dir=...) at ProjectionAlgos.cpp:96

0000008 0xa1ebf8e1 in Drawing::FeatureViewPart::execute (this=0xab70930)

    at FeatureViewPart.cpp:190

---Type <return> to continue, or q <return> to quit---

0000009 0xb6d886c9 in App::DocumentObject::recompute (this=0xab70930)

    at DocumentObject.cpp:85

0000010 0xb6d7b8f6 in App::Document::_recomputeFeature (this=0x89a5ad8,

    Feat=0xab70930) at Document.cpp:1174

0000011 0xb6d7e21f in App::Document::recompute (this=0x89a5ad8)

    at Document.cpp:1141

0000012 0xb6d99f4f in App::DocumentPy::recompute (this=0x854c3b8, args=0xb1dcf02c)

    at DocumentPyImp.cpp:254

0000013 0xb6d99fc2 in App::DocumentPy::staticCallback_recompute (self=0x854c3bc,

    args=0xb1dcf02c) at DocumentPy.cpp:1165

0000014 0xb6fa4b0f in PyCFunction_Call () from /usr/lib/libpython2.7.so.1.0

0000015 0xb700a60f in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.so.1.0

0000016 0xb700c522 in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.so.1.0

0000017 0xb700c693 in PyEval_EvalCode () from /usr/lib/libpython2.7.so.1.0

0000018 0xb702d3c3 in PyRun_StringFlags () from /usr/lib/libpython2.7.so.1.0

0000019 0xb6e7a14f in Base::InterpreterSingleton::runString (this=0x8076e48,

    sCmd=0xab720a0 "App.ActiveDocument.recompute()") at Interpreter.cpp:117

0000020 0xb6779c26 in Gui::Command::doCommand (eType=Gui::Command::Gui,

    sCmd=0xb6a2c864 "App.ActiveDocument.recompute()") at Command.cpp:413

0000021 0xb6779f18 in Gui::Command::updateActive () at Command.cpp:446

0000022 0xa1d6d049 in CmdDrawingNewView::activated (this=0x8d558c0, iMsg=0)

---Type <return> to continue, or q <return> to quit---

    at Command.cpp:271

0000023 0xb6779654 in Gui::Command::invoke (this=0x8d558c0, i=0) at Command.cpp:282

0000024 0xb6749456 in Gui::Action::onActivated (this=0x8354080) at Action.cpp:82

0000025 0xb6748e7e in Gui::Action::qt_metacall (this=0x8354080,

    _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0xbfffe038)

    at moc_Action.cpp:73

0000026 0xb7e86b7d in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/i386-linux-gnu/libQtCore.so.4

0000027 0xb7e95a6a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/i386-linux-gnu/libQtCore.so.4

0000028 0xb73a483d in QAction::triggered(bool) ()

   from /usr/lib/i386-linux-gnu/libQtGui.so.4

0000029 0xb73a4adb in QAction::activate(QAction::ActionEvent) ()

   from /usr/lib/i386-linux-gnu/libQtGui.so.4

0000030 0xb7898170 in QToolButton::nextCheckState() ()

   from /usr/lib/i386-linux-gnu/libQtGui.so.4

0000031 0xb77c0bb7 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4

0000032 0xb77c0eb6 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()

   from /usr/lib/i386-linux-gnu/libQtGui.so.4

0000033 0xb789820d in QToolButton::mouseReleaseEvent(QMouseEvent*) ()

   from /usr/lib/i386-linux-gnu/libQtGui.so.4

---Type <return> to continue, or q <return> to quit---

0000034 0xb7405f98 in QWidget::event(QEvent*) ()

   from /usr/lib/i386-linux-gnu/libQtGui.so.4

0000035 0xb77c0159 in QAbstractButton::event(QEvent*) ()

   from /usr/lib/i386-linux-gnu/libQtGui.so.4

0000036 0xb789994c in QToolButton::event(QEvent*) ()

   from /usr/lib/i386-linux-gnu/libQtGui.so.4

0000037 0xb73abd54 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()

   from /usr/lib/i386-linux-gnu/libQtGui.so.4

0000038 0xb73b1dbb in QApplication::notify(QObject*, QEvent*) ()

   from /usr/lib/i386-linux-gnu/libQtGui.so.4

#39 0xb675ef99 in Gui::GUIApplication::notify (this=0xbffff020,

    receiver=0x89a1b60, event=0xbfffe6cc) at Application.cpp:1443

#40 0xb7e8019e in QCoreApplication::notifyInternal(QObject*, QEvent*) ()

   from /usr/lib/i386-linux-gnu/libQtCore.so.4

0000041 0xb73acd15 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()

   from /usr/lib/i386-linux-gnu/libQtGui.so.4

0000042 0xb74392c4 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4

0000043 0xb7437e4d in QApplication::x11ProcessEvent(_XEvent*) ()

   from /usr/lib/i386-linux-gnu/libQtGui.so.4

0000044 0xb746424c in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4

---Type <return> to continue, or q <return> to quit---

0000045 0xb627e25f in g_main_context_dispatch ()

   from /lib/i386-linux-gnu/libglib-2.0.so.0

0000046 0xb627e990 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0

0000047 0xb627ec2a in g_main_context_iteration ()

   from /lib/i386-linux-gnu/libglib-2.0.so.0

0000048 0xb7eaeada in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4

0000049 0xb7463e3a in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4

0000050 0xb7e7f1dd in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4

0000051 0xb7e7f421 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()

   from /usr/lib/i386-linux-gnu/libQtCore.so.4

0000052 0xb7e8419d in QCoreApplication::exec() ()

   from /usr/lib/i386-linux-gnu/libQtCore.so.4

0000053 0xb73a98f4 in QApplication::exec() ()

   from /usr/lib/i386-linux-gnu/libQtGui.so.4

0000054 0xb675bae7 in Gui::Application::runApplication () at Application.cpp:1659

0000055 0x0804ae19 in main (argc=Cannot access memory at address 0x0

) at MainGui.cpp:349

(gdb)
TagsNo tags attached.
FreeCAD Information

Activities

2011-11-10 16:07

 

Screenshot at 2011-11-10 17:04:07.png (Attachment missing)

wmayer

2011-11-10 18:00

administrator   ~0001271

It seems that this is a bug in OCC. Since I didn't have any crashes with other data sets it is related to your data set. Maybe it's too complex for OCC. You can send it to werner.wm.mayer@gmx.de if you want.

cstrachan1

2011-11-11 08:23

reporter   ~0001272

I have simplified the drawing to isolate what part causes the issue. To do this I grouped the connectors into one fusion leaving the enclosure in another.

Trying to place the connector group on the drawing page results in the error: "BSpline curve : # Poles and degree mismatch". Nothing is drawn that I can see.

Trying to place the enclosure on the drawing results in the segfault. I have attached a smaller file (900K) that contains just the enclosure and illustrates the segfault that the ticket was opened for.

FreeCAD draws the assembly perfectly at all times when viewed in the normal model view pane.

2011-11-11 08:25

 

Interface Module 36_combo6.fcstd (Attachment missing)

wmayer

2011-11-17 09:35

administrator   ~0001299

Rev 5144 implements a workaround for this issue. The projection still fails but at least the application doesn't crash anymore. This gives you the opportunity to slightly change the view projection direction.

I built a debug version of OCC and there is an invalid vertex added to a compound.

Jriegel

2011-11-21 09:06

administrator   ~0001335

can reproduce on Windows. the projector call to OpenCasCade crashes badly.

Its a bug for OCC

cstrachan1

2011-12-30 08:08

reporter   ~0001522

behavior is the same with FreeCAD 0.13, Libs: 0.13R5359 and OCC 6.5.2

yorik

2012-05-05 18:42

administrator   ~0002019

I think we can close this...

Issue History

Date Modified Username Field Change
2011-11-10 16:07 cstrachan1 New Issue
2011-11-10 16:07 cstrachan1 File Added: Screenshot at 2011-11-10 17:04:07.png
2011-11-10 18:00 wmayer Note Added: 0001271
2011-11-11 08:23 cstrachan1 Note Added: 0001272
2011-11-11 08:25 cstrachan1 File Added: Interface Module 36_combo6.fcstd
2011-11-17 09:35 wmayer Note Added: 0001299
2011-11-21 09:06 Jriegel Note Added: 0001335
2011-11-21 09:06 Jriegel Status new => acknowledged
2011-12-30 08:08 cstrachan1 Note Added: 0001522
2012-05-05 18:42 yorik Note Added: 0002019
2012-05-05 18:42 yorik Status acknowledged => closed
2012-05-05 18:42 yorik Resolution open => not fixable