View Issue Details

IDProjectCategoryView StatusLast Update
0002819SketcherBugpublic2016-12-23 09:09
Reportertonyt Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionno change required 
Platformx64OSLinuxOS VersionUbuntu 14.04.5
Product Version0.17 
Fixed in Version0.17 
Summary0002819: Using expressions in a constraint results in segfault
DescriptionImmediately after entering the name of a spreadsheet alias in a sketch constraint, FreeCAD crashes with a segmentation fault.
Steps To Reproduce1. Create a spreadsheet in FreeCAD
2. Add a value to the spreadsheet and create an alias (test1) for the cell
3. Create a sketch
4. Draw a line in the sketch
5. Add a length/width/etc constraint and click the "F(x)" button.
6. Add a reference to the spreadsheet cell (spreadsheet.test1)
7. Upon typing the last character of the alias, FreeCAD crashes with a segmentation fault.

Expressions like "pi" in the function input box evaluate correctly on the fly (3.14) but also cause a segmentation fault after clicking "OK"
Additional InformationThanks for the great work! It would be really nice to have tab-completion in expressions.

Latest tested version:
OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9281 (Git)
Build type: Release
Branch: master
Hash: 101d280f6ac28994480b3c09e8761a07f7d5a717
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.1.dev


FreeCAD was built from main git tree and these builds were also tested:
https://github.com/FreeCAD/FreeCAD/commit/59987231ae087f620d00d63f3e4df07ce38b82cf
https://github.com/FreeCAD/FreeCAD/commit/9a285fdb8b400c59b912a66e78ee1b07adfd7542
TagsNo tags attached.
FreeCAD Information

Relationships

related to 0002820 closed FreeCAD Expressions in every properties crash 

Activities

tonyt

2016-12-20 20:46

reporter  

freecadStackTrace.txt (21,926 bytes)   
#149461 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x4575318, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149462 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x4575310, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149463 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x440afe8, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149464 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x440afe0, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149465 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x4574228, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149466 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x4574220, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149467 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x4574eb8, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149468 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x4574eb0, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149469 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x3e1de68, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149470 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x3e1de60, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149471 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x3e1ffa8, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149472 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x3e1ffa0, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149473 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x45745f8, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149474 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x45745f0, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149475 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x4269208, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149476 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x4269200, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149477 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x4574908, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149478 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x4574900, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149479 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x4388588, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149480 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x4388580, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149481 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x3e12188, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149482 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x3e12180, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149483 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x39b4aa8, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149484 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x39b4aa0, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149485 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x432b8e8, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149486 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x432b8e0, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149487 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x43f6208, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149488 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x43f6200, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149489 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x45750c8, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149490 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x45750c0, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149491 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x4582ee8, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
#149492 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x4582ee0, 
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175
#149493 0x00007ffff67337d7 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x7fffffffaec0, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>)
    at /usr/include/boost/any.hpp:72
#149494 0x00007ffff67b7e88 in App::PropertyExpressionEngine::getPathValue (this=0x41e6798, path=...)
    at /usr/src/FreeCAD/src/App/PropertyExpressionEngine.cpp:334
#149495 0x00007ffff66f11a2 in App::DocumentObject::getExpression (this=0x41e6740, path=...) at /usr/src/FreeCAD/src/App/DocumentObject.cpp:332
#149496 0x00007ffff7255d98 in Gui::ExpressionBinding::getExpression (this=0x22e0208) at /usr/src/FreeCAD/src/Gui/ExpressionBinding.cpp:105
#149497 0x00007ffff758a929 in Gui::QuantitySpinBox::onChange (this=0x22e01e0) at /usr/src/FreeCAD/src/Gui/QuantitySpinBox.cpp:291
#149498 0x00007ffff7256734 in Gui::ExpressionBinding::expressionChange (this=0x22e0208, id=...) at /usr/src/FreeCAD/src/Gui/ExpressionBinding.cpp:191
#149499 0x00007ffff7258d4e in boost::_mfi::mf1<void, Gui::ExpressionBinding, App::ObjectIdentifier const&>::operator() (this=0x3e18280, p=0x22e0208, 
    a1=...) at /usr/include/boost/bind/mem_fn_template.hpp:165
#149500 0x00007ffff7258a88 in boost::_bi::list2<boost::_bi::value<Gui::ExpressionBinding*>, boost::arg<1> >::operator()<boost::_mfi::mf1<void, Gui::ExpressionBinding, App::ObjectIdentifier const&>, boost::_bi::list1<App::ObjectIdentifier const&> > (this=0x3e18290, f=..., a=...)
    at /usr/include/boost/bind/bind.hpp:313
---Type <return> to continue, or q <return> to quit---
#149501 0x00007ffff7258876 in boost::_bi::bind_t<void, boost::_mfi::mf1<void, Gui::ExpressionBinding, App::ObjectIdentifier const&>, boost::_bi::list2<boost::_bi::value<Gui::ExpressionBinding*>, boost::arg<1> > >::operator()<App::ObjectIdentifier> (this=0x3e18280, a1=...)
    at /usr/include/boost/bind/bind_template.hpp:47
#149502 0x00007ffff7258714 in boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, boost::_mfi::mf1<void, Gui::ExpressionBinding, App::ObjectIdentifier const&>, boost::_bi::list2<boost::_bi::value<Gui::ExpressionBinding*>, boost::arg<1> > >, void, App::ObjectIdentifier const&>::invoke (
    function_obj_ptr=..., a0=...) at /usr/include/boost/function/function_template.hpp:153
#149503 0x00007ffff67cbf81 in boost::function1<void, App::ObjectIdentifier const&>::operator() (this=0x3e18278, a0=...)
    at /usr/include/boost/function/function_template.hpp:767
#149504 0x00007ffff67cb204 in boost::signals::detail::call_bound1<void>::caller<App::ObjectIdentifier const&, boost::function<void (App::ObjectIdentifier const&)> >::operator()<boost::signals::detail::connection_slot_pair>(boost::signals::detail::connection_slot_pair const&) const (this=0x7fffffffb500, 
    slot=...) at /usr/include/boost/signals/signal_template.hpp:119
#149505 0x00007ffff67c97ae in boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<App::ObjectIdentifier const&, boost::function<void (App::ObjectIdentifier const&)> >, boost::signals::detail::named_slot_map_iterator>::dereference() const (this=0x7fffffffb4c0)
    at /usr/include/boost/signals/detail/slot_call_iterator.hpp:61
#149506 0x00007ffff67c7b00 in boost::iterator_core_access::dereference<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<App::ObjectIdentifier const&, boost::function<void (App::ObjectIdentifier const&)> >, boost::signals::detail::named_slot_map_iterator> >(boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<App::ObjectIdentifier const&, boost::function<void (App::ObjectIdentifier const&)> >, boost::signals::detail::named_slot_map_iterator> const&) (f=...) at /usr/include/boost/iterator/iterator_facade.hpp:514
#149507 0x00007ffff67c4dde in boost::iterator_facade<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<App::ObjectIdentifier const&, boost::function<void (App::ObjectIdentifier const&)> >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::single_pass_traversal_tag, boost::signals::detail::unusable const&, long>::operator*() const (this=0x7fffffffb4c0)
    at /usr/include/boost/iterator/iterator_facade.hpp:639
#149508 0x00007ffff67c1480 in boost::detail::postfix_increment_proxy<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<App::ObjectIdentifier const&, boost::function<void (App::ObjectIdentifier const&)> >, boost::signals::detail::named_slot_map_iterator> >::postfix_increment_proxy(boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<App::ObjectIdentifier const&, boost::function<void (App::ObjectIdentifier const&)> >, boost::signals::detail::named_slot_map_iterator> const&) (this=0x7fffffffb38f, x=...)
    at /usr/include/boost/iterator/iterator_facade.hpp:145
#149509 0x00007ffff67be6f5 in boost::operator++<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<App::ObjectIdentifier const&, boost::function<void (App::ObjectIdentifier const&)> >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::single_pass_traversal_tag, boost::signals::detail::unusable const&, long>(boost::iterator_facade<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<App::ObjectIdentifier const&, boost::function<void (App::ObjectIdentifier const&)> >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::single_pass_traversal_tag, boost::signals::detail::unusable const&, long>&, int) (i=...)
    at /usr/include/boost/iterator/iterator_facade.hpp:728
#149510 0x00007ffff67bc89d in boost::last_value<void>::operator()<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<App::ObjectIdentifier const&, boost::function<void (App::ObjectIdentifier const&)> >, boost::signals::detail::named_slot_map_iterator> >(boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<App::ObjectIdentifier const&, boost::function<void (App::ObjectIdentifier const&)> >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<App::ObjectIdentifier const&, boost::function<void (App::ObjectIdentifier const&)> >, boost::signals::detail::named_slot_map_iterator>) const (this=0x41e6588, 
    first=..., last=...) at /usr/include/boost/last_value.hpp:49
#149511 0x00007ffff67bae0c in boost::signal1<void, App::ObjectIdentifier const&, boost::last_value<void>, int, std::less<int>, boost::function<void (App::ObjectIdentifier const&)> >::operator()(App::ObjectIdentifier const&) (this=0x41e67b8, a1=...) at /usr/include/boost/signals/signal_template.hpp:354
#149512 0x00007ffff67b81a4 in App::PropertyExpressionEngine::setValue (this=0x41e6798, path=..., expr=..., comment=0x0)
    at /usr/src/FreeCAD/src/App/PropertyExpressionEngine.cpp:367
#149513 0x00007ffff7255997 in Gui::ExpressionBinding::setExpression (this=0x22e0208, expr=...) at /usr/src/FreeCAD/src/Gui/ExpressionBinding.cpp:70
#149514 0x00007ffff758a74d in Gui::QuantitySpinBox::setExpression (this=0x22e01e0, expr=...) at /usr/src/FreeCAD/src/Gui/QuantitySpinBox.cpp:276
#149515 0x00007ffff758c159 in Gui::QuantitySpinBox::finishFormulaDialog (this=0x22e01e0) at /usr/src/FreeCAD/src/Gui/QuantitySpinBox.cpp:501
#149516 0x00007ffff758d346 in Gui::QuantitySpinBox::qt_static_metacall (_o=0x22e01e0, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x7fffffffb900)
    at /usr/src/FreeCAD/build/src/Gui/moc_QuantitySpinBox.cpp:84
#149517 0x00007ffff493887a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#149518 0x00007ffff52fc62e in QDialog::finished(int) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149519 0x00007ffff52fc6bb in QDialog::done(int) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149520 0x00007ffff493887a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#149521 0x00007ffff54a4172 in QAbstractButton::clicked(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149522 0x00007ffff5207a63 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149523 0x00007ffff52083da in QAbstractButton::click() () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149524 0x00007ffff52fc7e6 in QDialog::keyPressEvent(QKeyEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149525 0x00007ffff4ea53e4 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149526 0x00007ffff4e55e2c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149527 0x00007ffff4e5d6f1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149528 0x00007ffff725f12b in Gui::GUIApplication::notify (this=0x7fffffffd930, receiver=0x808f00, event=0x7fffffffc030)
    at /usr/src/FreeCAD/src/Gui/GuiApplication.cpp:83
#149529 0x00007ffff49244dd in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#149530 0x00007ffff4ef5027 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149531 0x00007ffff4ef53c9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149532 0x00007ffff4ecf417 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149533 0x00007ffff4ef7b32 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149534 0x00007fffeda0fe04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#149535 0x00007fffeda10048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#149536 0x00007fffeda100ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#149537 0x00007ffff49517a1 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#149538 0x00007ffff4ef7be6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149539 0x00007ffff49230af in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#149540 0x00007ffff49233a5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#149541 0x00007ffff52fd06c in QDialog::exec() () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149542 0x00007fffd1e9162a in SketcherGui::EditDatumDialog::exec (this=0x2281df0, atCursor=true)
    at /usr/src/FreeCAD/src/Mod/Sketcher/Gui/EditDatumDialog.cpp:138
#149543 0x00007fffd1e90e57 in SketcherGui::EditDatumDialog::customEvent (this=0x2281df0) at /usr/src/FreeCAD/src/Mod/Sketcher/Gui/EditDatumDialog.cpp:67
#149544 0x00007ffff493ccad in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
---Type <return> to continue, or q <return> to quit---
#149545 0x00007ffff4e55e2c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149546 0x00007ffff4e5c4a0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149547 0x00007ffff725f12b in Gui::GUIApplication::notify (this=0x7fffffffd930, receiver=0x2281df0, event=0x23e3870)
    at /usr/src/FreeCAD/src/Gui/GuiApplication.cpp:83
#149548 0x00007ffff49244dd in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#149549 0x00007ffff4927b3d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#149550 0x00007ffff4951f83 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#149551 0x00007fffeda0fe04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#149552 0x00007fffeda10048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#149553 0x00007fffeda100ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#149554 0x00007ffff49517a1 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#149555 0x00007ffff4ef7be6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#149556 0x00007ffff49230af in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#149557 0x00007ffff49233a5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#149558 0x00007ffff4928b79 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#149559 0x00007ffff71fa4f3 in Gui::Application::runApplication () at /usr/src/FreeCAD/src/Gui/Application.cpp:1840
#149560 0x00000000004072f2 in main (argc=1, argv=0x7fffffffe2e8) at /usr/src/FreeCAD/src/Main/MainGui.cpp:237
freecadStackTrace.txt (21,926 bytes)   

tonyt

2016-12-20 20:47

reporter   ~0007537

I compiled the git HEAD from this morning with symbols. Attached is a backtrace of the last 100 lines from gdb after the crash.

wmayer

2016-12-20 21:38

administrator   ~0007538

> Attached is a backtrace of the last 100 lines from gdb after the crash.
So, am I right that this is not the complete stack trace?

Two things that realized with this stack trace is:
1. I don't see the reason of the crash like the segmentation fault on the top
2. The last 16 calls are identical (see /usr/include/boost/any.hpp:175)

My guess is that the reason of the crash is not a segmentation fault but a stack overflow. To me this rather seems like a bug in the boost library.

What is your boost version?

tonyt

2016-12-20 22:52

reporter   ~0007539

Last edited: 2016-12-20 22:53

Sorry. I forgot to include the first few lines. The remaining 150,000+ are basically the same as lines 3,4. It may be an overflow, but when I launch it from a terminal, I get "Segmentation fault" right before the prompt returns.

Boost is a mixture of mostly 1.54.0 and some 1.55.0 libraries. These are the 1.55.0 libraries installed:
libboost_signals.so.1.55.0
libboost_system.so.1.55.0
libboost_python-py34.so.1.55.0
libboost_program_options.so.1.55.0
libboost_python-py33.so.1.55.0
libboost_python-py27.so.1.55.0
libboost_regex.so.1.55.0

The f(x) feature is working fine with this PPA version from Normand Chamberland (thanks Normand!): 1:0.16.6707-1ppa1~ubuntu14.04.1

Here are the first few lines of the trace. Let me know if you want the whole thing.
0 _int_malloc (av=0x7ffff427b760 <main_arena>, bytes=16) at malloc.c:3302
1 0x00007ffff3f3f6c0 in __GI___libc_malloc (bytes=16) at malloc.c:2891
2 0x00007ffff44f7698 in operator new(unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
3 0x00007ffff67337c5 in boost::any::any<boost::any const>(boost::any const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>, void>::type*) (this=0x47b0678, value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x475b5f>) at /usr/include/boost/any.hpp:72
4 0x00007ffff6735b43 in boost::any::holder<boost::any const>::holder(boost::any const&&) (this=0x47b0670,
    value=<unknown type in /usr/src/FreeCAD/build/lib/libFreeCADApp.so, CU 0x40d4d0, DIE 0x478a17>) at /usr/include/boost/any.hpp:175

wmayer

2016-12-21 14:45

administrator   ~0007543

> It may be an overflow, but when I launch it from a terminal, I get "Segmentation fault" right before the prompt returns.
I quickly tried an explicit infinite recursion and it indeed reports a segmentation fault. So, since the last several thousand lines are equal it must be an overflow.

> Here are the first few lines of the trace. Let me know if you want the whole thing.
0 _int_malloc (av=0x7ffff427b760 <main_arena>, bytes=16) at malloc.c:3302
1 0x00007ffff3f3f6c0 in __GI___libc_malloc (bytes=16) at malloc.c:2891
2 0x00007ffff44f7698 in operator new(unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

For every call of a function some memory (at least in debug mode) must be allocated. And the boost::any::holder function may allocate a lot of memory too dependent on what it does. So, it may happen that at some point you run out of memory.

> Boost is a mixture of mostly 1.54.0 and some 1.55.0 libraries. These are the 1.55.0 libraries installed:
But I hope you don't use 1.54 and 1.55 libraries mixed in one application. If so this may cause undefined behaviour.

> The f(x) feature is working fine with this PPA version from Normand Chamberland (thanks Normand!): 1:0.16.6707-1ppa1~ubuntu14.04.1
So, this proves it that FreeCAD itself works but either there is a bug in a 3rd party library or your FreeCAD build is corrupt.

So, you can you make sure that FreeCAD either only uses bosst 1.54 or 1.55 but not mixed? Then from time to time it happens when doing incremental builds that the binaries get corrupted. In this case you must clean the build directory and rebuild the binaries from scratch. Maybe you should try that, too.

tonyt

2016-12-21 18:36

reporter   ~0007544

First, thanks for explaining what you are seeing. It helps me learn more about debugging.

It looks like only Boost 1.54 is being linked to FreeCAD:
ldd bin/FreeCAD|grep boost
    libboost_regex.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.54.0
    libboost_signals.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_signals.so.1.54.0
    libboost_system.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.54.0
    libboost_program_options.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.54.0

To be sure this isn't a bad incremental build, I ran "make clean" in the old build directory, rebuilt FreeCAD in a new build directory and got the same result.

Here is virtual and resident memory:
Immediately before typing "pi" and pressing <enter> in the f(x) box:
VSZ: 709448 RSS: 207400
After pressing <enter> and the crash:
VSZ: 719548 RSS: 218100

Looks like about a 10MB increase in memory usage. It all happens in a fraction of a second. I'm going to try to get the latest stable boost libraries (1.62) linked to FreeCAD and see if that makes a difference.

user2853

2016-12-21 19:20

  ~0007545

libboost 1.54 is the culprit. We had the same problem on the PPA and upgraded to 1.55 to solve the segfaults
http://packages.ubuntu.com/trusty/libboost1.55-dev

tonyt

2016-12-22 21:36

reporter   ~0007547

Boost 1.54 was the problem. I compiled FreeCAD with Boost 1.55 and it worked fine with no crashes when using the f(x) feature. Thanks for all the help getting to the bottom of this! Here is what I did on Ubuntu 14.04.5 x64 to get this to work...

apt-get install libboost-program-options1.55-dev libboost-python1.55-dev libboost-regex1.55-dev libboost-signals1.55-dev libboost-thread1.55-dev libboost-filesystem1.55-dev libboost1.55-dev libboost-system1.55-dev

apt automatically created default symlinks for the 1.55 shared objects and removed the 1.54 dev libraries.
Verify that your default boost libraries are pointing to the 1.55 versions by looking at the symlinks in /usr/lib/x86_64-linux-gnu/

I then cleaned the build directory and rebuilt FreeCAD.

wmayer

2016-12-23 09:09

administrator   ~0007548

Glad to hear that it works now.

Issue History

Date Modified Username Field Change
2016-12-19 07:54 tonyt New Issue
2016-12-19 18:59 wmayer Relationship added related to 0002820
2016-12-20 20:46 tonyt File Added: freecadStackTrace.txt
2016-12-20 20:47 tonyt Note Added: 0007537
2016-12-20 21:38 wmayer Note Added: 0007538
2016-12-20 22:52 tonyt Note Added: 0007539
2016-12-20 22:53 tonyt Note Edited: 0007539
2016-12-21 14:45 wmayer Note Added: 0007543
2016-12-21 14:45 wmayer Status new => feedback
2016-12-21 18:36 tonyt Note Added: 0007544
2016-12-21 18:36 tonyt Status feedback => new
2016-12-21 19:20 user2853 Note Added: 0007545
2016-12-22 21:36 tonyt Note Added: 0007547
2016-12-23 09:09 wmayer Note Added: 0007548
2016-12-23 09:09 wmayer Status new => closed
2016-12-23 09:09 wmayer Resolution open => no change required
2016-12-23 09:09 wmayer Fixed in Version => 0.17