Crash Bug #2499 [Sketcher] Crash on cloning operations

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Crash Bug #2499 [Sketcher] Crash on cloning operations

Post by Kunda1 »

issue #2499: [Sketcher] Crash on cloning operations
Description
The application crashes when trying to clone an object onto a specified location (point lock).
I am using hexagon objects to create honeycomb patterns.

Steps To Reproduce
From the sketch in the attached file, select internal hexagon (select the entire region), then choose the cloning tool and choose as the point to clone onto any of the vertices of the outer construction line hexagon. The application gets killed.

Observation. If I clone the same objetc onto a nearbye point and than constrain the center point of the two objects to a coincidence point the operation succeeds and I can change the constraints without problems.

Additional Information
OS: "openSUSE Leap 42.1 (x86_64)"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6698 (Git)
Build type: Unknown
Branch: master
Hash: ca7c5d31a4d61f32a25b71025b14641a6e378328
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17-dev
Stacktrace:

Code: Select all

FreeCAD: SoGroup.cpp:292: virtual SoNode* SoGroup::getChild(int) const: Assertion `(index >= 0) && (index < this->getNumChildren())' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff3faccc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff3faccc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff3fb00d8 in __GI_abort () at abort.c:89
#2  0x00007ffff3fa5b86 in __assert_fail_base (fmt=0x7ffff40f6830 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7ffff3b527a0 "(index >= 0) && (index < this->getNumChildren())", 
    file=file@entry=0x7ffff3b52622 "SoGroup.cpp", line=line@entry=292, function=function@entry=0x7ffff3b52a20 "virtual SoNode* SoGroup::getChild(int) const") at assert.c:92
#3  0x00007ffff3fa5c32 in __GI___assert_fail (assertion=0x7ffff3b527a0 "(index >= 0) && (index < this->getNumChildren())", file=0x7ffff3b52622 "SoGroup.cpp", line=292, 
    function=0x7ffff3b52a20 "virtual SoNode* SoGroup::getChild(int) const") at assert.c:101
#4  0x00007ffff38f4fd7 in SoGroup::getChild(int) const () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#5  0x00007fff51f5b205 in SketcherGui::ViewProviderSketch::drawConstraintIcons (this=0x269a7c0) at /home/tomek/GSOC/FreeCAD/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp:2531
#6  0x00007fff51f4f4e2 in SketcherGui::ViewProviderSketch::mouseMove (this=0x269a7c0, cursorPos=..., viewer=0x20d5dc0) at /home/tomek/GSOC/FreeCAD/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp:1025
#7  0x00007ffff754e46a in Gui::ViewProvider::eventCallback (ud=0x269a7c0, node=0x2163070) at /home/tomek/GSOC/FreeCAD/src/Gui/ViewProvider.cpp:195
#8  0x00007ffff38ea95b in SoEventCallback::handleEvent(SoHandleEventAction*) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#9  0x00007ffff38fec0c in SoNode::handleEventS(SoAction*, SoNode*) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#10 0x00007ffff36c4c04 in SoAction::traverse(SoNode*) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#11 0x00007ffff3814294 in SoChildList::traverse(SoAction*, int, int) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#12 0x00007ffff38f466f in SoGroup::doAction(SoAction*) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#13 0x00007ffff39116d7 in SoSeparator::doAction(SoAction*) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#14 0x00007ffff7479fd5 in Gui::SoFCUnifiedSelection::handleEvent (this=0x2031960, action=0x16996d0) at /home/tomek/GSOC/FreeCAD/src/Gui/SoFCUnifiedSelection.cpp:323
#15 0x00007ffff38fec0c in SoNode::handleEventS(SoAction*, SoNode*) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#16 0x00007ffff36c4c04 in SoAction::traverse(SoNode*) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#17 0x00007ffff3814294 in SoChildList::traverse(SoAction*, int, int) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#18 0x00007ffff38f466f in SoGroup::doAction(SoAction*) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#19 0x00007ffff39116d7 in SoSeparator::doAction(SoAction*) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#20 0x00007ffff38fec0c in SoNode::handleEventS(SoAction*, SoNode*) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#21 0x00007ffff36c4c04 in SoAction::traverse(SoNode*) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#22 0x00007ffff36cf1aa in SoHandleEventAction::beginTraversal(SoNode*) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#23 0x00007ffff36c57d2 in SoAction::apply(SoNode*) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#24 0x00007ffff38320a9 in SoEventManager::actuallyProcessEvent(SoEvent const*) () from /usr/lib/x86_64-linux-gnu/libCoin.so.80
#25 0x00007ffff74ee162 in SIM::Coin3D::Quarter::QuarterWidget::processSoEvent (this=0x20d5dc0, event=0x1803840) at /home/tomek/GSOC/FreeCAD/src/Gui/Quarter/QuarterWidget.cpp:850
#26 0x00007ffff74ec2ac in SIM::Coin3D::Quarter::SoQTQuarterAdaptor::processSoEvent (this=0x20d5dc0, event=0x1803840) at /home/tomek/GSOC/FreeCAD/src/Gui/Quarter/SoQTQuarterAdaptor.cpp:688
#27 0x00007ffff752a151 in Gui::View3DInventorViewer::processSoEventBase (this=0x20d5dc0, ev=0x1803840) at /home/tomek/GSOC/FreeCAD/src/Gui/View3DInventorViewer.cpp:1611
#28 0x00007ffff75060e3 in Gui::NavigationStyle::processSoEvent (this=0x2161140, ev=0x1803840) at /home/tomek/GSOC/FreeCAD/src/Gui/NavigationStyle.cpp:1380
#29 0x00007ffff750c953 in Gui::CADNavigationStyle::processSoEvent (this=0x2161140, ev=0x1803840) at /home/tomek/GSOC/FreeCAD/src/Gui/CADNavigationStyle.cpp:457
#30 0x00007ffff7506034 in Gui::NavigationStyle::processEvent (this=0x2161140, ev=0x1803840) at /home/tomek/GSOC/FreeCAD/src/Gui/NavigationStyle.cpp:1362
#31 0x00007ffff752a121 in Gui::View3DInventorViewer::processSoEvent (this=0x20d5dc0, ev=0x1803840) at /home/tomek/GSOC/FreeCAD/src/Gui/View3DInventorViewer.cpp:1606
#32 0x00007ffff74f1efd in SIM::Coin3D::Quarter::EventFilter::eventFilter (this=0x2159c70, obj=0x20d5dc0, qevent=0x7fffffffc3d0) at /home/tomek/GSOC/FreeCAD/src/Gui/Quarter/EventFilter.cpp:164
#33 0x00007ffff49d2646 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#34 0x00007ffff4f03e0c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#35 0x00007ffff4f0a5dd in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#36 0x00007ffff729a069 in Gui::GUIApplication::notify (this=0x7fffffffd3f0, receiver=0x18774b0, event=0x7fffffffc830) at /home/tomek/GSOC/FreeCAD/src/Gui/GuiApplication.cpp:82
#37 0x00007ffff49d24dd in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#38 0x00007ffff4f09d93 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#39 0x00007ffff4f7e9eb in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#40 0x00007ffff4f7e289 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#41 0x00007ffff4fa5b32 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#42 0x00007fffedee9e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007fffedeea048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007fffedeea0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007ffff49ff7a1 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#46 0x00007ffff4fa5be6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#47 0x00007ffff49d10af in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#48 0x00007ffff49d13a5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#49 0x00007ffff49d6b79 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#50 0x00007ffff7238ea5 in Gui::Application::runApplication () at /home/tomek/GSOC/FreeCAD/src/Gui/Application.cpp:1810
#51 0x0000000000407382 in main (argc=1, argv=0x7fffffffdda8) at /home/tomek/GSOC/FreeCAD/src/Main/MainGui.cpp:235
Last edited by Kunda1 on Tue Feb 07, 2017 2:47 am, edited 1 time in total.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #2499 [Sketcher] Crash on cloning operations

Post by Kunda1 »

hinckel wrote: One more curiosity about the behavior of the cloned object. If I select the interior hexagon and then clone it onto a point located far from the vertex of the outer hexagon such that the cloned object does not intersect the vertex or arest of the outer hexagon and then apply the point constraint to the center point of the cloned hexagon and the vertex of the outer hexagon the construction circle get moved to the right position but the hexagon apparently collpses to a single point.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Pintuxgu
Posts: 25
Joined: Sat Oct 07, 2017 11:18 am

Re: Crash Bug #2499 [Sketcher] Crash on cloning operations

Post by Pintuxgu »

Found this bug while searching the forum for "SoGroup.cpp:292".
I found a bug which is probably the same / similar.

On my system FreeCAD crashes each time I delete the inner circle (Radius 23) in my sketch.

Code: Select all

pintuxgu@dualcore ~/projects/freecad/robotarm/pols_Robot_2017-10-04 $ freecad FreeCAD_Radius_23_Delete_Bug_2017-10-38T11\:38.fcstd 
FreeCAD 0.16, Libs: 0.16R6712 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2015
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Fasteners workbench Loaded
freecad: SoGroup.cpp:292: virtual SoNode* SoGroup::getChild(int) const: Assertion `(index >= 0) && (index < this->getNumChildren())' failed.
Aborted

Code: Select all

OS: Linux Mint 17.3 Rosa
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6712 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: da2d364457257a7a8c6fb2137cea12c45becd71a
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Having some trouble attaching the file (I'm new on this forum, just created 2 accounts 1 for the forum, one for the bugtracker).

Code: Select all

Error
FreeCAD_Radius_23_Delete_Bug_2017-10-38T11:38.fcstd is an invalid filename.
Attachments
20171038T1138.fcstd
Changed Filename
(13.15 KiB) Downloaded 44 times
Post Reply