QOpenGLWidget crashes when added to layout



  • I have custom program where we use native OpenGL code to draw to native window ID of Widget.

    Downside of that approach is inability to draw transparent widgets on top of QWidget, since drawings do not happen in QT Context.

    I am looking to adopt QOpenGLWidget to solve this.

    My Layout looks like this . MainWindow -> QWidget which holds the QOpenGLWidget

    Moment this QOpenGLWidget is added to layout of QWidget it crashes with below stack in MAC OS. Any Solution to solve this ?

    #0 0x98d74783 in gleRunVertexSubmitImmediate ()
    #1 0x98d71980 in gleLLVMArrayFunc ()
    #2 0x98c38a49 in glDrawArrays_Exec ()
    #3 0x90fa2933 in glDrawArrays ()
    #4 0x0518719a in QOpenGLTextureBlitterPrivate::blit(unsigned int, QMatrix4x4 const&, QOpenGLTextureBlitter::Origin) ()
    #5 0x05187a79 in QOpenGLTextureBlitter::blit(unsigned int, QMatrix4x4 const&, QOpenGLTextureBlitter::Origin) ()
    #6 0x050ce128 in QPlatformBackingStore::composeAndFlush(QWindow*, QRegion const&, QPoint const&, QPlatformTextureList*, QOpenGLContext*, bool) ()
    #7 0x0539fd5e in QWidgetBackingStore::qt_flush(QWidget*, QRegion const&, QBackingStore*, QWidget*, QPoint const&, QPlatformTextureList*, QWidgetBackingStore*) ()
    #8 0x053a2fed in QWidgetBackingStore::sync(QWidget*, QRegion const&) ()
    #9 0x053c97cf in QWidgetPrivate::syncBackingStore(QRegion const&) ()
    #10 0x053f72a8 in QWidgetWindow::handleExposeEvent(QExposeEvent*) ()
    #11 0x053f485e in QWidgetWindow::event(QEvent*) ()
    #12 0x05397485 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
    #13 0x0539a96e in QApplication::notify(QObject*, QEvent*) ()
    #14 0x040f6e40 in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
    #15 0x04e1500d in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) ()
    #16 0x04dfc2dc in QWindowSystemInterface::sendWindowSystemEvents(QFlagsQEventLoop::ProcessEventsFlag) ()
    #17 0x04dfa499 in QWindowSystemInterface::flushWindowSystemEvents(QFlagsQEventLoop::ProcessEventsFlag) ()
    #18 0x08310217 in QCocoaWindow::setVisible(bool) ()
    #19 0x04e1b222 in QWindow::setVisible(bool) ()
    #20 0x053d6bbd in QWidgetPrivate::show_sys() ()
    #21 0x053d7ae5 in QWidgetPrivate::show_helper() ()
    #22 0x053d8575 in QWidget::setVisible(bool) ()
    #23 0x053d788e in QWidget::show() ()


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Can you provide a minimal compilable example to reproduce that crash ?

    What version of OS X are you running ? What version of Qt are you using ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.