Bug, freecad crashes when closing document with an active measurement and then clearing all measurements

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
freecc
Posts: 158
Joined: Wed Feb 21, 2018 4:17 pm

Bug, freecad crashes when closing document with an active measurement and then clearing all measurements

Post by freecc »

make a measurement in the part workbench
close the document
clear all measurements

crash
chrisb
Veteran
Posts: 54177
Joined: Tue Mar 17, 2015 9:14 am

Re: Bug, freecad crashes when closing document with an active measurement and then clearing all measurements

Post by chrisb »

Please follow the IMPORTANT link above and add your FreeCAD info as described. If you haven't done so, retest your issue with the newest 0.18 version.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Bug, freecad crashes when closing document with an active measurement and then clearing all measurements

Post by NormandC »

Confirmed, but the sequence is not detailed enough, I had to fiddle to figure out the crash sequence.

  1. Create new document
  2. Create a Part Cube or any other solid
  3. Press the Image Part_Measure_Linear or Image Part_Measure_Angular button
  4. The Measure dialogue appears in the Tasks tab, this is essential for the crash (I'm used to make the selection before launching the measure tool, then the dialogue does not open)
  5. Make Selection 01 and 02 to create a measurement
  6. Close the document, but do not close the dialogue. Press "Discard" at the dialog to close the document without saving it
  7. The Measure dialogue remains in the Tasks tab in active mode.
  8. Press Clear All in the Tasks tab.
  9. Instant crash.
Log from the terminal:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f58a1fb3f20]
#1  0x7f58a4bebeba in Gui::Document::getMDIViews[abi:cxx11]() const from /home/normand2/compilation/FreeCAD/freecad-build/lib/libFreeCADGui.so+0x1a
#2  0x7f58a4bec799 in Gui::Document::getActiveView() const from /home/normand2/compilation/FreeCAD/freecad-build/lib/libFreeCADGui.so+0x39
#3  0x7f5806230d1b in PartGui::eraseAllDimensions() from /home/normand2/compilation/FreeCAD/freecad-build/Mod/Part/PartGui.so+0x1b
#4  0x7f58a2bc05b5 in QMetaObject::activate(QObject*, int, int, void**) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x865
#5  0x7f58a3297b82 in QAbstractButton::clicked(bool) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x42
#6  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x245d9a) [0x7f58a3297d9a]
#7  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x24717a) [0x7f58a329917a]
#8  0x7f58a329936d in QAbstractButton::mouseReleaseEvent(QMouseEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0xfd
#9  0x7f58a31e5038 in QWidget::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1f8
#10  0x7f58a31a682c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x9c
#11  0x7f58a31ae64f in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x7ff
#12  0x7f58a4c28d68 in Gui::GUIApplication::notify(QObject*, QEvent*) from /home/normand2/compilation/FreeCAD/freecad-build/lib/libFreeCADGui.so+0x88
#13  0x7f58a2b919a8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x118
#14  0x7f58a31ad622 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1d2
#15  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1ae14b) [0x7f58a320014b]
#16  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1b07ba) [0x7f58a32027ba]
#17  0x7f58a31a682c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x9c
#18  0x7f58a31ae0f4 in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2a4
#19  0x7f58a4c28d68 in Gui::GUIApplication::notify(QObject*, QEvent*) from /home/normand2/compilation/FreeCAD/freecad-build/lib/libFreeCADGui.so+0x88
#20  0x7f58a2b919a8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x118
#21  0x7f589eabc523 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0x6f3
#22  0x7f589eabdff5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0x135
#23  0x7f589ea952eb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0xab
#24  /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5(+0x9d1c0) [0x7f58921f81c0]
#25  /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2e7) [0x7f589ce13387]
#26  /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4c5c0) [0x7f589ce135c0]
#27  /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7f589ce1364c]
#28  0x7f58a2bea8ef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x5f
#29  0x7f58a2b8f9ea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x13a
#30  0x7f58a2b98a84 in QCoreApplication::exec() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x94
#31  0x7f58a4bae227 in Gui::Application::runApplication() from /home/normand2/compilation/FreeCAD/freecad-build/lib/libFreeCADGui.so+0x1437
#32  ./FreeCAD(main+0x695) [0x5636c9a544d5]
#33  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f58a1f96b97]
#34  ./FreeCAD(_start+0x2a) [0x5636c9a5519a]
Reproduced in

OS: Ubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16078 (Git)
Build type: Release
Branch: master
Hash: 67df9f3a828fbb0fec29d039792d4baf3d9ee8e0
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/Canada (fr_CA)

and

OS: Ubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16079 (Git)
Build type: Release
Branch: master
Hash: 6363c90a20b296ab69d7b52230009928199d90df
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/Canada (fr_CA)
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Bug, freecad crashes when closing document with an active measurement and then clearing all measurements

Post by NormandC »

Post Reply