Having played a bit with pyside, I know that segfaults are sometimes due to
some memory management issues (ownership issues to be correct). Maybe you could
strip down your application to the bare minimum to simplify the analysis of
those issues ?
(I'm sure you have already thought about that but well, I try to help a bit :-))
Stefan
On Thu, Jan 12, 2012 at 06:56:49AM -0800, Josh Stratton wrote:
> Now that pyside can successfully launch my window, my program
> immediately crashes in the paint function getting a QPainter from my
> QGLWidget-derived widget.
>
> void PanelGL::paintGL()
> {
> QPainter painter;
> painter.begin(this); // crash here
> ...
> }
>
> According to the stack trace below, calling begin() spawns a
> glCreateShader call, which is crashing my machine. Now that I'm
> starting my app from pyside, do I need to do anything differently in
> my C++ code to handle certain OpenGL workflows?
>
> #0 0x00007fffebdb311e in glCreateShader () from /usr/lib64/libGL.so
> #1 0x00000037ba268262 in ?? () from /usr/lib64/libQtOpenGL.so.4
> #2 0x00000037ba268a28 in
> QGLShader::QGLShader(QFlags<QGLShader::ShaderTypeBit>, QGLContext
> const*, QObject*) ()
> from /usr/lib64/libQtOpenGL.so.4
> #3 0x00000037ba27f199 in
> QGLEngineSharedShaders::QGLEngineSharedShaders(QGLContext const*) ()
> from /usr/lib64/libQtOpenGL.so.4
> #4 0x00000037ba27fcd8 in
> QGLEngineSharedShaders::shadersForContext(QGLContext const*) ()
> from /usr/lib64/libQtOpenGL.so.4
> #5 0x00000037ba27fdac in
> QGLEngineShaderManager::QGLEngineShaderManager(QGLContext*) ()
> from /usr/lib64/libQtOpenGL.so.4
> #6 0x00000037ba282fb8 in QGL2PaintEngineEx::begin(QPaintDevice*) ()
> from /usr/lib64/libQtOpenGL.so.4
> #7 0x00000037b97152e0 in QPainter::begin(QPaintDevice*) () from
> /usr/lib64/libQtGui.so.4
> #8 0x00007fffef9c402d in PanelGL::paintGL (this=0x1006030) at panelgl.cpp:117
> #9 0x00000037ba22da60 in QGLWidget::glDraw() () from
> /usr/lib64/libQtOpenGL.so.4
> #10 0x00000037ba22d3f9 in QGLWidget::paintEvent(QPaintEvent*) () from
> /usr/lib64/libQtOpenGL.so.4
> #11 0x00000037b9619fdc in QWidget::event(QEvent*) () from
> /usr/lib64/libQtGui.so.4
> #12 0x00000037ba22f988 in QGLWidget::event(QEvent*) () from
> /usr/lib64/libQtOpenGL.so.4
> #13 0x00000037b95c9994 in QApplicationPrivate::notify_helper(QObject*,
> QEvent*) () from /usr/lib64/libQtGui.so.4
> #14 0x00000037b95ce813 in QApplication::notify(QObject*, QEvent*) ()
> from /usr/lib64/libQtGui.so.4
> #15 0x00007ffff024b5b6 in ?? () from
> /usr/lib64/python2.7/site-packages/PySide/QtGui.so
> #16 0x00000037b8f7903c in QCoreApplication::notifyInternal(QObject*,
> QEvent*) () from /usr/lib64/libQtCore.so.4
> #17 0x00000037b9615c80 in QWidgetPrivate::drawWidget(QPaintDevice*,
> QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*)
> () from /usr/lib64/libQtGui.so.4
> #18 0x00000037b97dc867 in QWidgetPrivate::repaint_sys(QRegion const&)
> () from /usr/lib64/libQtGui.so.4
> #19 0x00000037b960c3e4 in QWidgetPrivate::syncBackingStore() () from
> /usr/lib64/libQtGui.so.4
> #20 0x00000037b961a4fc in QWidget::event(QEvent*) () from
> /usr/lib64/libQtGui.so.4
> #21 0x00000037ba22f988 in QGLWidget::event(QEvent*) () from
> /usr/lib64/libQtOpenGL.so.4
> #22 0x00000037b95c9994 in QApplicationPrivate::notify_helper(QObject*,
> QEvent*) () from /usr/lib64/libQtGui.so.4
> #23 0x00000037b95ce813 in QApplication::notify(QObject*, QEvent*) ()
> from /usr/lib64/libQtGui.so.4
> #24 0x00007ffff024b5b6 in ?? () from
> /usr/lib64/python2.7/site-packages/PySide/QtGui.so
> #25 0x00000037b8f7903c in QCoreApplication::notifyInternal(QObject*,
> QEvent*) () from /usr/lib64/libQtCore.so.4
> #26 0x00000037b8f7caca in
> QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
> ()
> from /usr/lib64/libQtCore.so.4
> #27 0x00000037b8fa7923 in ?? () from /usr/lib64/libQtCore.so.4
> #28 0x0000003039444a7d in g_main_context_dispatch () from
> /lib64/libglib-2.0.so.0
> #29 0x0000003039445278 in ?? () from /lib64/libglib-2.0.so.0
> #30 0x000000303944544c in g_main_context_iteration () from
> /lib64/libglib-2.0.so.0
> #31 0x00000037b8fa7d4f in
> QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
> ()
> from /usr/lib64/libQtCore.so.4
> #32 0x00000037b966c61e in ?? () from /usr/lib64/libQtGui.so.4
> #33 0x00000037b8f78172 in
> QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
> from /usr/lib64/libQtCore.so.4
> _______________________________________________
> PySide mailing list
> [email protected]
> http://lists.pyside.org/listinfo/pyside
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside