<?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>59212</bug_id>
          
          <creation_ts>2011-04-22 10:45:42 -0700</creation_ts>
          <short_desc>[chromium] Regression: r84631 causes crashes on Chromium GPU canvas tests</short_desc>
          <delta_ts>2011-04-22 16:18:49 -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>Canvas</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</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="Adrienne Walker">enne</reporter>
          <assigned_to name="Adrienne Walker">enne</assigned_to>
          <cc>abarth</cc>
    
    <cc>enne</cc>
    
    <cc>eric</cc>
    
    <cc>jamesr</cc>
    
    <cc>mdelaney7</cc>
    
    <cc>rolandsteiner</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>390882</commentid>
    <comment_count>0</comment_count>
    <who name="Adrienne Walker">enne</who>
    <bug_when>2011-04-22 10:45:42 -0700</bug_when>
    <thetext>http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20GPU%20Mesa%20-%20chromium.org&amp;tests=canvas%2Fphilip%2Ftests%2F2d.clearRect.negative.html%2Ccanvas%2Fphilip%2Ftests%2F2d.composite.canvas.destination-over.html%2Ccanvas%2Fphilip%2Ftests%2F2d.composite.clip.destination-out.html%2Ccanvas%2Fphilip%2Ftests%2F2d.composite.globalAlpha.default.html%2Ccanvas%2Fphilip%2Ftests%2F2d.composite.image.destination-over.html%2Ccanvas%2Fphilip%2Ftests%2F2d.composite.operation.default.html%2Ccanvas%2Fphilip%2Ftests%2F2d.composite.transparent.lighter.html%2Ccanvas%2Fphilip%2Ftests%2F2d.composite.uncovered.fill.source-out.html%2Ccanvas%2Fphilip%2Ftests%2F2d.drawImage.9arg.sourcepos.html%2Ccanvas%2Fphilip%2Ftests%2F2d.drawImage.floatsource.html%2Ccanvas%2Fphilip%2Ftests%2F2d.drawImage.nonfinite.html%2Ccanvas%2Fphilip%2Ftests%2F2d.drawImage.zerosource.html%2Ccanvas%2Fphilip%2Ftests%2F2d.fillStyle.get.semitransparent.html%2Ccanvas%2Fphilip%2Ftests%2F2d.fillStyle.parse.hsl-1.html%2Ccanvas%2Fphilip%2Ftests%2F2d.fillStyle.parse.hsla-1.html%2Ccanvas%2Fphilip%2Ftests%2F2d.fillStyle.parse.invalid.hex2.html%2Ccanvas%2Fphilip%2Ftests%2F2d.fillStyle.parse.invalid.hsl-4.html%2Ccanvas%2Fphilip%2Ftests%2F2d.fillStyle.parse.invalid.rgb-2.html%2Ccanvas%2Fphilip%2Ftests%2F2d.fillStyle.parse.invalid.rgba-5.html%2Ccanvas%2Fphilip%2Ftests%2F2d.fillStyle.parse.rgb-percent.html

This only seems to repro locally for me in DRT and only if I run more than single test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>390896</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-04-22 10:55:44 -0700</bug_when>
    <thetext>Seems like your code has unmatched save/restore then?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>390899</commentid>
    <comment_count>2</comment_count>
    <who name="Adrienne Walker">enne</who>
    <bug_when>2011-04-22 10:58:35 -0700</bug_when>
    <thetext>It&apos;s segfaulting, not asserting.  Not to say we probably don&apos;t have mismatched save and restores somewhere too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>390904</commentid>
    <comment_count>3</comment_count>
    <who name="Adrienne Walker">enne</who>
    <bug_when>2011-04-22 11:04:52 -0700</bug_when>
    <thetext>Simon, I suspect your change just unearthed some preexisting Chromium bug here, but I figured I&apos;d put you on the CC list.  Didn&apos;t want you to feel left out.  ;)

I&apos;m still investigating what&apos;s going on.  It looks like the m_context.clear() call in HTMLCanvasElement changed the destruction order and some other Chromium-only pointer also needs to get cleaned up.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>390992</commentid>
    <comment_count>4</comment_count>
    <who name="Adrienne Walker">enne</who>
    <bug_when>2011-04-22 13:08:59 -0700</bug_when>
    <thetext>James: this is crashing in PlatformContextSkia (the one owned by the ImageBufferData owned by the ImageBuffer owned by the HTMLCanvasElement).  In the destructor, either m_gpuCanvas or m_gpuCanvas-&gt;drawingBuffer() is a stale pointer (or both).

Maybe CanvasRenderingContext2D should clear its shared graphics context in the destructor?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>390996</commentid>
    <comment_count>5</comment_count>
      <attachid>90747</attachid>
    <who name="Adrienne Walker">enne</who>
    <bug_when>2011-04-22 13:10:45 -0700</bug_when>
    <thetext>Created attachment 90747
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>391010</commentid>
    <comment_count>6</comment_count>
      <attachid>90747</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-04-22 13:37:37 -0700</bug_when>
    <thetext>Comment on attachment 90747
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=90747&amp;action=review

&gt; Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:162
&gt; +    if (GraphicsContext* c = drawingContext())
&gt; +        c-&gt;setSharedGraphicsContext3D(0, 0, IntSize());

Would be nice to use &apos;context&apos; instead of &apos;c&apos; as I do above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>391015</commentid>
    <comment_count>7</comment_count>
    <who name="Adrienne Walker">enne</who>
    <bug_when>2011-04-22 13:40:32 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (From update of attachment 90747 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=90747&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:162
&gt; &gt; +    if (GraphicsContext* c = drawingContext())
&gt; &gt; +        c-&gt;setSharedGraphicsContext3D(0, 0, IntSize());
&gt; 
&gt; Would be nice to use &apos;context&apos; instead of &apos;c&apos; as I do above.

Sure.  I&apos;ll fix that before landing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>391052</commentid>
    <comment_count>8</comment_count>
    <who name="Adrienne Walker">enne</who>
    <bug_when>2011-04-22 14:17:59 -0700</bug_when>
    <thetext>Committed r84680: &lt;http://trac.webkit.org/changeset/84680&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>391208</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-04-22 16:18:49 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/84680 might have broken GTK Linux 64-bit Debug</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>90747</attachid>
            <date>2011-04-22 13:10:45 -0700</date>
            <delta_ts>2011-04-22 13:37:37 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-59212-20110422131044.patch</filename>
            <type>text/plain</type>
            <size>1360</size>
            <attacher name="Adrienne Walker">enne</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogODQ2MzQKZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwppbmRleCA1NDZiYThiOGYxZDEyYWU0
MT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4Mjcx
MmJjODE3IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29yZS9odG1sL2NhbnZhcy9DYW52YXNSZW5k
ZXJpbmdDb250ZXh0MkQuY3BwCisrKyBiL1NvdXJjZS9XZWJDb3JlL2h0bWwvY2FudmFzL0NhbnZh
c1JlbmRlcmluZ0NvbnRleHQyRC5jcHAKQEAgLTE1Niw2ICsxNTYsMTEgQEAgQ2FudmFzUmVuZGVy
aW5nQ29udGV4dDJEOjp+Q2FudmFzUmVuZGVyaW5nQ29udGV4dDJEKCkKICAgICAgICAgfQogICAg
IH0KICNlbmRpZgorCisjaWYgRU5BQkxFKEFDQ0VMRVJBVEVEXzJEX0NBTlZBUykKKyAgICBpZiAo
R3JhcGhpY3NDb250ZXh0KiBjID0gZHJhd2luZ0NvbnRleHQoKSkKKyAgICAgICAgYy0+c2V0U2hh
cmVkR3JhcGhpY3NDb250ZXh0M0QoMCwgMCwgSW50U2l6ZSgpKTsKKyNlbmRpZgogfQogCiBib29s
IENhbnZhc1JlbmRlcmluZ0NvbnRleHQyRDo6aXNBY2NlbGVyYXRlZCgpIGNvbnN0Cg==
</data>
<flag name="review"
          id="83511"
          type_id="1"
          status="+"
          setter="simon.fraser"
    />
          </attachment>
      

    </bug>

</bugzilla>