Bug 66628 - [Qt] QWebSpellChecker plugins crash webkit
Summary: [Qt] QWebSpellChecker plugins crash webkit
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Major
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2011-08-20 20:13 PDT by Lindsay Mathieson
Modified: 2011-08-21 08:54 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.08 KB, patch)
2011-08-20 20:41 PDT, Lindsay Mathieson
no flags Details | Formatted Diff | Diff
Patch (2.25 KB, patch)
2011-08-21 04:58 PDT, Lindsay Mathieson
no flags Details | Formatted Diff | Diff
Patch (2.39 KB, patch)
2011-08-21 06:33 PDT, Lindsay Mathieson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.