Bug 18935 - [Gtk] Plugin Load crashes with NP_FULL mode
Summary: [Gtk] Plugin Load crashes with NP_FULL mode
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2008-05-07 22:32 PDT by Sriram Neelakandan
Modified: 2008-05-25 02:56 PDT (History)
2 users (show)

See Also:

Fix for NP_FULL crash (1016 bytes, patch)
2008-05-07 23:03 PDT, Sriram Neelakandan
alp: review+
Details | Formatted Diff | Diff
Re-init variable in redirectDataToPlugin (535 bytes, patch)
2008-05-07 23:05 PDT, Sriram Neelakandan
alp: review+
Details | Formatted Diff | Diff
Fix the bug for Qt (1.59 KB, patch)
2008-05-08 08:17 PDT, marcoil
hausmann: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sriram Neelakandan 2008-05-07 22:32:46 PDT
NP_EMBED mode plugin works fine,
when the same plugin is loaded with the URL, it crashes at 

void PluginView::didReceiveData(const char* data, int length)
    m_manualStream->didReceiveData(0, data, length);

On further DEBUG i found m_manualStream is NULL.

Reason: PluginView::didReceiveResponse does not get called, from FrameLoaderClient::commitedLoad.

FrameLoaderCleint::m_hasSentResponseToPlugin is not initialized and has some JUNK data. So the following check fails :
        if (!m_hasSentResponseToPlugin) {
            m_hasSentResponseToPlugin = true;

I will attach a patch shortly to initialize m_hasSentResponseToPlugin
Comment 1 Sriram Neelakandan 2008-05-07 23:03:22 PDT
Created attachment 21007 [details]
Fix for NP_FULL crash

This uninitialized variable caused a crash as explained in the bug
Comment 2 Sriram Neelakandan 2008-05-07 23:05:12 PDT
Created attachment 21008 [details]
Re-init variable in redirectDataToPlugin

Not sure if this one is required.
May be some one who knows the code better can take this in if required.
Comment 3 marcoil 2008-05-08 08:17:06 PDT
Created attachment 21017 [details]
Fix the bug for Qt

This is the same fix applied to the Qt port.
Comment 4 Simon Hausmann 2008-05-09 01:52:19 PDT
Comment on attachment 21017 [details]
Fix the bug for Qt

#21017 landed in r33001.
Comment 5 marcoil 2008-05-12 01:33:53 PDT
The Gtk patches haven't landed yet, so I think this one should be re-opened.
Comment 6 Pierre-Luc Beaudoin 2008-05-12 06:33:45 PDT
Reopening for the Gtk patch.
Comment 7 Alp Toker 2008-05-25 02:56:45 PDT
Landed in r34121.