View Revisions: Issue #2971

Summary 0002971: hiding foreground TechDraw page from Python causes segfault
Revision 2017-03-20 12:30 by Kunda1
Steps To Reproduce 1. Create a new document
2. Create an empty TechDraw page
3. Try to hide it from the python console:


obj = FreeCAD.ActiveDocument.getObject("Page")
obj.ViewObject.hide()

Then FreeCAD segfaults:


Program received signal SIGSEGV, Segmentation fault.
#0  [0xb774ad2c]
#1  0xb5b46ced in QWidget::mapToParent(QPoint const&) const from /usr/lib/i386-linux-gnu/libQtGui.so.4+0xd
0000002  0xb5b46d6b in QWidget::mapTo(QWidget*, QPoint const&) const from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x5b
0000003  /usr/lib/i386-linux-gnu/libQtGui.so.4(+0x382d71) [0xb5d48d71]
0000004  /usr/lib/i386-linux-gnu/libQtGui.so.4(+0x384326) [0xb5d4a326]
0000005  0xb5b47057 in QWidgetPrivate::syncBackingStore() from /usr/lib/i386-linux-gnu/libQtGui.so.4+0xa7
0000006  0xb5b5b626 in QWidget::event(QEvent*) from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x536
0000007  0xb5f85112 in QMainWindow::event(QEvent*) from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x122
0000008  0xb718125b in Gui::MainWindow::event(QEvent*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x6b
0000009  0xb5afc64a in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x9a
0000010  0xb5b03951 in QApplication::notify(QObject*, QEvent*) from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x2e1
0000011  0xb6ec6b7d in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x5d
0000012  0xb584457a in QCoreApplication::notifyInternal(QObject*, QEvent*) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x8a
0000013  0xb5848266 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x3a6
0000014  0xb5848595 in QCoreApplication::sendPostedEvents(QObject*, int) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x25
0000015  /usr/lib/i386-linux-gnu/libQtCore.so.4(+0x1b6f91) [0xb5876f91]
0000016  /lib/i386-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x299) [0xb1a4cee9]
0000017  /lib/i386-linux-gnu/libglib-2.0.so.0(+0x47189) [0xb1a4d189]
0000018  /lib/i386-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x34) [0xb1a4d254]
0000019  0xb58770f5 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x75
0000020  /usr/lib/i386-linux-gnu/libQtGui.so.4(+0x1f3b66) [0xb5bb9b66]
0000021  0xb5842c5d in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x4d
0000022  0xb5842fee in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x1ae
0000023  0xb58495f6 in QCoreApplication::exec() from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x96
0000024  0xb5afa4e4 in QApplication::exec() from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x24
0000025  0xb6e7cd69 in Gui::Application::runApplication() from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x16a9
0000026  freecad-daily(main+0x645) [0x804a985]
0000027  /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf7) [0xb538d637]
0000028  freecad-daily() [0x804bc58]
Revision 2017-03-18 21:06 by sankey
Steps To Reproduce 1. Create a new document
2. Create an empty TechDraw page
3. Try to hide it from the python console:


obj = FreeCAD.ActiveDocument.getObject("Page")
obj.ViewObject.hide()

Then FreeCAD segfaults:


Program received signal SIGSEGV, Segmentation fault.
#0  [0xb774ad2c]
#1  0xb5b46ced in QWidget::mapToParent(QPoint const&) const from /usr/lib/i386-linux-gnu/libQtGui.so.4+0xd
0000002  0xb5b46d6b in QWidget::mapTo(QWidget*, QPoint const&) const from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x5b
0000003  /usr/lib/i386-linux-gnu/libQtGui.so.4(+0x382d71) [0xb5d48d71]
0000004  /usr/lib/i386-linux-gnu/libQtGui.so.4(+0x384326) [0xb5d4a326]
0000005  0xb5b47057 in QWidgetPrivate::syncBackingStore() from /usr/lib/i386-linux-gnu/libQtGui.so.4+0xa7
0000006  0xb5b5b626 in QWidget::event(QEvent*) from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x536
0000007  0xb5f85112 in QMainWindow::event(QEvent*) from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x122
0000008  0xb718125b in Gui::MainWindow::event(QEvent*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x6b
0000009  0xb5afc64a in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x9a
0000010  0xb5b03951 in QApplication::notify(QObject*, QEvent*) from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x2e1
0000011  0xb6ec6b7d in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x5d
0000012  0xb584457a in QCoreApplication::notifyInternal(QObject*, QEvent*) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x8a
0000013  0xb5848266 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x3a6
0000014  0xb5848595 in QCoreApplication::sendPostedEvents(QObject*, int) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x25
0000015  /usr/lib/i386-linux-gnu/libQtCore.so.4(+0x1b6f91) [0xb5876f91]
0000016  /lib/i386-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x299) [0xb1a4cee9]
0000017  /lib/i386-linux-gnu/libglib-2.0.so.0(+0x47189) [0xb1a4d189]
0000018  /lib/i386-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x34) [0xb1a4d254]
0000019  0xb58770f5 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x75
0000020  /usr/lib/i386-linux-gnu/libQtGui.so.4(+0x1f3b66) [0xb5bb9b66]
0000021  0xb5842c5d in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x4d
0000022  0xb5842fee in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x1ae
0000023  0xb58495f6 in QCoreApplication::exec() from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x96
0000024  0xb5afa4e4 in QApplication::exec() from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x24
0000025  0xb6e7cd69 in Gui::Application::runApplication() from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x16a9
0000026  freecad-daily(main+0x645) [0x804a985]
0000027  /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf7) [0xb538d637]
0000028  freecad-daily() [0x804bc58]