<?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>83567</bug_id>
          
          <creation_ts>2012-04-10 05:32:44 -0700</creation_ts>
          <short_desc>[BlackBerry] Crash when tearing down web page rendered using WebPageCompositor</short_desc>
          <delta_ts>2012-04-10 12:55:39 -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>WebKit BlackBerry</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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>0</everconfirmed>
          <reporter name="Arvid Nilsson">anilsson</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>rwlbuis</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>599182</commentid>
    <comment_count>0</comment_count>
    <who name="Arvid Nilsson">anilsson</who>
    <bug_when>2012-04-10 05:32:44 -0700</bug_when>
    <thetext>This happens when the WebPage::setVisible(false) is called as part of tearing down a WebPage. This calls suspendRootLayerCommit() which schedules destroyLayerResources() on the UI thread. UI thread call stack:

WebCore::LayerRenderer::releaseLayerResources (this=0x0)
    at /home/anilsson/dev/webkit/Source/WebCore/platform/graphics/blackberry/LayerRenderer.cpp:191
191	    if (m_hardwareCompositing) {
(gdb) p this
$1 = (WebCore::LayerRenderer * const) 0x0
(gdb) bt
#0  WebCore::LayerRenderer::releaseLayerResources (this=0x0)
    at /home/anilsson/dev/webkit/Source/WebCore/platform/graphics/blackberry/LayerRenderer.cpp:191
#1  0x7925dc2c in BlackBerry::WebKit::WebPageCompositorPrivate::releaseLayerResources (this=&lt;optimized out&gt;)
    at /home/anilsson/dev/webkit/Source/WebKit/blackberry/Api/WebPageCompositor.cpp:146
#2  0x7924c726 in BlackBerry::WebKit::WebPagePrivate::destroyLayerResources (
    this=&lt;optimized out&gt;)
    at /home/anilsson/dev/webkit/Source/WebKit/blackberry/Api/WebPage.cpp:5566
#3  0x7925c3aa in BlackBerry::Platform::MethodDelegate0&lt;void (BlackBerry::WebKit::WebPagePrivate::*)(), BlackBerry::WebKit::WebPagePrivate&gt;::execute (
    this=0xb7e980)
    at /home/anilsson/dev/staging/usr/include/browser/platform/BlackBerryPlatformMessageDelegate.h:770
#4  0x7a05ff98 in BlackBerry::Platform::ExecutableMessage::execute (
    this=&lt;optimized out&gt;)
    at /home/anilsson/dev/platform/blackberryplatform/BlackBerryPlatformExecutableMessage.cpp:38
...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>599185</commentid>
    <comment_count>1</comment_count>
      <attachid>136435</attachid>
    <who name="Arvid Nilsson">anilsson</who>
    <bug_when>2012-04-10 05:37:10 -0700</bug_when>
    <thetext>Created attachment 136435
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>599198</commentid>
    <comment_count>2</comment_count>
      <attachid>136435</attachid>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2012-04-10 05:54:40 -0700</bug_when>
    <thetext>Comment on attachment 136435
Patch

so if the mlayerRenderer is null, &quot;resources&quot; were already released?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>599206</commentid>
    <comment_count>3</comment_count>
    <who name="Arvid Nilsson">anilsson</who>
    <bug_when>2012-04-10 06:02:45 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 136435 [details])
&gt; so if the mlayerRenderer is null, &quot;resources&quot; were already released?

Yes, or you could see it this way - the LayerRenderer owns the resources that should be released, so if there&apos;s no LayerRenderer, there are no resources to delete. Resources = textures right now, but could be more stuff in the future (for example shaders).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>599246</commentid>
    <comment_count>4</comment_count>
      <attachid>136435</attachid>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2012-04-10 07:17:44 -0700</bug_when>
    <thetext>Comment on attachment 136435
Patch

(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; (From update of attachment 136435 [details] [details])
&gt; &gt; so if the mlayerRenderer is null, &quot;resources&quot; were already released?
&gt; 
&gt; Yes, or you could see it this way - the LayerRenderer owns the resources that should be released, so if there&apos;s no LayerRenderer, there are no resources to delete. Resources = textures right now, but could be more stuff in the future (for example shaders).

Ok. I was wondering was would be the codepath be...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>599521</commentid>
    <comment_count>5</comment_count>
    <who name="Arvid Nilsson">anilsson</who>
    <bug_when>2012-04-10 12:39:54 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 136435 [details])
&gt; (In reply to comment #3)
&gt; &gt; (In reply to comment #2)
&gt; &gt; &gt; (From update of attachment 136435 [details] [details] [details])
&gt; &gt; &gt; so if the mlayerRenderer is null, &quot;resources&quot; were already released?
&gt; &gt; 
&gt; &gt; Yes, or you could see it this way - the LayerRenderer owns the resources that should be released, so if there&apos;s no LayerRenderer, there are no resources to delete. Resources = textures right now, but could be more stuff in the future (for example shaders).
&gt; 
&gt; Ok. I was wondering was would be the codepath be...

Right now, it&apos;s probably due to an earlier call to WebPageCompositor::cleanup() that would clear the layer renderer. The layer rendrrer destructor then releases the resources.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>599545</commentid>
    <comment_count>6</comment_count>
      <attachid>136435</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-04-10 12:55:34 -0700</bug_when>
    <thetext>Comment on attachment 136435
Patch

Clearing flags on attachment: 136435

Committed r113757: &lt;http://trac.webkit.org/changeset/113757&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>599546</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-04-10 12:55:39 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>136435</attachid>
            <date>2012-04-10 05:37:10 -0700</date>
            <delta_ts>2012-04-10 12:55:34 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-83567-20120410083707.patch</filename>
            <type>text/plain</type>
            <size>1508</size>
            <attacher name="Arvid Nilsson">anilsson</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTEzNzA4CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L2Js
YWNrYmVycnkvQ2hhbmdlTG9nIGIvU291cmNlL1dlYktpdC9ibGFja2JlcnJ5L0NoYW5nZUxvZwpp
bmRleCBlNDllMDdjZTMwZDQ4MDcxM2ZhYTlhNmIyYmMxOWUxNWUzZTNiZDljLi4xZjlmYjczYTgw
MjE3ZmJmMTAzMDA3NGVkYzJjZWI4NzdmOTY4MTA3IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0
L2JsYWNrYmVycnkvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9XZWJLaXQvYmxhY2tiZXJyeS9DaGFu
Z2VMb2cKQEAgLTEsMyArMSwxNSBAQAorMjAxMi0wNC0wOSAgQXJ2aWQgTmlsc3NvbiAgPGFuaWxz
c29uQHJpbS5jb20+CisKKyAgICAgICAgW0JsYWNrQmVycnldIENyYXNoIHdoZW4gdGVhcmluZyBk
b3duIHdlYiBwYWdlIHJlbmRlcmVkIHVzaW5nIFdlYlBhZ2VDb21wb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