[SOLVED] FreeCAD crashes when deleting a SectionPlane in TechDraw

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!
marcuspollio
Posts: 2
Joined: Mon Feb 18, 2019 1:25 pm

[SOLVED] FreeCAD crashes when deleting a SectionPlane in TechDraw

Postby marcuspollio » Mon Feb 18, 2019 2:13 pm

Hi everyone !

First, thanks a lot for the development of FreeCAD and its community ! It is a great software and is becoming more and more pleasant to use !
I have only used it for a few hours and I already enjoy, although a lot of UI/UX polishing and consistency would be very welcome :D
I write this forum ticket before submitting a bug report, as it is my first one :roll:
Hope that it is not a duplicate of an already reported one :mrgreen:

Name of the bug
FreeCAD crashes when deleting a SectionPlane in TechDraw

Description of the error
When in TechDraw workbench, the deletion of a selected SectionPlane created with the NewArch form an ArchView crashes the software.

Steps to reproduce the error
1) Launch FreeCAD
2) Create a new empty document (Ctrl+N)
3) Change to Arch workbench
4) Create an Arch Object (for instance a wall WA)
5) With the Arch Object still selected to include it, create a Section Plane (SE)
6) Change to TechDraw workbench
7) Insert a new default Page
8) With the Section Plane selected, insert a view of the Section Plan from Arch workbench
9) The new ArchView Section Plane is inserted on the Page
10) Select the newly added ArchView Section Plane in the model tree (just below the Page and its template) and delete it (Del)
11) FreeCAD crashes

System informations
OS: xxx Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15900 (Git) AppImage
Build type: Release
Branch: master
Hash: a73b10203ab1cb31df4a8763b050d64da8e81580
Python version: 3.6.7
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: xxx

No error messages in the report or Python console since it crashes almost instantaneously

Error log

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
#0  /usr/lib/libc.so.6(+0x37e00) [0x7f8b8eba4e00]
#1  /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5(+0x488378) [0x7f8b9060c378]
#2  /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5(+0x48732a) [0x7f8b9060b32a]
#3  /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5(+0x487386) [0x7f8b9060b386]
#4  /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5(+0x48732a) [0x7f8b9060b32a]
#5  /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5(+0x487403) [0x7f8b9060b403]
#6  /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5(+0x48b27d) [0x7f8b9060f27d]
#7  /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5(+0x48b533) [0x7f8b9060f533]
#8  /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5(+0x490b17) [0x7f8b90614b17]
#9  0x7f8b905ee295 in QGraphicsScene::items(QRectF const&, Qt::ItemSelectionMode, Qt::SortOrder, QTransform const&) const from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5+0x15
#10  /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5(+0x46a476) [0x7f8b905ee476]
#11  /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5(+0x475fa6) [0x7f8b905f9fa6]
#12  0x7f8b905fa32b in QGraphicsScene::mouseMoveEvent(QGraphicsSceneMouseEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5+0x9b
#13  0x7f8b90604554 in QGraphicsScene::event(QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5+0x214
#14  0x7f8b902e1c6c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5+0x9c
#15  0x7f8b902e62ea in QApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5+0x3fa
#16  0x7f8b94346eb1 in Gui::GUIApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libFreeCADGui.so+0x41
#17  0x7f8b8f933425 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Core.so.5+0x75
#18  0x7f8b9062042c in QGraphicsViewPrivate::mouseMoveEventHandler(QMouseEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5+0x20c
#19  0x7f8b903242e6 in QWidget::event(QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5+0x516
#20  0x7f8b9042286e in QFrame::event(QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5+0x1e
#21  0x7f8b90622d63 in QGraphicsView::viewportEvent(QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5+0x1d3
#22  0x7f8b8f9332f1 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Core.so.5+0xf1
#23  0x7f8b902e1c45 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5+0x75
#24  0x7f8b902e6b5d in QApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5+0xc6d
#25  0x7f8b94346eb1 in Gui::GUIApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libFreeCADGui.so+0x41
#26  0x7f8b8f933425 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Core.so.5+0x75
#27  0x7f8b902e5860 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5+0x1a0
#28  /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5(+0x1b9cd1) [0x7f8b9033dcd1]
#29  /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5(+0x1bc2c3) [0x7f8b903402c3]
#30  0x7f8b902e1c6c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5+0x9c
#31  0x7f8b902e62ea in QApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Widgets.so.5+0x3fa
#32  0x7f8b94346eb1 in Gui::GUIApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libFreeCADGui.so+0x41
#33  0x7f8b8f933425 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Core.so.5+0x75
#34  0x7f8b8fcd77db in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Gui.so.5+0x40b
#35  0x7f8b8fcd8f75 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Gui.so.5+0x115
#36  0x7f8b8fcba74b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Gui.so.5+0x7b
#37  /tmp/.mount_FreeCAFE1NPr/usr/lib/libQt5XcbQpa.so.5(+0xa05d0) [0x7f8b892f55d0]
#38  /tmp/.mount_FreeCAFE1NPr/usr/lib/libglib-2.0.so.0(+0x569be) [0x7f8b8bb4f9be]
#39  /tmp/.mount_FreeCAFE1NPr/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x33) [0x7f8b8bb50826]
#40  /tmp/.mount_FreeCAFE1NPr/usr/lib/libglib-2.0.so.0(+0x57a0b) [0x7f8b8bb50a0b]
#41  /tmp/.mount_FreeCAFE1NPr/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x4a) [0x7f8b8bb50acf]
#42  0x7f8b8f98498c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Core.so.5+0x5c
#43  0x7f8b8f93153b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Core.so.5+0xfb
#44  0x7f8b8f939466 in QCoreApplication::exec() from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libQt5Core.so.5+0x86
#45  0x7f8b942e40fb in Gui::Application::runApplication() from /tmp/.mount_FreeCAFE1NPr/usr/bin/../lib/libFreeCADGui.so+0x153b
#46  /tmp/.mount_FreeCAFE1NPr/usr/bin/FreeCAD(main+0x6c9) [0x403829]
#47  /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7f8b8eb91223]
#48  /tmp/.mount_FreeCAFE1NPr/usr/bin/FreeCAD() [0x404699]
/tmp/.mount_FreeCAFE1NPr/AppRun : ligne 10 :  7670 Erreur de segmentation  (core dumped)${HERE}/usr/bin/FreeCAD "$@"

Please tell me if you happen to have the same crash or if I missed something before submitting the bug to the tracker.
Thanks a lot !
Last edited by marcuspollio on Fri Mar 08, 2019 11:11 pm, edited 1 time in total.
User avatar
wandererfan
Posts: 3149
Joined: Tue Nov 06, 2012 5:42 pm

Re: [Bug Report] FreeCAD crashes when deleting a SectionPlane in TechDraw

Postby wandererfan » Mon Feb 18, 2019 6:03 pm

marcuspollio wrote:
Mon Feb 18, 2019 2:13 pm
FreeCAD crashes when deleting a SectionPlane in TechDraw
Are you able to post the FCStd file from just before the deletion and crash?
marcuspollio
Posts: 2
Joined: Mon Feb 18, 2019 1:25 pm

Re: [Bug Report] FreeCAD crashes when deleting a SectionPlane in TechDraw

Postby marcuspollio » Mon Feb 18, 2019 8:10 pm

Yes, sure:
techdraw_crash_1.FCStd
(22.7 KiB) Downloaded 3 times
EDIT: after opening the linked file, FreeCAD does not crash. Will investigate further :mrgreen:

SECOND EDIT: Opening an existing file prevents the crash. Saving the newly created file does not prevent the crash though. In any case, FreeCAD should not crash :lol:

THIRD EDIT: Windows version does not crash neither newer Qt on Linux (5.12 for me on Arch). Feel free to reopen this ticket if it still occurs.
Last edited by marcuspollio on Fri Mar 08, 2019 11:13 pm, edited 1 time in total.
User avatar
wandererfan
Posts: 3149
Joined: Tue Nov 06, 2012 5:42 pm

Re: [Bug Report] FreeCAD crashes when deleting a SectionPlane in TechDraw

Postby wandererfan » Tue Feb 19, 2019 1:03 pm

marcuspollio wrote:
Mon Feb 18, 2019 2:13 pm
FreeCAD crashes when deleting a SectionPlane in TechDraw
I can not duplicate this with:
freecad-daily
OS: Linux Mint 19
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15860 (Git)
Build type: Release
Branch: master
Hash: 3b708c7f84b0425076b520e1d95627b20fd75fe0
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Canada (en_CA)

local build
OS: Linux Mint 19
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15901 (Git)
Build type: debug
Branch: TDFixes
Hash: 4e42e42957efcfb4610d0ea8f67f734342001674
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Canada (en_CA)

My Qt version is newer than yours and the failure is deep in libQt5Widgets. Can you try with newer Qt version?