View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002816 | PartDesign | Bug | public | 2016-12-10 15:59 | 2017-01-23 18:10 |
Reporter | VictorLamoine | Assigned To | wmayer | ||
Priority | high | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
OS | Ubuntu | OS Version | 16.04 | ||
Product Version | 0.16 | ||||
Fixed in Version | 0.17 | ||||
Summary | 0002816: Trimming tool crashes | ||||
Description | victor@desktop:~$ freecad FreeCAD 0.16, Libs: 0.16R6707 (Git) © Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2015 ##### #### ### #### # # # # # # # ## #### #### # # # # # #### # # # # # # # ##### # # # # #### #### # # # # # # # # # # # # # # ## ## ## # # #### #### ### # # #### ## ## ## freecad: SoGroup.cpp:292: virtual SoNode* SoGroup::getChild(int) const: Assertion `(index >= 0) && (index < this->getNumChildren())' failed. Aborted (core dumped) | ||||
Steps To Reproduce | Edit Sketch001 Trim the outer circle right side Trim the left (small) circle right side Trim the outer circle part included in the left (small circle) FreeCAD segfaults on the last operation. | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
|
|
|
I can't reproduce on OS: Ubuntu 14.04.5 LTS Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.16.6707 (Git) Build type: None Branch: releases/FreeCAD-0-16 Hash: 5465bc47c95db45e0be85dc0e2872419efadce0f Python version: 2.7.6 Qt version: 4.8.6 Coin version: 4.0.0a OCC version: 6.8.0.oce-0.17 But haven't you noticed that your Sketch001 is over-constrained? The Solver messages box indicates that Constraint10 should be deleted. Please do so and check if you still have the crash. |
|
Well after deleting Constraint10, the sketch is not over-constrained anymore. But after that, as soon as I do step Nº 2, FreeCAD crashes. A backtrace (http://www.freecadweb.org/wiki/index.php?title=Debugging) gives the following: --- Program received signal SIGSEGV, Segmentation fault. 0x00007fff5a9a0be1 in Sketcher::PropertyConstraintList::getConstraintName(std::string const&, int) () from /usr/lib/freecad/lib/Sketcher.so --- I think compiling a Debug build would be required to get more info. |
|
Ubuntu 16.04 freecad b97f93c5a806814d3f24ab95be500121d72fa765 VTK 7.0.0 Thread 1 "FreeCAD" received signal SIGSEGV, Segmentation fault. 0x00007ffff43e2240 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::empty() const () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (gdb) bt #0 0x00007ffff43e2240 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::empty() const () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #1 0x00007fff6ae85f1c in Sketcher::PropertyConstraintList::getConstraintName (name=<error reading variable: Cannot access memory at address 0x20>, i=7) at /home/victor/libraries/freecad/src/src/Mod/Sketcher/App/PropertyConstraintList.cpp:391 0000002 0x00007fff58f899b0 in ConstraintItem::data (this=0x21950e0, role=0) at /home/victor/libraries/freecad/src/src/Mod/Sketcher/Gui/TaskSketcherConstrains.cpp:112 0000003 0x00007ffff52a18b6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 0000004 0x00007ffff47e5010 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 0000005 0x00007ffff528f1ca in QItemSelectionModel::currentChanged(QModelIndex const&, QModelIndex const&) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 0000006 0x00007ffff5293427 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 0000007 0x00007ffff5296569 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 0000008 0x00007ffff47e5010 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 0000009 0x00007ffff4835594 in QAbstractItemModel::rowsAboutToBeRemoved(QModelIndex const&, int, int) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 0000010 0x00007ffff47c6c65 in QAbstractItemModel::beginRemoveRows(QModelIndex const&, int, int) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 0000011 0x00007ffff52a2524 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 0000012 0x00007ffff52a2605 in QListWidget::takeItem(int) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 0000013 0x00007fff58f87737 in SketcherGui::TaskSketcherConstrains::slotConstraintsChanged (this=0x533e5c0) at /home/victor/libraries/freecad/src/src/Mod/Sketcher/Gui/TaskSketcherConstrains.cpp:708 0000014 0x00007fff58f8e605 in boost::_mfi::mf0<void, SketcherGui::TaskSketcherConstrains>::operator() (this=0x53314d0, p=0x533e5c0) at /usr/include/boost/bind/mem_fn_template.hpp:49 0000015 0x00007fff58f8e394 in boost::_bi::list1<boost::_bi::value<SketcherGui::TaskSketcherConstrains*> >::operator()<boost::_mfi::mf0<void, SketcherGui::TaskSketcherConstrains>, boost::_bi::list0> ( this=0x53314e0, f=..., a=...) at /usr/include/boost/bind/bind.hpp:253 0000016 0x00007fff58f8e0d4 in boost::_bi::bind_t<void, boost::_mfi::mf0<void, SketcherGui::TaskSketcherConstrains>, boost::_bi::list1<boost::_bi::value<SketcherGui::TaskSketcherConstrains*> > >::operator() ( this=0x53314d0) at /usr/include/boost/bind/bind.hpp:893 0000017 0x00007fff58f8deb8 in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf0<void, SketcherGui::TaskSketcherConstrains>, boost::_bi::list1<boost::_bi::value<SketcherGui::TaskSketcherConstrains*> > >, void>::invoke (function_obj_ptr=...) at /usr/include/boost/function/function_template.hpp:159 0000018 0x00007ffff7246521 in boost::function0<void>::operator() (this=0x53314c8) at /usr/include/boost/function/function_template.hpp:773 0000019 0x00007ffff6775ff8 in boost::signals::detail::call_bound0<void>::caller<boost::function<void ()> >::operator()<boost::signals::detail::connection_slot_pair>(boost::signals::detail::connection_slot_pair const&) const (this=0x7fffffff92d0, slot=...) at /usr/include/boost/signals/signal_template.hpp:118 0000020 0x00007ffff677517a in boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound0<void>::caller<boost::function<void ()> >, boost::signals::detail::named_slot_map_iterator>::dereference() const (this=0x7fffffff9290) at /usr/include/boost/signals/detail/slot_call_iterator.hpp:61 0000021 0x00007ffff6773fc4 in boost::iterators::iterator_core_access::dereference<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound0<void>::caller<boost::function<void ()> >, boost:---Type <return> to continue, or q <return> to quit--- |
|
I experienced sporadic crashes while trimming circles, but today in a simple demo I experience other malfunction - wrong arcs disappears or appears removed arcs or arc is not removed like in the attached file. OS: Ubuntu 14.04.3 LTS Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.16.6707 (Git) Build type: None Branch: releases/FreeCAD-0-16 Hash: 5465bc47c95db45e0be85dc0e2872419efadce0f Python version: 2.7.6 Qt version: 4.8.6 Coin version: 4.0.0a OCC version: 6.8.0.oce-0.17 Another case: 1 create 2 circles with difference radius one inside the other (common center doesn't matter) 2 create third circle with its center between 2 circles above 3 trim inside arcs from left side counter clock wise 4 outcome varies but it always wrong (after 3rd arc - consequent arc of the same circle disappears) I recorded a macro to reproduce use case above: # -*- coding: utf-8 -*- # Macro Begin: /home/egnyte/demo/freecad/macro/trimBug.FCMacro +++++++++++++++++++++++++++++++++++++++++++++++++ import FreeCAD import Sketcher App.ActiveDocument.Sketch.addGeometry(Part.Circle(App.Vector(-60.776348,29.000000,0),App.Vector(0,0,1),24.450798),False) App.ActiveDocument.recompute() App.ActiveDocument.Sketch.addGeometry(Part.Circle(App.Vector(-60.483448,28.704008,0),App.Vector(0,0,1),18.345344),False) App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',1,3,0,3)) App.ActiveDocument.recompute() App.ActiveDocument.Sketch.addGeometry(Part.Circle(App.Vector(-39.000000,28.000000,0),App.Vector(0,0,1),13.995712),False) App.ActiveDocument.recompute() App.ActiveDocument.Sketch.trim(1,App.Vector(-42.000000,28.704008,0)) App.ActiveDocument.recompute() App.ActiveDocument.Sketch.trim(2,App.Vector(-43.495361,15.000000,0)) App.ActiveDocument.recompute() App.ActiveDocument.Sketch.trim(0,App.Vector(-37.000000,20.502863,0)) App.ActiveDocument.recompute() # Macro End: /home/egnyte/demo/freecad/macro/trimBug.FCMacro +++++++++++++++++++++++++++++++++++++++++++++++++ |
|
|
|
Forum thread: http://forum.freecadweb.org/viewtopic.php?f=10&t=19884 |
|
It was a not a documented behaviour of the class PropertyConstraintList to return a null pointer in case the sketch geometry is invalid. Thus the returned value wasn't checked for this and so later the null pointer has been dereferenced and caused the segmentation fault. |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-12-10 15:59 | VictorLamoine | New Issue | |
2016-12-10 15:59 | VictorLamoine | File Added: stepper_motor.fcstd | |
2016-12-16 02:41 | normandc | Note Added: 0007523 | |
2016-12-16 02:47 | normandc | Note Added: 0007524 | |
2016-12-16 11:18 | VictorLamoine | Note Added: 0007528 | |
2016-12-16 11:40 | VictorLamoine | Note Edited: 0007528 | |
2016-12-27 06:28 | dyaitskov | Note Added: 0007551 | |
2016-12-27 06:28 | dyaitskov | File Added: cut2.fcstd | |
2016-12-27 06:41 | dyaitskov | Note Edited: 0007551 | |
2016-12-27 06:41 | dyaitskov | Note Edited: 0007551 | |
2016-12-27 06:45 | dyaitskov | Note Edited: 0007551 | |
2016-12-27 15:13 | normandc | Note Edited: 0007524 | |
2017-01-14 12:40 | Kunda1 | Note Added: 0007759 | |
2017-01-23 18:07 | wmayer | Changeset attached | => FreeCAD Master master 43e8c217 |
2017-01-23 18:10 | wmayer | Note Added: 0007919 | |
2017-01-23 18:10 | wmayer | Status | new => closed |
2017-01-23 18:10 | wmayer | Assigned To | => wmayer |
2017-01-23 18:10 | wmayer | Resolution | open => fixed |
2017-01-23 18:10 | wmayer | Fixed in Version | => 0.17 |