Bug 66628

Summary: [Qt] QWebSpellChecker plugins crash webkit
Product: WebKit Reporter: Lindsay Mathieson <lindsay.mathieson>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Major CC: adawit, benjamin, webkit.review.bot
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Lindsay Mathieson 2011-08-20 20:13:56 PDT
TextCheckerClientQt.cpp loads the plugin via a locla instance of QtPlatformPlugin - when this is destroyed it unloads the plugin, leaving a QWebSpellChecker pointer to invalid memory.
Comment 1 Dawit A. 2011-08-20 20:25:11 PDT
(In reply to comment #0)
> TextCheckerClientQt.cpp loads the plugin via a locla instance of QtPlatformPlugin - when this is destroyed it unloads the plugin, leaving a QWebSpellChecker pointer to invalid memory.

I think you forget to post the patch...
Comment 2 Lindsay Mathieson 2011-08-20 20:41:37 PDT
Created attachment 104624 [details]
Patch
Comment 3 Lindsay Mathieson 2011-08-20 20:42:38 PDT
(In reply to comment #1)
> (In reply to comment #0)
> > TextCheckerClientQt.cpp loads the plugin via a locla instance of QtPlatformPlugin - when this is destroyed it unloads the plugin, leaving a QWebSpellChecker pointer to invalid memory.
> 
> I think you forget to post the patch...

Done - still battling with the upload scripts :)
Comment 4 Lindsay Mathieson 2011-08-21 04:58:08 PDT
Created attachment 104627 [details]
Patch
Comment 5 Benjamin Poulain 2011-08-21 06:21:44 PDT
Comment on attachment 104627 [details]
Patch

The patch seems to be the correct fix but the Changelog  is not correctly formatted.

It should be:

-title
-url

-reviewer line

-description

-changelist with more description if necessary.
----
The description could also be better. Something briefly explaining the bug e.g.:
"The QtPlatformPlugin was allocated on the stack, so its destructor is unloading the plugin at the end of the scope.

This patch moves the local creation of QtPlatformPlugin to class member (TextCheckerClientQt::m_platformPlugin), preventing premature unloading of plugin."
Comment 6 Lindsay Mathieson 2011-08-21 06:33:28 PDT
Created attachment 104628 [details]
Patch
Comment 7 Lindsay Mathieson 2011-08-21 06:34:32 PDT
(In reply to comment #6)
(In reply to comment #5)
> (From update of attachment 104627 [details])
> The patch seems to be the correct fix but the Changelog  is not correctly formatted.

Done, thanks,
Comment 8 Benjamin Poulain 2011-08-21 07:41:15 PDT
Comment on attachment 104628 [details]
Patch

Great, let's land it.
Comment 9 WebKit Review Bot 2011-08-21 08:54:07 PDT
Comment on attachment 104628 [details]
Patch

Clearing flags on attachment: 104628

Committed r93490: <http://trac.webkit.org/changeset/93490>
Comment 10 WebKit Review Bot 2011-08-21 08:54:11 PDT
All reviewed patches have been landed.  Closing bug.