Segmentation fault in Part::Desing rotate sketch

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
detlet
Posts: 67
Joined: Sun Sep 25, 2011 5:54 pm
Location: Lauenstein, Germany

Segmentation fault in Part::Desing rotate sketch

Postby detlet » Sat Mar 18, 2017 6:28 pm

Hi,
FreeCAD crashes for me reproducible if I try to rotate the sketch in the attached file around the horizontal sketch axis.

To reproduce:
Start FreeCAD
choose the PardDesign workbench
open the attached file
activate the body
select the sketch
click on "rotate the selected sketch" (auf deutsch "Rotiere die ausgewählte Skizze")
in the dialog change axis from vertical to horizontal
crash

greetings detlef

Code: Select all

OS: Debian GNU/Linux 9.0 (stretch)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10456 (Git)
Build type: Unknown
Branch: master
Hash: 09c1ee77a3684173b631b92236cb7fae79c8a1af
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17


Code: Select all

FreeCAD 0.17, Libs: 0.17R10456 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2017
  #####                 ####  ###   #### 
  #                    #      # #   #   #
  #     ##  #### ####  #     #   #  #   #
  ####  # # #  # #  #  #     #####  #   #
  #     #   #### ####  #    #     # #   #
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Can't find Origin for "Part"
Can't find Origin for "Body"
Can't find Origin for "Part"
Can't find Origin for "Body"
Can't find Origin for "Body"
Can't find Origin for "Body"

** (FreeCAD:331): WARNING **: invalid source position for vertical gradient

** (FreeCAD:331): WARNING **: invalid source position for vertical gradient
Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x33040) [0x7f3d8fc67040]
#1  0x7f3d99f2bf5c in SbVec3f::getValue(float&, float&, float&) const from /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so+0x42
#2  0x7f3d5f5558e5 in PartGui::SoBrepFaceSet::VBO::render(SoGLRenderAction*, SoGLCoordinateElement const*, int const*, int, int const*, int, SbVec3f const*, int const*, SoMaterialBundle*, int const*, SoTextureCoordinateBundle*, int const*, int, int, int) from /home/det/Schreibtisch/soft/FreeCADdev/build/Mod/Part/PartGui.so+0x8a9
#3  0x7f3d5f55640b in PartGui::SoBrepFaceSet::renderShape(SoGLRenderAction*, int, SoGLCoordinateElement const*, int const*, int, int const*, int, SbVec3f const*, int const*, SoMaterialBundle*, int const*, SoTextureCoordinateBundle*, int const*, int, int, int) from /home/det/Schreibtisch/soft/FreeCADdev/build/Mod/Part/PartGui.so+0xdd
#4  0x7f3d5f552b6c in PartGui::SoBrepFaceSet::GLRender(SoGLRenderAction*) from /home/det/Schreibtisch/soft/FreeCADdev/build/Mod/Part/PartGui.so+0x320
#5  0x7f3d5f552c8d in PartGui::SoBrepFaceSet::GLRenderBelowPath(SoGLRenderAction*) from /home/det/Schreibtisch/soft/FreeCADdev/build/Mod/Part/PartGui.so+0x23
#6  0x7f3d97115f22 in SoSeparator::GLRenderBelowPath(SoGLRenderAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x332
#7  0x7f3d97115f22 in SoSeparator::GLRenderBelowPath(SoGLRenderAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x332
#8  0x7f3d97102970 in SoNode::GLRenderS(SoAction*, SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x160
#9  0x7f3d96ea6624 in SoAction::traverse(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x64
#10  0x7f3d9700d0ee in SoChildList::traverse(SoAction*, int, int) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x26e
#11  0x7f3d9711abdf in SoSwitch::doAction(SoAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x2cf
#12  0x7f3d97115f22 in SoSeparator::GLRenderBelowPath(SoGLRenderAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x332
#13  0x7f3d970f7443 in SoGroup::GLRender(SoGLRenderAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x1e3
#14  0x7f3d97102970 in SoNode::GLRenderS(SoAction*, SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x160
#15  0x7f3d96ea6624 in SoAction::traverse(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x64
#16  0x7f3d9700d0ee in SoChildList::traverse(SoAction*, int, int) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x26e
#17  0x7f3d9711abdf in SoSwitch::doAction(SoAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x2cf
#18  0x7f3d97115f22 in SoSeparator::GLRenderBelowPath(SoGLRenderAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x332
#19  0x7f3d970f7443 in SoGroup::GLRender(SoGLRenderAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x1e3
#20  0x7f3d97102970 in SoNode::GLRenderS(SoAction*, SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x160
#21  0x7f3d96ea6624 in SoAction::traverse(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x64
#22  0x7f3d9700d0ee in SoChildList::traverse(SoAction*, int, int) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x26e
#23  0x7f3d9711abdf in SoSwitch::doAction(SoAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x2cf
#24  0x7f3d97115f22 in SoSeparator::GLRenderBelowPath(SoGLRenderAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x332
#25  0x7f3d97115f22 in SoSeparator::GLRenderBelowPath(SoGLRenderAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x332
#26  0x7f3d99f1491e in Gui::SoFCUnifiedSelection::GLRenderBelowPath(SoGLRenderAction*) from /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so+0x24
#27  0x7f3d97115f22 in SoSeparator::GLRenderBelowPath(SoGLRenderAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x332
#28  0x7f3d97102970 in SoNode::GLRenderS(SoAction*, SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x160
#29  0x7f3d96ea6624 in SoAction::traverse(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x64
#30  0x7f3d96eaf086 in SoGLRenderAction::beginTraversal(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x66
#31  0x7f3d96eae342 in SoGLRenderActionP::renderSingle(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0xd2
#32  0x7f3d96eae9c8 in SoGLRenderActionP::render(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x108
#33  0x7f3d96eaf142 in SoGLRenderAction::beginTraversal(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x122
#34  0x7f3d96ea7e72 in SoAction::apply(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x472
#35  0x7f3d99f1d701 in Gui::SoBoxSelectionRenderAction::apply(SoNode*) from /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so+0x35
#36  0x7f3d970bdfd4 in SoRenderManager::renderScene(SoGLRenderAction*, SoNode*, unsigned int) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x44
#37  0x7f3d970bf15f in SoRenderManager::actuallyRender(SoGLRenderAction*, int, int, int) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x8f
#38  0x7f3d970bf302 in SoRenderManager::renderSingle(SoGLRenderAction*, int, int, int) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0xc2
#39  0x7f3d970bf9e1 in SoRenderManager::render(SoGLRenderAction*, int, int, int) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0xb1
#40  0x7f3d970bd7db in SoRenderManager::render(int, int) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x8b
#41  0x7f3d99f9bef1 in SIM::Coin3D::Quarter::QuarterWidget::actualRedraw() from /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so+0x51
#42  0x7f3d99fd6ba1 in Gui::View3DInventorViewer::renderScene() from /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so+0x2ab
#43  0x7f3d99fd6450 in Gui::View3DInventorViewer::actualRedraw() from /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so+0x32
#44  0x7f3d99f9bc9e in SIM::Coin3D::Quarter::QuarterWidget::paintEvent(QPaintEvent*) from /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so+0x19c
#45  0x7f3d91e7fe80 in QWidget::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x290
#46  0x7f3d92244c8e in QFrame::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x1e
#47  0x7f3d92472b74 in QGraphicsView::viewportEvent(QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x184
#48  0x7f3d99f9be6e in SIM::Coin3D::Quarter::QuarterWidget::viewportEvent(QEvent*) from /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so+0x13c
#49  0x7f3d913630a1 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x91
#50  0x7f3d91e2952c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x6c
#51  0x7f3d91e3052c in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x2cc
#52  0x7f3d99d26b4d in Gui::GUIApplication::notify(QObject*, QEvent*) from /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so+0xff
#53  0x7f3d91362f1d in QCoreApplication::notifyInternal(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x8d
#54  0x7f3d91e7a4e5 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x605
#55  0x7f3d9204881d in QWidgetPrivate::repaint_sys(QRegion const&) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x16d
#56  0x7f3d91e6d177 in QWidgetPrivate::syncBackingStore() from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x37
#57  0x7f3d91e7ff68 in QWidget::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x378
#58  0x7f3d950947b3 in QGLWidget::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4+0x43
#59  0x7f3d91e2954c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x8c
#60  0x7f3d91e3052c in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x2cc
#61  0x7f3d99d26b4d in Gui::GUIApplication::notify(QObject*, QEvent*) from /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so+0xff
#62  0x7f3d91362f1d in QCoreApplication::notifyInternal(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x8d
#63  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x3e6e9c) [0x7f3d9204be9c]
#64  0x7f3d91e6fa65 in QWidget::repaint(QRect const&) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x95
#65  0x7f3d91e6fac3 in QWidget::repaint() from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x43
#66  0x7f3d99f9be9c in SIM::Coin3D::Quarter::QuarterWidget::redraw() from /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so+0x2c
#67  0x7f3d99f9e37e in SIM::Coin3D::Quarter::QuarterWidgetP::rendercb(void*, SoRenderManager*) from /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so+0x34
#68  0x7f3d971972f7 in SoSensorManager::processDelayQueue(int) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x417
#69  0x7f3d97196082 in SoSensorManager::processTimerQueue() from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x152
#70  0x7f3d99fa19fd in SIM::Coin3D::Quarter::SensorManager::idleTimeout() from /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so+0x19
#71  /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so(+0x9cb9c9) [0x7f3d99fa49c9]
#72  0x7f3d91377660 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x4d0
#73  0x7f3d9137d253 in QObject::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0xa3
#74  0x7f3d91e2954c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x8c
#75  0x7f3d91e3052c in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x2cc
#76  0x7f3d99d26b4d in Gui::GUIApplication::notify(QObject*, QEvent*) from /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so+0xff
#77  0x7f3d91362f1d in QCoreApplication::notifyInternal(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x8d
#78  /usr/lib/x86_64-linux-gnu/libQtCore.so.4(+0x1bdce0) [0x7f3d91395ce0]
#79  /usr/lib/x86_64-linux-gnu/libQtCore.so.4(+0x1baee1) [0x7f3d91392ee1]
#80  /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2a7) [0x7f3d88f6a7f7]
#81  /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4aa60) [0x7f3d88f6aa60]
#82  /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7f3d88f6ab0c]
#83  0x7f3d91393854 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x64
#84  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x26e5d6) [0x7f3d91ed35d6]
#85  0x7f3d913617ef in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x3f
#86  0x7f3d91361b55 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x1b5
#87  0x7f3d91367bd9 in QCoreApplication::exec() from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x99
#88  0x7f3d99cbd25b in Gui::Application::runApplication() from /home/det/Schreibtisch/soft/FreeCADdev/build/lib/libFreeCADGui.so+0x1e0b
#89  ./FreeCAD(main+0x8b4) [0x555bfa9100ce]
#90  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f3d8fc542b1]
#91  ./FreeCAD(_start+0x2a) [0x555bfa90f69a]
Attachments
Zahnriemenscheibe-HTD-60-3M-09.fcstd
(8.43 KiB) Downloaded 7 times
detlet
Posts: 67
Joined: Sun Sep 25, 2011 5:54 pm
Location: Lauenstein, Germany

Re: Segmentation fault in Part::Desing rotate sketch

Postby detlet » Mon Mar 20, 2017 5:15 pm

The problem remains for me also with a new build of the current git master.
To get around it, it helped, to first remove the "point on object" constraint, move the left-most vertical line a little bit, rotate the sketch and than re-add the "point on object" constraint.
DeepSOIC
Posts: 4689
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Segmentation fault in Part::Desing rotate sketch

Postby DeepSOIC » Mon Mar 20, 2017 8:25 pm

Hi!
I recommend you switch the language of FreeCAD to English, because your post title is a bit confusing. If you use English interface, you would have typed something with the word "Revolution", and we'd got better understanding of what you do.

Now to the problem. I have no crash here, all works fine:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10490 (Git)
Build type: Release
Branch: master
Hash: 378f99f1b318202db3bc89b45d691a0376d07512
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Attachments
revolution horz sketch axis.png
revolution horz sketch axis.png (228.14 KiB) Viewed 117 times
User avatar
NormandC
Posts: 12278
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Segmentation fault in Part::Desing rotate sketch

Postby NormandC » Tue Mar 21, 2017 1:52 am

No crash on the following versions:

(self-compiled)
OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10473 (Git)
Build type: Unknown
Branch: master
Hash: 78b986a2657b7de79b6e350a2535dc0fbfe3f1cf
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17


(freecad-daily PPA)
OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10540 (Git)
Build type: None
Branch: master
Hash: 2c9d5e30108a2a34a7f11cfad3d9c323e5577ce1
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0