Bug 121139 - [Qt][Windows] Crash on resizing Webkit plugin
Summary: [Qt][Windows] Crash on resizing Webkit plugin
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 525.x (Safari 3.2)
Hardware: PC Windows 7
: P2 Critical
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-10 21:22 PDT by shob_28
Modified: 2014-01-28 20:40 PST (History)
3 users (show)

See Also:


Attachments
Sample application to reproduce the crash (4.64 KB, application/x-zip-compressed)
2013-09-10 21:22 PDT, shob_28
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description shob_28 2013-09-10 21:22:28 PDT
Created attachment 211277 [details]
Sample application to reproduce the crash

The attached sample application uses QtWebKit's QWebPluginFactory to add a simple OpenGL based plugin(QGLWidget based).
On resizing the application , it crashes in QPainter::save() with a warning message "QPaintDevice: Cannot destroy paint device that is being painted"

This crash happens only on windows and I am able to resize the app without issues on mac.

Tested with Qt 5.1.1, msvc c++ compiler(visual studio 2012), windows 7

Also, it appears that this bug has been introduced after QT4.8.4 as the crash does not occur when tested with Qt4.8.4

The crash log I see appears to be similar to the issue reported in https://bugs.webkit.org/show_bug.cgi?id=109785
I have added my comments to this bug as well.

Attached is a simple sample application that demonstrates the crash.

Crash log:
0	QPainter::save	qpainter.cpp	1581	0xbcd94a	
1	WebCore::GraphicsContext::savePlatformState	GraphicsContextQt.cpp	349	0x29b4260	
2	WebCore::GraphicsContext::save	GraphicsContext.cpp	103	0x29aae32	
3	QWebFrameAdapter::renderRelativeCoords	QWebFrameAdapter.cpp	520	0x25c8c8e	
4	QWebFrame::render	qwebframe.cpp	643	0xf94ac06	
5	QWebFrame::render	qwebframe.cpp	654	0xf94abc4	
6	QWebView::paintEvent	qwebview.cpp	831	0xf95a868	
7	QWidget::event	qwidget.cpp	8043	0x648c6d8f	
8	QWebView::event	qwebview.cpp	730	0xf95a465	
9	QApplicationPrivate::notify_helper	qapplication.cpp	3457	0x6488131e	
10	QApplication::notify	qapplication.cpp	3422	0x6487f3ac	
11	QCoreApplication::notifyInternal	qcoreapplication.cpp	867	0x66c7fdc4	
12	QCoreApplication::sendSpontaneousEvent	qcoreapplication.h	235	0x66d91938	
13	QWidgetPrivate::drawWidget	qwidget.cpp	5132	0x648cc61e	
14	QWidgetPrivate::paintSiblingsRecursive	qwidget.cpp	5327	0x648ccc8a	
15	QWidgetPrivate::drawWidget	qwidget.cpp	5185	0x648cc90c	
16	QWidgetBackingStore::sync	qwidgetbackingstore.cpp	1093	0x64890c36	
17	QWidgetPrivate::syncBackingStore	qwidget.cpp	1678	0x648ce501	
18	QWidgetWindow::handleResizeEvent	qwidgetwindow.cpp	539	0x6490051b	
19	QWidgetWindow::event	qwidgetwindow.cpp	181	0x648ff61a	
20	QApplicationPrivate::notify_helper	qapplication.cpp	3457	0x6488131e	
21	QApplication::notify	qapplication.cpp	2878	0x6487d58c	
22	QCoreApplication::notifyInternal	qcoreapplication.cpp	867	0x66c7fdc4	
23	QCoreApplication::sendSpontaneousEvent	qcoreapplication.h	235	0x66d91938	
24	QGuiApplicationPrivate::processGeometryChangeEvent	qguiapplication.cpp	1747	0x9472ed	
...	<More>
Comment 1 Michael Brüning 2013-09-11 08:49:25 PDT
I can reproduce the crash also on Linux.
Comment 2 shob_28 2013-09-11 16:10:15 PDT
Additional Information:
This crash occurs only when QWindows(with OpenGL SurfaceType) or QGLWidget is used in the webkit plugin. If the below line is commented out in the attached sample application, the crash does not occur.
//m_view->setViewport(new QGLWidget());


On Mac on resizing the application, the below warning messages appear but the application does not crash.
QWidget::repaint: Recursive repaint detected