[PyQt] PyQt3D: crash on Qt3DWindow.setRootEntity

Shawn Douglas shawn.douglas at gmail.com
Sat Nov 19 07:25:20 GMT 2016


I'm getting a "Segmentation fault: 11" in trying to port the
"basicshapes-py.py" example into an existing application, but am having
trouble in diagnosing the problem.

My application uses a QMainWindow, so I initialize the
basicshapes's widget, and then set it as MainWindow's central widget using
setCentralWidget. This segfaults, and below is the report.

I have tracked down the specific line that causes the crash to
"view.setRootEntity(rootEntity)". Commenting this out allows the
application to load, albeit without displaying any 3D shapes.

I successfully tested simply wrapping the basicshapes-py example in a
MainWindow, so it seems that there may be something else going on, but I'm
not sure what that is. Any suggestions would be appreciated.

Thanks,
Shawn

---

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       EXC_I386_GPFLT

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.qt-project.Qt3DCore       0x000000010cd7de08
Qt3DCore::QNode::setParent(Qt3DCore::QNode*) + 40
1   org.qt-project.Qt3DExtras     0x000000010ce44fd1
Qt3DExtras::Qt3DWindow::showEvent(QShowEvent*) + 49
2   Qt3DExtras.so                 0x000000010cdde573
sipQt3DExtras_Qt3DWindow::showEvent(QShowEvent*) + 115
3   org.qt-project.QtGui           0x0000000103afb979
QWindow::event(QEvent*) + 777
4   Qt3DExtras.so                 0x000000010cdddf03
sipQt3DExtras_Qt3DWindow::event(QEvent*) + 115
5   org.qt-project.QtWidgets       0x0000000104693e3d
QApplicationPrivate::notify_helper(QObject*, QEvent*) + 269
6   org.qt-project.QtWidgets       0x0000000104696782
QApplication::notify(QObject*, QEvent*) + 5906
7   QtWidgets.so                   0x00000001040effd2
sipQApplication::notify(QObject*, QEvent*) + 114
8   org.qt-project.QtCore         0x00000001032d3494
QCoreApplication::notifyInternal2(QObject*, QEvent*) + 164
9   org.qt-project.QtGui           0x0000000103af7ec0
QWindow::setVisible(bool) + 752
10  org.qt-project.QtWidgets       0x00000001046f8045
QWindowContainer::event(QEvent*) + 757
11  org.qt-project.QtWidgets       0x0000000104693e3d
QApplicationPrivate::notify_helper(QObject*, QEvent*) + 269
12  org.qt-project.QtWidgets       0x0000000104696782
QApplication::notify(QObject*, QEvent*) + 5906
13  QtWidgets.so                   0x00000001040effd2
sipQApplication::notify(QObject*, QEvent*) + 114
14  org.qt-project.QtCore         0x00000001032d3494
QCoreApplication::notifyInternal2(QObject*, QEvent*) + 164
15  org.qt-project.QtWidgets       0x00000001046d2719
QWidgetPrivate::show_helper() + 409
16  org.qt-project.QtWidgets       0x00000001046d331c
QWidget::setVisible(bool) + 956
17  org.qt-project.QtWidgets       0x00000001046d2913
QWidgetPrivate::showChildren(bool) + 275
18  org.qt-project.QtWidgets       0x00000001046d25cc
QWidgetPrivate::show_helper() + 76
19  org.qt-project.QtWidgets       0x00000001046d331c
QWidget::setVisible(bool) + 956
20  QtWidgets.so                   0x00000001042cb9ec
sipQWidget::setVisible(bool) + 108
21  org.qt-project.QtWidgets       0x00000001046d2913
QWidgetPrivate::showChildren(bool) + 275
22  org.qt-project.QtWidgets       0x00000001046d25cc
QWidgetPrivate::show_helper() + 76
23  org.qt-project.QtWidgets       0x00000001046d331c
QWidget::setVisible(bool) + 956
24  QtWidgets.so                   0x00000001041f78fc
sipQMainWindow::setVisible(bool) + 108
25  QtWidgets.so                   0x00000001042d7157
meth_QWidget_show(_object*, _object*) + 87
26  org.python.python             0x00000001025bf24d PyCFunction_Call + 273
etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20161118/6c808025/attachment.html>


More information about the PyQt mailing list