View Issue Details

IDProjectCategoryView StatusLast Update
0004241PartDesignBugpublic2020-06-09 11:40
ReporterJoshuaCall Assigned Toabdullah  
PriorityimmediateSeveritycrashReproducibilityalways
Status closedResolutionfixed 
OSUbuntu 18.04.3 LTS 
Product Version0.19 
Target Version0.19 
Summary0004241: Crash when task panel stays open in FreeCAD Daily
DescriptionCrash when the task panel stays open after closing without saving

https://forum.freecadweb.org/viewtopic.php?f=3&t=42268
Steps To Reproduce1. Open FreeCAD.
2. Create a new document (Std_New).
3. Switch to the PartDesign Workbench.
4. Create a new PartDesign Body.
5. Click on PartDesign AdditiveBox to show a preview of a cube, but don't press "OK" or "Cancel" yet.
6. Close the document by clicking on the X in the "Unnamed" tab under the 3D view. In the popup "Do you want to save your changes before closing?", choose "Close without Saving".
7. The task panel for the PartDesign AdditiveBox tool will remain active. It is not possible to create a new document with Std_New, and the Ctrl+N key combination doesn't work either.
8. Now use the mouse wheel to scroll up and down the task panel to trigger the crash.

Note: Clicking "cancel" in the combo view before crashing will print in the report view:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
<class 'AttributeError'>: 'NoneType' object has no attribute 'resetEdit'
Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: 'NoneType' object has no attribute 'resetEdit'

Additional note: Clicking "Ok" in the combo view can cause FreeCAD to crash, or it may simply print in the report view:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
<class 'AttributeError'>: 'NoneType' object has no attribute 'recompute'
Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: 'NoneType' object has no attribute 'recompute'
Additional InformationDepending on the sequence of steps I take before the crash, and whether I crash via using the scroll wheel or pressing "Ok", I will get different backtraces printed to the terminal. I will post a few different ones:

Program received signal SIGSEGV, Segmentation fault.
#0 /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7fb22dcb2f20]
#1 0x7fb22e5f8438 in vtable for __cxxabiv1::__si_class_type_info from /usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x10




Program received signal SIGSEGV, Segmentation fault.
#0 /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f4c99391f20]
#1 0x7f4c9c00378c in App::DocumentObject::getNameInDocument() const from /usr/lib/freecad-daily-python3/lib/libFreeCADApp.so+0xc
0000002 0x7f4c9c934b1a in Gui::Command::getObjectCmd[abi:cxx11](App::DocumentObject const*, char const*, char const*, bool) from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0x3a
0000003 0x7f4c4cecadae in PartDesignGui::TaskBoxPrimitives::setPrimitive(App::DocumentObject*) from /usr/lib/freecad-daily-python3/lib/PartDesignGui.so+0x3e
0000004 0x7f4c4cecc4b8 in PartDesignGui::TaskPrimitiveParameters::accept() from /usr/lib/freecad-daily-python3/lib/PartDesignGui.so+0x18
0000005 0x7f4c9cb71cf6 in Gui::TaskView::TaskView::accept() from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0x56
0000006 0x7f4c99f9e645 in QMetaObject::activate(QObject*, int, int, void**) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x865
0000007 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x2e66a0) [0x7f4c9ae7f6a0]
0000008 0x7f4c99f9e645 in QMetaObject::activate(QObject*, int, int, void**) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x865
0000009 0x7f4c9addeba2 in QAbstractButton::clicked(bool) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x42
0000010 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x245dba) [0x7f4c9addedba]
0000011 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x24719a) [0x7f4c9ade019a]
0000012 0x7f4c9ade038d in QAbstractButton::mouseReleaseEvent(QMouseEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0xfd
0000013 0x7f4c9ad2c048 in QWidget::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1f8
0000014 0x7f4c9aced83c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x9c
0000015 0x7f4c9acf565f in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x7ff
0000016 0x7f4c9c9072a8 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0x88
0000017 0x7f4c99f6f9c8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x118
0000018 0x7f4c9acf4632 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1d2
0000019 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1ae16b) [0x7f4c9ad4716b]
0000020 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1b07da) [0x7f4c9ad497da]
0000021 0x7f4c9aced83c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x9c
0000022 0x7f4c9acf5104 in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2a4
0000023 0x7f4c9c9072a8 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0x88
0000024 0x7f4c99f6f9c8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x118
0000025 0x7f4c9a531583 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0x6f3
0000026 0x7f4c9a533055 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0x135
0000027 0x7f4c9a50a2eb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0xab
0000028 /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5(+0x9f260) [0x7f4c89f00260]
0000029 /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2e7) [0x7f4c9468c417]
0000030 /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4c650) [0x7f4c9468c650]
0000031 /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7f4c9468c6dc]
0000032 0x7f4c99fc897f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x5f
0000033 0x7f4c99f6d9fa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x13a
0000034 0x7f4c99f76aa4 in QCoreApplication::exec() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x94
0000035 0x7f4c9c87d35e in Gui::Application::runApplication() from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0x151e
0000036 freecad-daily(main+0x702) [0x555eb1fe96f2]
0000037 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f4c99374b97]
0000038 freecad-daily(_start+0x2a) [0x555eb1fea3ea]




Program received signal SIGSEGV, Segmentation fault.
#0 /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f67cf3fbf20]
#1 0x7f67d21bafa1 in App::PropertyFloat::setValue(double) from /usr/lib/freecad-daily-python3/lib/libFreeCADApp.so+0x11
0000002 0x7f6782f274de in PartDesignGui::TaskBoxPrimitives::onBoxLengthChanged(double) from /usr/lib/freecad-daily-python3/lib/PartDesignGui.so+0x1e
0000003 0x7f67d0008645 in QMetaObject::activate(QObject*, int, int, void**) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x865
0000004 0x7f67d2d092a3 in Gui::QuantitySpinBox::valueChanged(double) from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0x43
0000005 0x7f67d2d0ad1f in Gui::QuantitySpinBox::userInput(QString const&) from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0x4bf
0000006 /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so(+0x7ffc79) [0x7f67d2d0dc79]
0000007 0x7f67d0008645 in QMetaObject::activate(QObject*, int, int, void**) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x865
0000008 0x7f67d0e98cf2 in QLineEdit::textChanged(QString const&) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x32
0000009 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x29c129) [0x7f67d0e9f129]
0000010 0x7f67d0008645 in QMetaObject::activate(QObject*, int, int, void**) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x865
0000011 0x7f67d0e9fc85 in QWidgetLineControl::textChanged(QString const&) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x35
0000012 0x7f67d0ea2fc1 in QWidgetLineControl::finishChange(int, bool, bool) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x291
0000013 0x7f67d0ea32f0 in QWidgetLineControl::internalSetText(QString const&, int, bool) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1a0
0000014 0x7f67d0e9a94c in QLineEdit::setText(QString const&) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x7c
0000015 0x7f67d2d0ba28 in Gui::QuantitySpinBox::stepBy(int) from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0xc8
0000016 0x7f67d0ef22f0 in QAbstractSpinBox::wheelEvent(QWheelEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x80
0000017 0x7f67d0d96048 in QWidget::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1f8
0000018 0x7f67d0ef7cb5 in QAbstractSpinBox::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0xc5
0000019 0x7f67d2d0fcb6 in Gui::QuantitySpinBox::event(QEvent*) from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0x36
0000020 0x7f67d0d5783c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x9c
0000021 0x7f67d0d60b27 in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1cc7
0000022 0x7f67d29712a8 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0x88
0000023 0x7f67cffd99c8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x118
0000024 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1af2e9) [0x7f67d0db22e9]
0000025 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1b082f) [0x7f67d0db382f]
0000026 0x7f67d0d5783c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x9c
0000027 0x7f67d0d5f104 in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2a4
0000028 0x7f67d29712a8 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0x88
0000029 0x7f67cffd99c8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x118
0000030 0x7f67d0597e5b in QGuiApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::WheelEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0xeb
0000031 0x7f67d059d045 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0x125
0000032 0x7f67d05742eb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0xab
0000033 /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5(+0x9f260) [0x7f67bff6a260]
0000034 /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2e7) [0x7f67ca6f6417]
0000035 /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4c650) [0x7f67ca6f6650]
0000036 /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7f67ca6f66dc]
0000037 0x7f67d003297f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x5f
0000038 0x7f67cffd79fa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x13a
#39 0x7f67cffe0aa4 in QCoreApplication::exec() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x94
#40 0x7f67d28e735e in Gui::Application::runApplication() from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0x151e
0000041 freecad-daily(main+0x702) [0x559c1482d6f2]
0000042 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f67cf3deb97]
0000043 freecad-daily(_start+0x2a) [0x559c1482e3ea]
TagsNo tags attached.
FreeCAD InformationOS: Ubuntu 18.04.3 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

Activities

Kunda1

2020-01-08 13:15

administrator   ~0014016

Confirmed by vocx on the forum.

abdullah

2020-06-07 11:59

manager   ~0014493

https://github.com/FreeCAD/FreeCAD/pull/3575

abdullah

2020-06-09 11:40

manager   ~0014519

Fix committed to master branch.

Related Changesets

FreeCAD: master 11f55007

2020-06-07 11:34:32

abdullah


Committer: abdullahtahiriyo Details Diff
PartDesign: closing task dialog when exiting edit mode for Primitives

=====================================================================

fixes 0004241

Problem:

PartDesignGui::ViewProvider is responsible for closing the tasks for most of PD features when exiting edit mode
(i.e. unsetEdit()).

For primitives, PartDesignGui::ViewProviderPrimitive is responsible, and neither does it or relies on its parent
VP to do it when calling unsetEdit().

Solution:

Make PartDesignGui::ViewProviderPrimitive::unsetEdit() rely on parent PartDesignGui::ViewProvider to tidy up,
including closing the task dialog.

Reference:

This is the default stack call when closing a document while a PD task using PartDesignGui::Viewprovider is active:
Affected Issues
0004241
mod - src/Mod/PartDesign/Gui/ViewProviderPrimitive.cpp Diff File

Issue History

Date Modified Username Field Change
2020-01-08 08:34 JoshuaCall New Issue
2020-01-08 13:15 Kunda1 Status new => confirmed
2020-01-08 13:15 Kunda1 Note Added: 0014016
2020-01-08 13:16 Kunda1 Priority normal => immediate
2020-01-08 13:16 Kunda1 Target Version => 0.19
2020-06-07 11:59 abdullah Note Added: 0014493
2020-06-09 11:40 abdullah Changeset attached => FreeCAD master 11f55007
2020-06-09 11:40 abdullah Note Added: 0014519
2020-06-09 11:40 abdullah Assigned To => abdullah
2020-06-09 11:40 abdullah Status confirmed => closed
2020-06-09 11:40 abdullah Resolution open => fixed