<?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>125776</bug_id>
          
          <creation_ts>2013-12-16 05:36:01 -0800</creation_ts>
          <short_desc>[CoordinatedGraphics] Segmentation fault at  CoordinatedGraphicsScene::clearImageBackingContents</short_desc>
          <delta_ts>2014-01-20 03:09:52 -0800</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 Misc.</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>1</everconfirmed>
          <reporter name="Edit Balint">edbalint</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cmarcelo</cc>
    
    <cc>commit-queue</cc>
    
    <cc>edbalint</cc>
    
    <cc>kondapallykalyan</cc>
    
    <cc>luiz</cc>
    
    <cc>noam</cc>
    
    <cc>yoon</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>960036</commentid>
    <comment_count>0</comment_count>
    <who name="Edit Balint">edbalint</who>
    <bug_when>2013-12-16 05:36:01 -0800</bug_when>
    <thetext>The bug occurs on flickr.com webpage: scroll down to &quot;Spectaculr&quot; section and then scroll up to the top of the page and click on &quot;Sign in&quot; (or any other link) -&gt; Segmentation fault - the browser crashes.
The cause of the problem is that if an image becomes visible and then after a while it becomes invisible a clearContentsTimer starts. The Timer fires after 3 seconds. If the current image becomes visible in these 3 seconds the Timer stops. If the 3 seconds elapse the Timer fires. The CoordinatedImageBacking object which contains the Timer will call CompositingCoordinator::clearImageBackingContents which will append its imageID to m_state.imagesToClear. After this, if you scroll or move the mouse over a link the image will be cleared (because CoordinatedGraphicsScene::syncImageBackings calls CoordinatedGraphicsScene::clearImageBackingContents). Segmentation fault occurs if the time between the image becoming invisible and moving the mouse over the link is less than 3 seconds. In this case the imageID appends to m_state.imagesToClear but it won&apos;t be cleared until clicking on the link. But if you click on the link, the imageID will append to m_state.imagesToRemove too. Then CoordinatedGraphicsScene::syncImageBackings calls CoordinatedGraphicsScene::removeImageBacking. This method removes the image from m_imageBackings but then CoordinatedGraphicsScene::clearImageBackingContents is called and it wants to clear the image with the same ID which image was removed before. This causes the segmentation fault.
I&apos;ve found a possible fix: If CoordinatedGraphicsScene::removeImageBacking is called, it removes the current imageID from m_state.imagesToClear.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>960038</commentid>
    <comment_count>1</comment_count>
      <attachid>219308</attachid>
    <who name="Edit Balint">edbalint</who>
    <bug_when>2013-12-16 05:38:00 -0800</bug_when>
    <thetext>Created attachment 219308
proposed patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>969784</commentid>
    <comment_count>2</comment_count>
      <attachid>219308</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-01-20 02:42:59 -0800</bug_when>
    <thetext>Comment on attachment 219308
proposed patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>969791</commentid>
    <comment_count>3</comment_count>
      <attachid>219308</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-01-20 03:09:46 -0800</bug_when>
    <thetext>Comment on attachment 219308
proposed patch

Clearing flags on attachment: 219308

Committed r162329: &lt;http://trac.webkit.org/changeset/162329&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>969792</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-01-20 03:09:52 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>219308</attachid>
            <date>2013-12-16 05:38:00 -0800</date>
            <delta_ts>2014-01-20 03:09:45 -0800</delta_ts>
            <desc>proposed patch</desc>
            <filename>flickr_segmentation_fix3.diff</filename>
            <type>text/plain</type>
            <size>1615</size>
            <attacher name="Edit Balint">edbalint</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCBkNTY4NTUzLi44OTE2YzAxIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29y
ZS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTYg
QEAKKzIwMTMtMTItMTYgIEVkaXQgQmFsaW50ICA8ZWRiYWxpbnRAaW5mLnUtc3plZ2VkLmh1Pgor
CisgICAgICAgIFtDb29yZGluYXRlZEdyYXBoaWNzXSBTZWdtZW50YXRpb24gZmF1bHQgYXQgIENv
b3JkaW5hdGVkR3JhcGhpY3NTY2VuZTo6Y2xlYXJJbWFnZUJhY2tpbmdDb250ZW50cworCisgICAg
ICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xMjU3NzYKKworICAg
ICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBVbmV4cGVjdGVkIGJl
aGF2aW9yIG9jY3VycyBpbiBzb21lIHRlc3QgY2FzZXMgd2hpY2ggbGVhZHMgdG8gc2VnbWVudGF0
aW9uIGZhdWx0LgorCisgICAgICAgICogcGxhdGZvcm0vZ3JhcGhpY3MvdGV4b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