Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.4.1, 5.5.0
-
None
-
edd555425a08f9e074f0a4d9333862636ccaae8d
Description
Testcase
#include <QApplication> #include <QGLContext> #include <QOpenGLContext> int main(int argc, char **argv) { QApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); QApplication app(argc, argv); QOpenGLContext *globalContext = QOpenGLContext::globalShareContext(); QOpenGLContext *context = new QOpenGLContext; context->setFormat(globalContext->format()); context->setShareContext(globalContext); if (!context->create()) qFatal("Could not create context"); Q_ASSERT(QOpenGLContext::areSharing(context, globalContext)); QGLContext *ctx = QGLContext::fromOpenGLContext(context); Q_UNUSED(ctx); }
Backtrace
0 QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData>>::data qscopedpointer.h 135 0x7ffff6076816 1 qGetPtrHelper<QScopedPointer<QObjectData>> qglobal.h 978 0x7ffff636a6d7 2 QObject::d_func qobject.h 110 0x7ffff636a8a8 3 QObject::thread qobject.cpp 1413 0x7ffff6360ec0 4 QGLSignalProxy::instance qgl.cpp 166 0x7ffff7b72546 5 QGLContext::~QGLContext qgl.cpp 2205 0x7ffff7b76165 6 QGLContext::~QGLContext qgl.cpp 2207 0x7ffff7b761c2 7 qDeleteQGLContext qgl.cpp 2155 0x7ffff7b75f66 8 QOpenGLContext::deleteQGLContext qopenglcontext.cpp 1102 0x7ffff6995925 9 QOpenGLContext::destroy qopenglcontext.cpp 629 0x7ffff69949e9 10 QOpenGLContext::~QOpenGLContext qopenglcontext.cpp 669 0x7ffff6994baa 11 QOpenGLContext::~QOpenGLContext qopenglcontext.cpp 674 0x7ffff6994bf4 12 QGuiApplicationPrivate::~QGuiApplicationPrivate qguiapplication.cpp 1367 0x7ffff6948dfb 13 QApplicationPrivate::~QApplicationPrivate qapplication.cpp 180 0x7ffff7289f06 14 QApplicationPrivate::~QApplicationPrivate qapplication.cpp 184 0x7ffff7289f38 15 QScopedPointerDeleter<QObjectData>::cleanup qscopedpointer.h 54 0x7ffff636d230 16 QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData>>::~QScopedPointer qscopedpointer.h 101 0x7ffff636b72f 17 QObject::~QObject qobject.cpp 883 0x7ffff63606f2 18 QCoreApplication::~QCoreApplication qcoreapplication.cpp 787 0x7ffff6328238 19 QGuiApplication::~QGuiApplication qguiapplication.cpp 564 0x7ffff6945d91 20 QApplication::~QApplication qapplication.cpp 811 0x7ffff728c199 21 main main.cpp 21 0x400ea7
Attachments
Issue Links
- replaces
-
QTBUG-49494 Check for qApp existence before moving thread
- Closed
For Gerrit Dashboard: QTBUG-44621 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
107028,2 | QtOpenGL: avoid crashing if creating a QGLContext sharing with the global QOpenGLContext | 5.4 | qt/qtbase | Status: MERGED | +2 | 0 |