Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault when adding tangent constraint in sketch #917

Open
antonok-edm opened this issue Dec 25, 2023 · 0 comments
Open

Segfault when adding tangent constraint in sketch #917

antonok-edm opened this issue Dec 25, 2023 · 0 comments

Comments

@antonok-edm
Copy link

Steps to reproduce

  • create a new sketch
  • create a line and an arc sharing an endpoint
  • select the line and the arc
  • and add a tangent constraint

Note: creating the line and arc without any coincident constraints first and then adding the tangent constraint by selecting the endpoints does not crash.

Traceback

Not sure if they're relevant, since it's not always the same and it's sometimes missing. But Program received signal SIGSEGV, Segmentation fault. is always there.

one traceback
Program received signal SIGSEGV, Segmentation fault.
#0  /usr/lib/libc.so.6(+0x3e710) [0x7fc46865c710]
#1  0x7fc35a7f75f0 in SketcherGui::ViewProviderSketch::drawConstraintIcons() from /usr/lib/freecad/lib/SketcherGui.so+0x310
#2  0x7fc35a7fb504 in SketcherGui::ViewProviderSketch::onSelectionChanged(Gui::SelectionChanges const&) from /usr/lib/freecad/lib/SketcherGui.so+0x4d4
#3  0x7fc46c3c68fc in Gui::SelectionObserver::_onSelectionChanged(Gui::SelectionChanges const&) from /usr/lib/freecad/lib/libFreeCADGui.so+0x2c
#4  0x7fc46bfabb2e in boost::signals2::detail::slot_call_iterator_t, std::_List_iterator >, boost::signals2::slot >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body >, boost::signals2::slot >, boost::signals2::mutex> >::dereference() const from /usr/lib/freecad/lib/libFreeCADGui.so+0x4e
#5  0x7fc46bfab04f in boost::signals2::detail::signal_impl, int, std::less, boost::function, boost::function, boost::signals2::mutex>::operator()(Gui::SelectionChanges const&) from /usr/lib/freecad/lib/libFreeCADGui.so+0x27f
#6  0x7fc46c3cb0a8 in Gui::SelectionSingleton::slotSelectionChanged(Gui::SelectionChanges const&) from /usr/lib/freecad/lib/libFreeCADGui.so+0x288
#7  0x7fc46bfabb2e in boost::signals2::detail::slot_call_iterator_t, std::_List_iterator >, boost::signals2::slot >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body >, boost::signals2::slot >, boost::signals2::mutex> >::dereference() const from /usr/lib/freecad/lib/libFreeCADGui.so+0x4e
#8  0x7fc46bfab04f in boost::signals2::detail::signal_impl, int, std::less, boost::function, boost::function, boost::signals2::mutex>::operator()(Gui::SelectionChanges const&) from /usr/lib/freecad/lib/libFreeCADGui.so+0x27f
#9  0x7fc46c3c9087 in Gui::SelectionSingleton::notify(Gui::SelectionChanges&&) from /usr/lib/freecad/lib/libFreeCADGui.so+0x167
#10  0x7fc46c3d2367 in Gui::SelectionSingleton::clearCompleteSelection(bool) from /usr/lib/freecad/lib/libFreeCADGui.so+0x517
#11  0x7fc35a7b0e68 in SketcherGui::TaskSketcherElements::on_elementsWidget_itemSelectionChanged() from /usr/lib/freecad/lib/SketcherGui.so+0x2a8
#12  /usr/lib/libQt5Core.so.5(+0x2d0113) [0x7fc4698d0113]
#13  /usr/lib/libQt5Widgets.so.5(+0x4618e4) [0x7fc46a8618e4]
#14  /usr/lib/libQt5Core.so.5(+0x2d0113) [0x7fc4698d0113]
#15  0x7fc4698677bc in QItemSelectionModel::selectionChanged(QItemSelection const&, QItemSelection const&) from /usr/lib/libQt5Core.so.5+0x3c
#16  0x7fc46986554f in QItemSelectionModel::select(QItemSelection const&, QFlags) from /usr/lib/libQt5Core.so.5+0x3ff
#17  0x7fc469863bcd in QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlags) from /usr/lib/libQt5Core.so.5+0x1ad
#18  0x7fc46a7da4ef in QAbstractItemView::setCurrentIndex(QModelIndex const&) from /usr/lib/libQt5Widgets.so.5+0xaf
#19  0x7fc35a7b05c6 in SketcherGui::TaskSketcherElements::slotElementsChanged() from /usr/lib/freecad/lib/SketcherGui.so+0x376
#20  0x7fc46bd3fe97 in boost::signals2::detail::slot_call_iterator_t, std::_List_iterator >, boost::signals2::slot >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body >, boost::signals2::slot >, boost::signals2::mutex> >::dereference() const from /usr/lib/freecad/lib/libFreeCADGui.so+0x47
#21  0x7fc46bd3fb2f in boost::signals2::detail::signal_impl, int, std::less, boost::function, boost::function, boost::signals2::mutex>::operator()() from /usr/lib/freecad/lib/libFreeCADGui.so+0x27f
#22  0x7fc3784da1a4 in Sketcher::SketchObject::acceptGeometry() from /usr/lib/freecad/lib/Sketcher.so+0x64
#23  0x7fc37851a699 in Sketcher::SketchObject::onChanged(App::Property const*) from /usr/lib/freecad/lib/Sketcher.so+0x1c59
#24  0x7fc46b10a346 in App::Property::touch() from /usr/lib/freecad/lib/libFreeCADApp.so+0x86
#25  0x7fc3784d0152 in Sketcher::SketchObject::solve(bool) from /usr/lib/freecad/lib/Sketcher.so+0x402
#26  0x7fc35a759798 in CmdSketcherConstrainTangent::substituteConstraintCombinations(Sketcher::SketchObject*, int, int) from /usr/lib/freecad/lib/SketcherGui.so+0x2b8
#27  0x7fc35a75aa71 in CmdSketcherConstrainTangent::activated(int) from /usr/lib/freecad/lib/SketcherGui.so+0x11b1
#28  0x7fc46bd2e240 in Gui::Command::_invoke(int, bool) from /usr/lib/freecad/lib/libFreeCADGui.so+0x230
#29  0x7fc46bd2db2b in Gui::Command::invoke(int, Gui::Command::TriggerSource) from /usr/lib/freecad/lib/libFreeCADGui.so+0x1db
#30  /usr/lib/libQt5Core.so.5(+0x2cff57) [0x7fc4698cff57]
#31  0x7fc46a56bbb7 in QAction::triggered(bool) from /usr/lib/libQt5Widgets.so.5+0x47
#32  0x7fc46a57160b in QAction::activate(QAction::ActionEvent) from /usr/lib/libQt5Widgets.so.5+0xbb
#33  /usr/lib/libQt5Widgets.so.5(+0x2603de) [0x7fc46a6603de]
#34  0x7fc46a6605e0 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) from /usr/lib/libQt5Widgets.so.5+0xc0
#35  0x7fc46a75376f in QToolButton::mouseReleaseEvent(QMouseEvent*) from /usr/lib/libQt5Widgets.so.5+0xf
#36  0x7fc46a5af1a1 in QWidget::event(QEvent*) from /usr/lib/libQt5Widgets.so.5+0x8d1
#37  0x7fc46a5788ff in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/libQt5Widgets.so.5+0x8f
#38  0x7fc46a57ddaf in QApplication::notify(QObject*, QEvent*) from /usr/lib/libQt5Widgets.so.5+0x10ff
#39  0x7fc46bcacd8e in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad/lib/libFreeCADGui.so+0x5e
#40  0x7fc46989b048 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/libQt5Core.so.5+0x128
#41  0x7fc46a57c0ea in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool, bool) from /usr/lib/libQt5Widgets.so.5+0x1ca
#42  /usr/lib/libQt5Widgets.so.5(+0x1cceb5) [0x7fc46a5cceb5]
#43  /usr/lib/libQt5Widgets.so.5(+0x1cec07) [0x7fc46a5cec07]
#44  0x7fc46a5788ff in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/libQt5Widgets.so.5+0x8f
#45  0x7fc46bcacd8e in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad/lib/libFreeCADGui.so+0x5e
#46  0x7fc46989b048 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/libQt5Core.so.5+0x128
#47  0x7fc469d4196c in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) from /usr/lib/libQt5Gui.so.5+0x6ec
#48  0x7fc469d2a6f5 in QWindowSystemInterface::sendWindowSystemEvents(QFlags) from /usr/lib/libQt5Gui.so.5+0xb5
#49  /usr/lib/libQt5XcbQpa.so.5(+0x65570) [0x7fc45e12f570]
#50  /usr/lib/libglib-2.0.so.0(+0x59f69) [0x7fc466f0df69]
#51  /usr/lib/libglib-2.0.so.0(+0xb8367) [0x7fc466f6c367]
#52  /usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x32) [0x7fc466f0c162]
#53  0x7fc4698e9e0c in QEventDispatcherGlib::processEvents(QFlags) from /usr/lib/libQt5Core.so.5+0x6c
#54  0x7fc469899d54 in QEventLoop::exec(QFlags) from /usr/lib/libQt5Core.so.5+0x134
#55  0x7fc46989b1f3 in QCoreApplication::exec() from /usr/lib/libQt5Core.so.5+0x93
#56  0x7fc46bbd2685 in Gui::Application::runApplication() from /usr/lib/freecad/lib/libFreeCADGui.so+0x555
#57  freecad(+0x805b) [0x55c6569b705b]
#58  /usr/lib/libc.so.6(+0x27cd0) [0x7fc468645cd0]
#59  /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7fc468645d8a]
#60  freecad(+0x7275) [0x55c6569b6275]
another traceback
Program received signal SIGSEGV, Segmentation fault.
#0  /usr/lib/libc.so.6(+0x3e710) [0x7f0d7765c710]
#1  0x7f0d76fdd8eb in SoMFColor::setValue(SbColor const&) from /usr/lib/libCoin.so.80+0x1b
#2  0x7f0c717f9e2d in SketcherGui::ViewProviderSketch::updateColor() from /usr/lib/freecad/lib/SketcherGui.so+0x1f0d
#3  0x7f0c717fb50d in SketcherGui::ViewProviderSketch::onSelectionChanged(Gui::SelectionChanges const&) from /usr/lib/freecad/lib/SketcherGui.so+0x4dd
#4  0x7f0d7b3c68fc in Gui::SelectionObserver::_onSelectionChanged(Gui::SelectionChanges const&) from /usr/lib/freecad/lib/libFreeCADGui.so+0x2c
#5  0x7f0d7afabb2e in boost::signals2::detail::slot_call_iterator_t, std::_List_iterator >, boost::signals2::slot >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body >, boost::signals2::slot >, boost::signals2::mutex> >::dereference() const from /usr/lib/freecad/lib/libFreeCADGui.so+0x4e
#6  0x7f0d7afab04f in boost::signals2::detail::signal_impl, int, std::less, boost::function, boost::function, boost::signals2::mutex>::operator()(Gui::SelectionChanges const&) from /usr/lib/freecad/lib/libFreeCADGui.so+0x27f
#7  0x7f0d7b3cb1a5 in Gui::SelectionSingleton::slotSelectionChanged(Gui::SelectionChanges const&) from /usr/lib/freecad/lib/libFreeCADGui.so+0x385
#8  0x7f0d7afabb2e in boost::signals2::detail::slot_call_iterator_t, std::_List_iterator >, boost::signals2::slot >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body >, boost::signals2::slot >, boost::signals2::mutex> >::dereference() const from /usr/lib/freecad/lib/libFreeCADGui.so+0x4e
#9  0x7f0d7afab04f in boost::signals2::detail::signal_impl, int, std::less, boost::function, boost::function, boost::signals2::mutex>::operator()(Gui::SelectionChanges const&) from /usr/lib/freecad/lib/libFreeCADGui.so+0x27f
#10  0x7f0d7b3c9087 in Gui::SelectionSingleton::notify(Gui::SelectionChanges&&) from /usr/lib/freecad/lib/libFreeCADGui.so+0x167
#11  0x7f0d7b3cd3cd in Gui::SelectionSingleton::rmvPreselect(bool) from /usr/lib/freecad/lib/libFreeCADGui.so+0x43d
#12  0x7f0d7b3d1f30 in Gui::SelectionSingleton::clearCompleteSelection(bool) from /usr/lib/freecad/lib/libFreeCADGui.so+0xe0
#13  0x7f0c717b0e68 in SketcherGui::TaskSketcherElements::on_elementsWidget_itemSelectionChanged() from /usr/lib/freecad/lib/SketcherGui.so+0x2a8
#14  /usr/lib/libQt5Core.so.5(+0x2d0113) [0x7f0d788d0113]
#15  /usr/lib/libQt5Widgets.so.5(+0x4618e4) [0x7f0d798618e4]
#16  /usr/lib/libQt5Core.so.5(+0x2d0113) [0x7f0d788d0113]
#17  0x7f0d788677bc in QItemSelectionModel::selectionChanged(QItemSelection const&, QItemSelection const&) from /usr/lib/libQt5Core.so.5+0x3c
#18  0x7f0d7886554f in QItemSelectionModel::select(QItemSelection const&, QFlags) from /usr/lib/libQt5Core.so.5+0x3ff
#19  0x7f0d78863bcd in QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlags) from /usr/lib/libQt5Core.so.5+0x1ad
#20  0x7f0d797da4ef in QAbstractItemView::setCurrentIndex(QModelIndex const&) from /usr/lib/libQt5Widgets.so.5+0xaf
#21  0x7f0c717b05c6 in SketcherGui::TaskSketcherElements::slotElementsChanged() from /usr/lib/freecad/lib/SketcherGui.so+0x376
#22  0x7f0d7ad3fe97 in boost::signals2::detail::slot_call_iterator_t, std::_List_iterator >, boost::signals2::slot >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body >, boost::signals2::slot >, boost::signals2::mutex> >::dereference() const from /usr/lib/freecad/lib/libFreeCADGui.so+0x47
#23  0x7f0d7ad3fb2f in boost::signals2::detail::signal_impl, int, std::less, boost::function, boost::function, boost::signals2::mutex>::operator()() from /usr/lib/freecad/lib/libFreeCADGui.so+0x27f
#24  0x7f0c944da1a4 in Sketcher::SketchObject::acceptGeometry() from /usr/lib/freecad/lib/Sketcher.so+0x64
#25  0x7f0c9451a699 in Sketcher::SketchObject::onChanged(App::Property const*) from /usr/lib/freecad/lib/Sketcher.so+0x1c59
#26  0x7f0d7a10a346 in App::Property::touch() from /usr/lib/freecad/lib/libFreeCADApp.so+0x86
#27  0x7f0c944d0152 in Sketcher::SketchObject::solve(bool) from /usr/lib/freecad/lib/Sketcher.so+0x402
#28  0x7f0c71759798 in CmdSketcherConstrainTangent::substituteConstraintCombinations(Sketcher::SketchObject*, int, int) from /usr/lib/freecad/lib/SketcherGui.so+0x2b8
#29  0x7f0c7175aa71 in CmdSketcherConstrainTangent::activated(int) from /usr/lib/freecad/lib/SketcherGui.so+0x11b1
#30  0x7f0d7ad2e240 in Gui::Command::_invoke(int, bool) from /usr/lib/freecad/lib/libFreeCADGui.so+0x230
#31  0x7f0d7ad2db2b in Gui::Command::invoke(int, Gui::Command::TriggerSource) from /usr/lib/freecad/lib/libFreeCADGui.so+0x1db
#32  /usr/lib/libQt5Core.so.5(+0x2cff57) [0x7f0d788cff57]
#33  0x7f0d7956bbb7 in QAction::triggered(bool) from /usr/lib/libQt5Widgets.so.5+0x47
#34  0x7f0d7957160b in QAction::activate(QAction::ActionEvent) from /usr/lib/libQt5Widgets.so.5+0xbb
#35  0x7f0d7ad954e0 in Gui::ShortcutManager::onTimer() from /usr/lib/freecad/lib/libFreeCADGui.so+0xe0
#36  /usr/lib/libQt5Core.so.5(+0x2cff57) [0x7f0d788cff57]
#37  0x7f0d788d1a5f in QTimer::timeout(QTimer::QPrivateSignal) from /usr/lib/libQt5Core.so.5+0x3f
#38  0x7f0d788c2a2e in QObject::event(QEvent*) from /usr/lib/libQt5Core.so.5+0x1ae
#39  0x7f0d795788ff in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/libQt5Widgets.so.5+0x8f
#40  0x7f0d7acacd8e in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad/lib/libFreeCADGui.so+0x5e
#41  0x7f0d7889b048 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/libQt5Core.so.5+0x128
#42  0x7f0d788e965b in QTimerInfoList::activateTimers() from /usr/lib/libQt5Core.so.5+0x44b
#43  /usr/lib/libQt5Core.so.5(+0x2e9c92) [0x7f0d788e9c92]
#44  /usr/lib/libglib-2.0.so.0(+0x59f69) [0x7f0d75f0df69]
#45  /usr/lib/libglib-2.0.so.0(+0xb8367) [0x7f0d75f6c367]
#46  /usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x32) [0x7f0d75f0c162]
#47  0x7f0d788e9e0c in QEventDispatcherGlib::processEvents(QFlags) from /usr/lib/libQt5Core.so.5+0x6c
#48  0x7f0d78899d54 in QEventLoop::exec(QFlags) from /usr/lib/libQt5Core.so.5+0x134
#49  0x7f0d7889b1f3 in QCoreApplication::exec() from /usr/lib/libQt5Core.so.5+0x93
#50  0x7f0d7abd2685 in Gui::Application::runApplication() from /usr/lib/freecad/lib/libFreeCADGui.so+0x555
#51  freecad(+0x805b) [0x555661cb405b]
#52  /usr/lib/libc.so.6(+0x27cd0) [0x7f0d77645cd0]
#53  /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f0d77645d8a]
#54  freecad(+0x7275) [0x555661cb3275]

Build details

Built using this PKGBUILD on latest LinkMerge commit, with a small patch to get it to build without errors:

diff --git a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
index 7e3de0070a..2f81a799de 100644
--- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
@@ -1026,7 +1026,7 @@ void SMDS_UnstructuredGrid::BuildLinks()
   GetLinks()->Allocate(this->GetNumberOfPoints());
   GetLinks()->Register(this);
 //FIXME: vtk9
-  GetLinks()->BuildLinks(this);
+  GetLinks()->BuildLinks();
   GetLinks()->Delete();
 #else
   this->Links = SMDS_CellLinks::New();

OS: Arch Linux
Word size of FreeCAD: 64-bit
Version: 0.21.0.38899 (Git)
Build type: Release
Branch: makepkg
Hash: a68baba6bd0b6a6ac12d8848fa04b0a148e6a208
Python 3.11.6, Qt 5.15.11, Coin 4.0.1, Vtk 9.3.0, OCC 7.7.2
Locale: English/United States (en_US)
realthunder added a commit that referenced this issue Dec 28, 2023
realthunder added a commit that referenced this issue Dec 31, 2023
realthunder added a commit that referenced this issue Jan 4, 2024
realthunder added a commit that referenced this issue Jan 4, 2024
realthunder added a commit that referenced this issue Mar 17, 2024
realthunder added a commit that referenced this issue May 28, 2024
realthunder added a commit that referenced this issue May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant