View Issue Details

IDProjectCategoryView StatusLast Update
0002971TechDrawBugpublic2017-05-10 16:10
Reportersankey Assigned Towandererfan  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSUbuntuOS Version16.04
Product Version0.17 
Target Version0.17Fixed in Version0.17 
Summary0002971: hiding foreground TechDraw page from Python causes segfault
DescriptionIf a TechDraw page is open in a window in the foreground, and I try to close (hide) it from the Python console, or by running a Python macro, FreeCAD segfaults.
Steps To Reproduce1. 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]
Additional InformationOS: Ubuntu 16.04.1 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.17.10476 (Git)
Build type: None
Branch: master
Hash: b6150097e9cf4d7b0f5ad71f2f8750f2e7aac0d9
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Tagspython
FreeCAD Information

Relationships

related to 0002972 closedwandererfan TechDraw PDF export from Python can only make PDFs of a Page in foreground 

Activities

sankey

2017-03-18 21:10

reporter   ~0008649

I can't figure out how to paste the backtrace without mantis doing something weird to it, so i'll just try attaching it.
bt.txt (2,642 bytes)   
Program received signal SIGSEGV, Segmentation fault.
#0  [0xb7737d2c]
#1  0xb5b33d7f in QWidget::mapTo(QWidget*, QPoint const&) const from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x6f
#2  /usr/lib/i386-linux-gnu/libQtGui.so.4(+0x382d71) [0xb5d35d71]
#3  /usr/lib/i386-linux-gnu/libQtGui.so.4(+0x384326) [0xb5d37326]
#4  0xb5b34057 in QWidgetPrivate::syncBackingStore() from /usr/lib/i386-linux-gnu/libQtGui.so.4+0xa7
#5  0xb5b48626 in QWidget::event(QEvent*) from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x536
#6  0xb5f72112 in QMainWindow::event(QEvent*) from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x122
#7  0xb716e25b in Gui::MainWindow::event(QEvent*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x6b
#8  0xb5ae964a in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x9a
#9  0xb5af0951 in QApplication::notify(QObject*, QEvent*) from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x2e1
#10  0xb6eb3b7d in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x5d
#11  0xb583157a in QCoreApplication::notifyInternal(QObject*, QEvent*) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x8a
#12  0xb5835266 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x3a6
#13  0xb5835595 in QCoreApplication::sendPostedEvents(QObject*, int) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x25
#14  /usr/lib/i386-linux-gnu/libQtCore.so.4(+0x1b6f91) [0xb5863f91]
#15  /lib/i386-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x299) [0xb1a39ee9]
#16  /lib/i386-linux-gnu/libglib-2.0.so.0(+0x47189) [0xb1a3a189]
#17  /lib/i386-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x34) [0xb1a3a254]
#18  0xb58640f5 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x75
#19  /usr/lib/i386-linux-gnu/libQtGui.so.4(+0x1f3b66) [0xb5ba6b66]
#20  0xb582fc5d in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x4d
#21  0xb582ffee in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x1ae
#22  0xb58365f6 in QCoreApplication::exec() from /usr/lib/i386-linux-gnu/libQtCore.so.4+0x96
#23  0xb5ae74e4 in QApplication::exec() from /usr/lib/i386-linux-gnu/libQtGui.so.4+0x24
#24  0xb6e69d69 in Gui::Application::runApplication() from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x16a9
#25  freecad-daily(main+0x645) [0x804a985]
#26  /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf7) [0xb537a637]
#27  freecad-daily() [0x804bc58]
bt.txt (2,642 bytes)   

Kunda1

2017-03-20 12:34

administrator   ~0008658

@wandererfan would this ticket be considered TD or general FC ?

Kunda1

2017-04-28 02:26

administrator   ~0008791

@wandererfan wrote:
Confirmed, but not surprising. From TechDraw Roadmap

Python Bindings
The python bindings for basic TechDraw functions have fallen behind the C++ functions. The python routines need to be reviewed and brought up to date. 

Related Changesets

FreeCAD: master 36960df7

2017-05-09 00:46:44

WandererFan


Committer: wmayer Details Diff
Fix 0002971 segfault on hide() current page from Python Affected Issues
0002971
mod - src/Mod/TechDraw/Gui/ViewProviderPage.cpp Diff File

Issue History

Date Modified Username Field Change
2017-03-18 21:06 sankey New Issue
2017-03-18 21:10 sankey File Added: bt.txt
2017-03-18 21:10 sankey Note Added: 0008649
2017-03-20 12:30 Kunda1 Steps to Reproduce Updated
2017-03-20 12:31 Kunda1 Project FreeCAD => TechDraw
2017-03-20 12:33 Kunda1 Relationship added related to 0002972
2017-03-20 12:33 Kunda1 Severity minor => crash
2017-03-20 12:34 Kunda1 Note Added: 0008658
2017-04-28 02:26 Kunda1 Note Added: 0008791
2017-04-28 02:27 Kunda1 Status new => confirmed
2017-04-28 02:27 Kunda1 Target Version => 0.17
2017-04-28 11:22 Kunda1 Tag Attached: python
2017-05-10 16:09 wmayer Changeset attached => FreeCAD master 36960df7
2017-05-10 16:10 wmayer Assigned To => wandererfan
2017-05-10 16:10 wmayer Status confirmed => closed
2017-05-10 16:10 wmayer Resolution open => fixed
2017-05-10 16:10 wmayer Fixed in Version => 0.17