View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001720 | FreeCAD | Bug | public | 2014-08-31 15:52 | 2014-12-28 16:39 |
Reporter | renn0xtek9 | Assigned To | wmayer | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Linux 32 bit | OS | Kubuntu | OS Version | 14.04 w |
Product Version | 0.14 | ||||
Summary | 0001720: Freecad crash when handling invalid sketches | ||||
Description | (removed useless stacktrace) | ||||
Steps To Reproduce | Create an empty part in partDesign mode Execure the macro above | ||||
Additional Information | It most likely fails in the last part of the macro | ||||
Tags | sketcher | ||||
FreeCAD Information | |||||
|
This is probably not be a bug in FreeCAD but in your macro. Can you attach it here? |
|
and please provide the first part of the backtrace |
|
|
|
Macro and backtrace are in the file I have just attached |
|
i can reproduce the problem the offending line is profil_plateau.addConstraint(Sketcher.Constraint('Coincident',0+numb,2+numb,1+numb,1+numb)) FreeCAD should not crash. Maybe we should raise an exception instead of an __assert_fail But you should save and use the geomIds returned by the addGeometry calls. |
|
When i skip the assertion i get a new problem when i try to edit the resulting sketch. After entering edit mode an zooming out, i hit a SIGSEGV (gdb) bt #0 0x00007fff76f04ac6 in SketcherGui::ViewProviderSketch::updateColor (this= 0x43e2c80) at free-cad/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp:1975 #1 0x00007fff76f004b0 in SketcherGui::ViewProviderSketch::onSelectionChanged ( this=0x43e2c80, msg=...) at free-cad/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp:1459 0000002 0x00007ffff773a3ce in boost::_mfi::mf1<void, Gui::SelectionObserver, Gui::SelectionChanges const&>::operator() (this=0x43f1440, p=0x43e3280, a1=...) at build/boost_1_56_0/boost/bind/mem_fn_template.hpp:165 0000003 0x00007ffff7739ed0 in boost::_bi::list2<boost::_bi::value<Gui::SelectionObserver*>, boost::arg<1> >::operator()<boost::_mfi::mf1<void, Gui::SelectionObserver, Gui::SelectionChanges const&>, boost::_bi::list1<Gui::SelectionChanges const&> > (this=0x43f1450, f=..., a=...) at build/boost_1_56_0/boost/bind/bind.hpp:313 0000004 0x00007ffff77396e0 in boost::_bi::bind_t<void, boost::_mfi::mf1<void, Gui::SelectionObserver, Gui::SelectionChanges const&>, boost::_bi::list2<boost::_bi::value<Gui::SelectionObserver*>, boost::arg<1> > >::operator()<Gui::SelectionChanges> (this=0x43f1440, a1=...) at build/boost_1_56_0/boost/bind/bind_template.hpp:47 0000005 0x00007ffff7738a48 in boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, boost::_mfi::mf1<void, Gui::SelectionObserver, Gui::Selec- tionChanges const&>, boost::_bi::list2<boost::_bi::value<Gui::SelectionObserver*>, boost::arg<1> > >, void, Gui::SelectionChanges const&>::invoke ( function_obj_ptr=..., a0=...) at build/boost_1_56_0/boost/function/function_template.hpp:153 0000006 0x00007ffff773a865 in boost::function1<void, Gui::SelectionChanges const&>::operator() (this=0x43f1438, a0=...) at build/boost_1_56_0/boost/function/function_template.hpp:767 (gdb) frame #0 0x00007fff76f04ac6 in SketcherGui::ViewProviderSketch::updateColor (this= 0x43e2c80) at free-cad/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp:1975 1975 int GeoId = edit->CurvIdToGeoId[i]; (gdb) p i $4 = 0 (gdb) p edit->CurvIdToGeoId $6 = std::vector of length 0, capacity 0 |
|
|
|
I modified your script to work, without crashing FreeCAD |
FreeCAD: master 7d8b1f30 2014-12-28 17:10:54 Details Diff |
+ fixes 0001720: Freecad crash when handling invalid sketches |
Affected Issues 0001720 |
|
mod - src/Mod/Sketcher/App/SketchObject.cpp | Diff File | ||
mod - src/Mod/Sketcher/App/SketchObject.h | Diff File | ||
mod - src/Mod/Sketcher/App/SketchObjectPyImp.cpp | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-08-31 15:52 | renn0xtek9 | New Issue | |
2014-08-31 16:57 | yorik | Note Added: 0005034 | |
2014-08-31 17:13 | shoogen | Note Added: 0005035 | |
2014-08-31 18:57 | renn0xtek9 | File Added: freecadbug.txt | |
2014-08-31 18:57 | renn0xtek9 | Note Added: 0005038 | |
2014-08-31 20:49 | shoogen | Tag Attached: sketcher | |
2014-09-19 09:37 | shoogen | Note Added: 0005131 | |
2014-09-19 09:38 | shoogen | Note Edited: 0005131 | |
2014-09-19 10:49 | shoogen | Note Added: 0005132 | |
2014-09-19 10:50 | shoogen | Description Updated | |
2014-09-19 10:51 | shoogen | Status | new => acknowledged |
2014-09-19 10:51 | shoogen | Summary | Freecad crash when executing a very small macros => Freecad crash when handling invalid sketches |
2014-09-20 09:49 | shoogen | File Added: sketcher.py | |
2014-09-20 09:50 | shoogen | Note Added: 0005135 | |
2014-09-20 10:02 | shoogen | Relationship added | related to 0001759 |
2014-12-28 11:23 | shoogen | Relationship added | related to 0001060 |
2014-12-28 16:39 | wmayer | Changeset attached | => FreeCAD Master master 7d8b1f30 |
2014-12-28 16:39 | wmayer | Assigned To | => wmayer |
2014-12-28 16:39 | wmayer | Status | acknowledged => closed |
2014-12-28 16:39 | wmayer | Resolution | open => fixed |