<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>95692</bug_id>
          
          <creation_ts>2012-09-03 09:01:28 -0700</creation_ts>
          <short_desc>[WK2] WebProcess crashes when plugin is not initialized.</short_desc>
          <delta_ts>2012-09-04 16:49:06 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Plug-ins</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>95026</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andras Becsi">abecsi</reporter>
          <assigned_to name="Andras Becsi">abecsi</assigned_to>
          <cc>andersca</cc>
    
    <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>kbalazs</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>710682</commentid>
    <comment_count>0</comment_count>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-09-03 09:01:28 -0700</bug_when>
    <thetext>[WK2] WebProcess crashes when plugin is not initialized.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>710684</commentid>
    <comment_count>1</comment_count>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-09-03 09:02:28 -0700</bug_when>
    <thetext>This is reproducible with the Qt MiniBrowser when loading index.hu.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>710685</commentid>
    <comment_count>2</comment_count>
      <attachid>161937</attachid>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-09-03 09:03:02 -0700</bug_when>
    <thetext>Created attachment 161937
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>710713</commentid>
    <comment_count>3</comment_count>
      <attachid>161937</attachid>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2012-09-03 10:43:43 -0700</bug_when>
    <thetext>Comment on attachment 161937
Patch

I would like to see steps to reproduce this crash and a backtrace of the crash.

There&apos;s active work going on in this area so it&apos;s important to understand the details of what you&apos;ve found and not just wallpaper over it.

More specifically, PluginViews are created with m_plugin set to the Plugin that last their entire lifetime, so it&apos;s surprising to see that m_plugin might be null.

The only time it can be cleared is if the plug-in fails to initialize and then the PluginView is still used after that case.

Again, please give details on how this reproduces.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>710927</commentid>
    <comment_count>4</comment_count>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-09-04 03:11:16 -0700</bug_when>
    <thetext>The crash is reproducible (since http://trac.webkit.org/changeset/124815) with Qt MiniBrowser the following way:

MiniBrowser index.hu

And the backtrace of the crash:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff97ffd700 (LWP 17013)]
0x00007ffff47c6305 in WebKit::PluginView::scriptObject (this=0x20fc5b0, globalObject=0x7fffe406ec80) at /home/abecsi/devel/git/webkit-git-svn/Source/WebKit2/WebProcess/Plugins/PluginView.cpp:555
555         if (m_plugin-&gt;isBeingAsynchronouslyInitialized()) {
(gdb) bt
#0  0x00007ffff47c6305 in WebKit::PluginView::scriptObject (this=0x20fc5b0, globalObject=0x7fffe406ec80) at /home/abecsi/devel/git/webkit-git-svn/Source/WebKit2/WebProcess/Plugins/PluginView.cpp:555
#1  0x00007ffff49c4574 in WebCore::pluginScriptObjectFromPluginViewBase (pluginElement=0x18c7240, globalObject=0x7fffe406ec80) at /home/abecsi/devel/git/webkit-git-svn/Source/WebCore/bindings/js/JSPluginElementFunctions.cpp:68
#2  0x00007ffff49c4637 in WebCore::pluginScriptObject (exec=0x7fff9dbdf2d8, jsHTMLElement=0x7fff7c09ef00) at /home/abecsi/devel/git/webkit-git-svn/Source/WebCore/bindings/js/JSPluginElementFunctions.cpp:90
#3  0x00007ffff49c4750 in WebCore::runtimeObjectCustomGetOwnPropertySlot (exec=0x7fff9dbdf2d8, propertyName=..., slot=..., element=0x7fff7c09ef00)
    at /home/abecsi/devel/git/webkit-git-svn/Source/WebCore/bindings/js/JSPluginElementFunctions.cpp:115
#4  0x00007ffff49b1fc5 in WebCore::pluginElementCustomGetOwnPropertySlot&lt;WebCore::JSHTMLObjectElement, WebCore::JSHTMLElement&gt; (exec=0x7fff9dbdf2d8, propertyName=..., slot=..., element=0x7fff7c09ef00)
    at /home/abecsi/devel/git/webkit-git-svn/Source/WebCore/bindings/js/JSPluginElementFunctions.h:58
#5  0x00007ffff49b1e3c in WebCore::JSHTMLObjectElement::getOwnPropertySlotDelegate (this=0x7fff7c09ef00, exec=0x7fff9dbdf2d8, propertyName=..., slot=...)
    at /home/abecsi/devel/git/webkit-git-svn/Source/WebCore/bindings/js/JSHTMLObjectElementCustom.cpp:38
#6  0x00007ffff5b9c5f7 in WebCore::JSHTMLObjectElement::getOwnPropertySlot (cell=0x7fff7c09ef00, exec=0x7fff9dbdf2d8, propertyName=..., slot=...) at generated/JSHTMLObjectElement.cpp:161
#7  0x00007ffff479ea07 in JSC::JSCell::fastGetOwnPropertySlot (this=0x7fff7c09ef00, exec=0x7fff9dbdf2d8, propertyName=..., slot=...) at /home/abecsi/devel/git/webkit-git-svn/Source/JavaScriptCore/runtime/JSObject.h:616
#8  0x00007ffff49c26dc in JSC::JSValue::get (this=0x7fffffffcb80, exec=0x7fff9dbdf2d8, propertyName=..., slot=...) at /home/abecsi/devel/git/webkit-git-svn/Source/JavaScriptCore/runtime/JSObject.h:871
#9  0x00007ffff6057fee in JSC::cti_op_get_by_id (args=0x7fffffffcc00) at /home/abecsi/devel/git/webkit-git-svn/Source/JavaScriptCore/jit/JITStubs.cpp:1710
#10 0x00007ffff6055a99 in JSC::JITThunks::tryCacheGetByID (callFrame=0x22f1b30, codeBlock=0x7ffff455a29d &lt;JSC::PropertyName::PropertyName(JSC::Identifier const&amp;)+65&gt;, returnAddress=..., baseValue=..., propertyName=..., slot=..., stubInfo=
    0x7fff7c09ef00) at /home/abecsi/devel/git/webkit-git-svn/Source/JavaScriptCore/jit/JITStubs.cpp:980
#11 0x00007fffffffcc30 in ?? ()
#12 0x00007fff7c09ef00 in ?? ()
#13 0x00000000022f1b30 in ?? ()
#14 0x00007fff00000003 in ?? ()
#15 0x00007fffffffcc40 in ?? ()
#16 0x00007fff7c0bcfc0 in ?? ()
#17 0x00007ffff7db0b00 in JSC::JSNotAnObject::s_info () from /home/abecsi/devel/git/webkit-git-svn/WebKitBuild/Debug/lib/libQtWebKit.so.5
#18 0x00007ffff7d6f260 in WebCore::JSDOMWindowPrototype::s_info () from /home/abecsi/devel/git/webkit-git-svn/WebKitBuild/Debug/lib/libQtWebKit.so.5
#19 0x00007fffffffcc70 in ?? ()
#20 0x00007fffa052a460 in ?? ()
#21 0x0000000000515ef8 in ?? ()
#22 0x00007fff9dbdf2d8 in ?? ()
#23 0x0000000000000000 in ?? ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>711172</commentid>
    <comment_count>5</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2012-09-04 09:20:56 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; The crash is reproducible (since http://trac.webkit.org/changeset/124815) with Qt MiniBrowser the following way:
&gt; 
&gt; MiniBrowser index.hu

Why is the plug-in failing to initialize?

Can you construct a test for this?  TestNetscapePlugin and WebKitTestRunner have the ability to test this type of thing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>711313</commentid>
    <comment_count>6</comment_count>
      <attachid>162073</attachid>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-09-04 11:57:29 -0700</bug_when>
    <thetext>Created attachment 162073
Makes Qt MiniBrowser crash

Plugin support seems generally be unreliable/broken in Qt5 so plugin tests are disabled, though plugins are not disabled in MiniBrowser since work is ongoing to fix the issues.
Because the initialization of plugins that set the &quot;movie&quot; parameter fails in MiniBrowser and since on the mentioned news site (index.hu) some scripts try to access the plugin object the web process crashes in PluginView::scriptObject.

Attached is a reduced test page that crashes the QtWebProcess in MiniBrowser.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>711317</commentid>
    <comment_count>7</comment_count>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-09-04 11:59:55 -0700</bug_when>
    <thetext>CC-ing Balazs who used to work on plugin issues.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>711326</commentid>
    <comment_count>8</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2012-09-04 12:09:02 -0700</bug_when>
    <thetext>I understand what is going on here.  It hasn&apos;t come up on Mac because plug-ins generally don&apos;t fail to initialize there.  Interesting that Qt has this problem.

I&apos;m not against the change.  I&apos;m just against it without a test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>711569</commentid>
    <comment_count>9</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2012-09-04 16:49:06 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 95026 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>161937</attachid>
            <date>2012-09-03 09:03:02 -0700</date>
            <delta_ts>2012-09-04 11:57:29 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-95692-20120903180323.patch</filename>
            <type>text/plain</type>
            <size>1899</size>
            <attacher name="Andras Becsi">abecsi</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTI3NDIwCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0Mi9D
aGFuZ2VMb2cgYi9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2JqZWN0KiBQbHVn
aW5WaWV3OjpzY3JpcHRPYmplY3QoSlNHbG9iYWxPYmplY3QqIGdsb2JhbE9iamVjdCkKICAgICB9
CiAKICAgICAvLyBUaGUgcGx1Zy1pbiBjYW4gYmUgbnVsbCBoZXJlIGlmIGl0IGZhaWxlZCB0byBp
bml0aWFsaXplLgotICAgIGlmICghbV9pc0luaXRpYWxpemVkIHx8ICFtX3BsdWdpbikKKyAgICBp
ZiAoIW1faXNJbml0aWFsaXplZCkKICAgICAgICAgcmV0dXJuIDA7CiAKICNpZiBFTkFCTEUoTkVU
U0NBUEVfUExVR0lOX0FQSSkK
</data>
<flag name="review"
          id="172880"
          type_id="1"
          status="-"
          setter="beidson"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>162073</attachid>
            <date>2012-09-04 11:57:29 -0700</date>
            <delta_ts>2012-09-04 11:57:29 -0700</delta_ts>
            <desc>Makes Qt MiniBrowser crash</desc>
            <filename>plugin.html</filename>
            <type>text/html</type>
            <size>493</size>
            <attacher name="Andras Becsi">abecsi</attacher>
            
              <data encoding="base64">PGh0bWw+CiAgICA8aGVhZD4KICAgICAgICA8dGl0bGU+VmlkZW88L3RpdGxlPgogICAgPC9oZWFk
PgogICAgPGJvZHk+CiAgICAgICAgPGRpdj4KICAgICAgICAgICAgPG9iamVjdCBpZD0iZmxhc2h2
aWRlbyI+CiAgICAgICAgICAgICAgICA8cGFyYW0gbmFtZT0ibW92aWUiIHZhbHVlPSJodHRwOi8v
YXNzZXRzLmluZGF2aWRlby5odS9zd2YvcGxheWVyLnN3ZiI+CiAgICAgICAgICAgICAgICA8ZW1i
ZWQgc3JjPSJodHRwOi8vYXNzZXRzLmluZGF2aWRlby5odS9zd2YvcGxheWVyLnN3ZiI+CiAgICAg
ICAgICAgIDwvb2JqZWN0PgogICAgICAgIDwvZGl2PgogICAgPHNjcmlwdCBzcmM9Imh0dHA6Ly9h
c3NldHMuaW5kYXZpZGVvLmh1L2pzL2xpYi9qcXVlcnktMS42LjQubWluLmpzIj48L3NjcmlwdD4K
ICAgIDxzY3JpcHQgc3JjPSJodHRwOi8vYXNzZXRzLmluZGF2aWRlby5odS9qcy9zcmMvdnBsYXll
cjIuanMiPjwvc2NyaXB0PgogICAgPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>