Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-39336

QSGDefaultDepthStencilBuffer crashes in glDeleteRenderBuffers

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.3.0
    • Fix Version/s: 5.4.0
    • Component/s: Quick: SceneGraph
    • Labels:
      None
    • Commits:
      ec559c38c349c38785bdcc265d7e0f852249cfb4

      Description

      Crash looks to me like QSGDefaultDepthStencilBuffer doesn't ensure that the context is bound before calling into functions. But I might be wrong on this.

      I reduced the crash to the relevant part in Qt.

      Thread 1 (Thread 0x7f55b5342900 (LWP 30947)):
      [KCrash Handler]
      #6 0x00007f55aab973a9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
      #7 0x00007f55aab9a4c8 in __GI_abort () at abort.c:89
      #8 0x00007f55abe5795d in qt_message_fatal (context=..., message=...) at global/qlogging.cpp:1340
      #9 0x00007f55abe55324 in QMessageLogger::fatal (this=0x7fff86ee5e20, msg=0x7f55ac1af438 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:669
      #10 0x00007f55abe4fa18 in qt_assert (assertion=0x7f55acabcb95 "context", file=0x7f55acabcb79 "opengl/qopenglfunctions.cpp", line=201) at global/qglobal.cpp:2124
      #11 0x00007f55ac9b773d in qt_gl_functions (context=0x0) at opengl/qopenglfunctions.cpp:201
      #12 0x00007f55ac9c85d3 in (anonymous namespace)::Resolver<QOpenGLFunctionsPrivate, void (int, unsigned int const*), 3, void>::operator()<int, unsigned int const*> (this=0x7fff86ee5fb0, p1=1, p2=0x39d2f18) at opengl/qopenglfunctions.cpp:2290
      #13 0x00007f55ac9baeac in qopenglfResolveDeleteRenderbuffers (n=1, renderbuffers=0x39d2f18) at opengl/qopenglfunctions.cpp:2748
      #14 0x00007f55b309a5f6 in QOpenGLFunctions::glDeleteRenderbuffers (this=0x39d2ef8, n=1, renderbuffers=0x39d2f18) at /home/martin/src/qt5/qtbase/include/QtGui/5.3.0/QtGui/private/../../../../../src/gui/opengl/qopenglfunctions.h:1325
      #15 0x00007f55b309a1c4 in QSGDefaultDepthStencilBuffer::free (this=0x39d2ef0) at scenegraph/util/qsgdepthstencilbuffer.cpp:153
      #16 0x00007f55b309a146 in QSGDefaultDepthStencilBuffer::~QSGDefaultDepthStencilBuffer (this=0x39d2ef0, __in_chrg=<optimized out>) at scenegraph/util/qsgdepthstencilbuffer.cpp:147
      #17 0x00007f55b309a182 in QSGDefaultDepthStencilBuffer::~QSGDefaultDepthStencilBuffer (this=0x39d2ef0, __in_chrg=<optimized out>) at scenegraph/util/qsgdepthstencilbuffer.cpp:148
      #18 0x00007f55b30ae64d in QtSharedPointer::CustomDeleter<QSGDepthStencilBuffer, QtSharedPointer::NormalDeleter>::execute (this=0x27cae80) at /home/martin/src/qt5/qtbase/include/QtCore/../../src/corelib/tools/qsharedpointer_impl.h:196
      #19 0x00007f55b30add83 in QtSharedPointer::ExternalRefCountWithCustomDeleter<QSGDepthStencilBuffer, QtSharedPointer::NormalDeleter>::deleter (self=0x27cae70) at /home/martin/src/qt5/qtbase/include/QtCore/../../src/corelib/tools/qsharedpointer_impl.h:214
      #20 0x00007f55b309a4d7 in QtSharedPointer::ExternalRefCountData::destroy (this=0x27cae70) at /home/martin/src/qt5/qtbase/include/QtCore/../../src/corelib/tools/qsharedpointer_impl.h:158
      #21 0x00007f55b309b42f in QSharedPointer<QSGDepthStencilBuffer>::deref (d=0x27cae70) at /home/martin/src/qt5/qtbase/include/QtCore/../../src/corelib/tools/qsharedpointer_impl.h:449
      #22 0x00007f55b30ad218 in QSharedPointer<QSGDepthStencilBuffer>::deref (this=0x3fd1018) at /home/martin/src/qt5/qtbase/include/QtCore/../../src/corelib/tools/qsharedpointer_impl.h:444
      #23 0x00007f55b30ac6e4 in QSharedPointer<QSGDepthStencilBuffer>::~QSharedPointer (this=0x3fd1018, __in_chrg=<optimized out>) at /home/martin/src/qt5/qtbase/include/QtCore/../../src/corelib/tools/qsharedpointer_impl.h:312
      #24 0x00007f55b3221a30 in QQuickShaderEffectTexture::~QQuickShaderEffectTexture (this=0x3fd0fb0, __in_chrg=<optimized out>) at items/qquickshadereffectsource.cpp:159
      #25 0x00007f55b3221a6c in QQuickShaderEffectTexture::~QQuickShaderEffectTexture (this=0x3fd0fb0, __in_chrg=<optimized out>) at items/qquickshadereffectsource.cpp:162
      #26 0x00007f55ac11d0d0 in qDeleteInEventHandler (o=0x3fd0fb0) at kernel/qobject.cpp:4345
      #27 0x00007f55ac114df8 in QObject::event (this=0x3fd0fb0, e=0x322b190) at kernel/qobject.cpp:1232
      #28 0x00007f55acf460ea in QApplicationPrivate::notify_helper (this=0x257e730, receiver=0x3fd0fb0, e=0x322b190) at kernel/qapplication.cpp:3500
      #29 0x00007f55acf4387c in QApplication::notify (this=0x7fff86ee8ac0, receiver=0x3fd0fb0, e=0x322b190) at kernel/qapplication.cpp:2953
      #30 0x00007f55b4d96d7e in KWin::Application::notify (this=0x7fff86ee8ac0, o=0x3fd0fb0, e=0x322b190) at /home/martin/src/kf5/kde/workspace/kwin/main.cpp:344
      #31 0x00007f55ac0d9a32 in QCoreApplication::notifyInternal (this=0x7fff86ee8ac0, receiver=0x3fd0fb0, event=0x322b190) at kernel/qcoreapplication.cpp:935
      #32 0x00007f55ac0dd65b in QCoreApplication::sendEvent (receiver=0x3fd0fb0, event=0x322b190) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:237
      #33 0x00007f55ac0dad49 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=52, data=0x2569590) at kernel/qcoreapplication.cpp:1539
      #34 0x00007f55ac0da6fa in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=52) at kernel/qcoreapplication.cpp:1397
      #35 0x00007f55b31052fa in QQuickWindow::~QQuickWindow (this=0x2de3c40, __in_chrg=<optimized out>) at items/qquickwindow.cpp:1089
      #36 0x00007f55b31053fa in QQuickWindow::~QQuickWindow (this=0x2de3c40, __in_chrg=<optimized out>) at items/qquickwindow.cpp:1095

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              sletta Gunnar Sletta
              Reporter:
              mgraesslin Martin Gräßlin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes