Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.2, 5.9
-
None
-
0265a23bb02b68534bb3c86514cc93bc45a7444f
Description
The attached program crashes when QOpenGLWidget::grab() is called.
It would seem that the QPainter object created inside the paintGL() call steals internal data from the QPainter created in QWidgetPrivate::drawWidget().
The stack trace that I get is:
Qt5Cored.dll!qt_message_fatal(QtMsgType __formal, const QMessageLogContext & context, const QString & message) Line 1642 C++ Qt5Cored.dll!QMessageLogger::fatal(const char * msg, ...) Line 790 C++ Qt5Cored.dll!qt_assert(const char * assertion, const char * file, int line) Line 3018 C++ Qt5Guid.dll!QRasterPaintEngine::drawImage(const QRectF & r, const QImage & img, const QRectF & sr, QFlags<enum Qt::ImageConversionFlag> __formal) Line 2198 C++ Qt5Guid.dll!QPainter::drawImage(const QRectF & targetRect, const QImage & image, const QRectF & sourceRect, QFlags<enum Qt::ImageConversionFlag> flags) Line 5474 C++ Qt5Guid.dll!QPainter::drawImage(const QRect & r, const QImage & image) Line 840 C++ Qt5Widgetsd.dll!QWidgetPrivate::drawWidget(QPaintDevice * pdev, const QRegion & rgn, const QPoint & offset, int flags, QPainter * sharedPainter, QWidgetBackingStore * backingStore) Line 5601 C++ Qt5Widgetsd.dll!QWidgetPrivate::render(QPaintDevice * target, const QPoint & targetOffset, const QRegion & sourceRegion, QFlags<enum QWidget::RenderFlag> renderFlags) Line 5755 C++ Qt5Widgetsd.dll!QWidget::grab(const QRect & rectangle) Line 5251 C++ qglpainter.exe!main(int argc, char * * argv) Line 22 C++ > qglpainter.exe!WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, char * __formal, int __formal) Line 123 C++ [External Code]