<?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>119016</bug_id>
          
          <creation_ts>2013-07-23 10:18:36 -0700</creation_ts>
          <short_desc>REGRESSION (r151957): .gif images play at 10x speed for a few loops after loading</short_desc>
          <delta_ts>2013-07-30 14:03:44 -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>Images</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.8</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>116041</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="jacoco">cococohen1122</reporter>
          <assigned_to name="Csaba Osztrogonác">ossy</assigned_to>
          <cc>allan.jensen</cc>
    
    <cc>ap</cc>
    
    <cc>ggaren</cc>
    
    <cc>mrowe</cc>
    
    <cc>ossy</cc>
    
    <cc>thorton</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>911075</commentid>
    <comment_count>0</comment_count>
    <who name="jacoco">cococohen1122</who>
    <bug_when>2013-07-23 10:18:36 -0700</bug_when>
    <thetext>Any time I load a .gif image in its own page, it loops through at 10x speed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911278</commentid>
    <comment_count>1</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2013-07-24 05:39:01 -0700</bug_when>
    <thetext>Can&apos;t reproduce on the GTK port, WebKit1 or WebKit2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911332</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-07-24 09:39:44 -0700</bug_when>
    <thetext>I can reproduce on Mac using &lt;http://ru.fishki.net/picsw/072013/23/post/gif/05_dem.gif&gt;.

Safari/WebKit 6.0.5: It plays very slowly for the first round while loading, then loops normally.
With nightly WebKit r152754: It doesn&apos;t play at all while loading, then plays crazy fast for some time, then loops normally.

This is not limited to standalone images - ones in a page like this one &lt;http://fishki.net/comment.php?id=140726&gt; also exhibit the same behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911333</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-07-24 09:40:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/14534370&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911514</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2013-07-24 22:41:51 -0700</bug_when>
    <thetext>Ossy, can you take a look? It looks like http://trac.webkit.org/changeset/151957 caused this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911628</commentid>
    <comment_count>5</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-25 08:50:07 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Ossy, can you take a look? It looks like http://trac.webkit.org/changeset/151957 caused this.

Will check tomorrow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911968</commentid>
    <comment_count>6</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-26 07:19:06 -0700</bug_when>
    <thetext>I can&apos;t reproduce it on EFL WK1/WK2, Qt WK1/WK2 (r153370)
and Nix (WK2 only port) (392d108b1ae5d42be00b7d96c7bd47689e742789, r153083 - last trunk merge)

But http://fishki.net/comment.php?id=140726 crashes for me with
EFL/Qt/Nix WK2 browsers. I&apos;ll investigate it.

If you are sure that r151957 is the culprit, I&apos;ll find a Mac 
near here on monday and try to debug what happened.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911969</commentid>
    <comment_count>7</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-26 07:27:53 -0700</bug_when>
    <thetext>Maybe there is some issue in platform/graphics/cg/ImageSourceCG.cpp.

After r151957 frameDurationAtIndex doesn&apos;t trigger decoding the frame,
maybe ImageSourceCG.cpp uses some invalid duration info.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911972</commentid>
    <comment_count>8</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-26 07:40:53 -0700</bug_when>
    <thetext>I think this change doesn&apos;t fit somehow to the CG implementation:
http://trac.webkit.org/changeset/151957/trunk/Source/WebCore/platform/graphics/BitmapImage.cpp

Reverting the BitmapImage.cpp change with a PLATFORM(MAC) or something CG 
guard could be a workaround until we find the proper fix. Could you try
if it fixes the issue, please?

And I&apos;ll try to find the proper fix on monday.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912492</commentid>
    <comment_count>9</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-29 07:28:25 -0700</bug_when>
    <thetext>I managed to reproduce this bug on Mac. For now I propose reverting
r151957 only on Mac platform as a workaround. And then fix ImageSourceCG.cpp
in a separated bug: https://bugs.webkit.org/show_bug.cgi?id=119218</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912494</commentid>
    <comment_count>10</comment_count>
      <attachid>207656</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-29 07:29:50 -0700</bug_when>
    <thetext>Created attachment 207656
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912524</commentid>
    <comment_count>11</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-29 09:50:05 -0700</bug_when>
    <thetext>I started debugging this quick animation bug and got the root of the
problem, but I&apos;m not sure how to fix it propely, but I&apos;m on it.

The problem in nutshell:
The animation is started at the beginning and m_desiredFrameStartTime is initialized to the current time. But BitMapImage::frameIsCompleteAtIndex(index=1) is false until the last frame is loaded for some reason, which blocks the original very slow animation. I think it is _the_ bug somewhere. After the last frame is loaded, BitMapImage::frameIsCompleteAtIndex(index=1) becomes true and the animation is really started. Because the load time took ~5 seconds, m_desiredFrameStartTime is in the past, and the timer of the next frame immediately expired and so on.

...
bool BitmapImage::frameIsCompleteAtIndex(size_t index)
{
    if (index &lt; m_frames.size() &amp;&amp; m_frames[index].m_haveMetadata &amp;&amp; m_frames[index].m_isComplete)
        return true;
    return m_source.frameIsCompleteAtIndex(index); &lt;---- this one returns false!
}
...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912533</commentid>
    <comment_count>12</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-29 10:14:05 -0700</bug_when>
    <thetext>strange, the status returned by CGImageSourceGetStatusAtIndex()
until the last frame is loaded is kCGImageStatusUnknownType = -3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912752</commentid>
    <comment_count>13</comment_count>
      <attachid>207713</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-30 03:39:41 -0700</bug_when>
    <thetext>Created attachment 207713
Patch

Use USE(CG) guards instead of PLATFORM(MAC), because Windows port uses this code path too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912754</commentid>
    <comment_count>14</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-30 03:43:10 -0700</bug_when>
    <thetext>cc-ing Geoffrey and Mark as the authors of ImageSourceCG::frameIsCompleteAtIndex() - https://trac.webkit.org/changeset/55199

And I think https://trac.webkit.org/changeset/55199 is related to this bug too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912763</commentid>
    <comment_count>15</comment_count>
      <attachid>207713</attachid>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2013-07-30 04:11:03 -0700</bug_when>
    <thetext>Comment on attachment 207713
Patch

I really don&apos;t see the point in doing this rather than just fixing the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912768</commentid>
    <comment_count>16</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-30 04:18:26 -0700</bug_when>
    <thetext>(In reply to comment #15)
&gt; (From update of attachment 207713 [details])
&gt; I really don&apos;t see the point in doing this rather than just fixing the problem.

Because I have no idea how to fix it properly. 
So if you have any idea, it would be very welcome.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912770</commentid>
    <comment_count>17</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-30 04:27:42 -0700</bug_when>
    <thetext>just a note: I can&apos;t fix CGImageSourceGetStatusAtIndex ( rdar://problem/7679174 ), because I have no access for Appple&apos;s internal rdar and code base. And I can&apos;t acces rdar://problem/14534370, so I don&apos;t know if anybody started working on it or if there is any discussion about it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912777</commentid>
    <comment_count>18</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2013-07-30 04:42:30 -0700</bug_when>
    <thetext>It sounds like the changes made in &lt;http://trac.webkit.org/changeset/151957&gt; made assumptions about the behavior of ImageSource that aren&apos;t valid for all implementations. We should either understand what needs to be changed in the ImageSourceCG implementation to accommodate the changes made in r151957, or r151957 should be reverted. Adding #if&apos;s just heads down the path of divergent behavior which will make life difficult for everyone going forward.

&lt;rdar://problem/7679174&gt; is unlikely to be relevant to whatever is happening here since it was fixed in Lion. Fixing CGImageSourceGetStatusAtIndex isn&apos;t relevant here either since that&apos;s OS X API and not part of WebKit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912807</commentid>
    <comment_count>19</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-30 06:08:21 -0700</bug_when>
    <thetext>The root of the problem is that http://trac.webkit.org/changeset/113486 &quot;made a bunch of incorrect changes to BitmapImage.cpp&quot; - https://bugs.webkit.org/show_bug.cgi?id=116041#c12

After r113486 BitmapImage::frameIsCompleteAtIndex,  BitmapImage::frameHasAlphaAtIndex, ... trigger image decoding. Which
is incorrect and caused flakey crashes everywhere. Chrome fixed it
in Blink and r151957 fixed it in WebKit ... but unfortunately this
fix doesn&apos;t fit to the ImageSourceCG implementation.

Reverting r151957 is the worst choice, because it would paper over the
problem and only push the bug from CG platforms to other platforms. 

My proposed workaround would let the CG use the previous and working version
(which wastes resources with useless image decodings, but at least works) and
let all other ports keep the fix of the buggy r113486 and not to have flakey crashes.

If you want to revert r151957, we should revert r113486 and maybe
many other patches on the top of it to be consistent and fix all ports.

But let&apos;s try to collaborate a little bit instead of reverting everything.
r20070 added ImageSource::frameIsCompleteAtIndex():
+    bool frameIsCompleteAtIndex(size_t); // Whether or not the frame is completely decoded.
...
diff --git a/WebCore/platform/graphics/BitmapImage.cpp b/WebCore/platform/graphics/BitmapImage.cpp
index 136bc26..b4f66d2 100644
--- a/WebCore/platform/graphics/BitmapImage.cpp
+++ b/WebCore/platform/graphics/BitmapImage.cpp
@@ -209,6 +209,10 @@ void BitmapImage::startAnimation()
     if (m_frameTimer || !shouldAnimate() || frameCount() &lt;= 1)
         return;

+    // Don&apos;t advance the animation until the current frame has completely loaded.
+    if (!m_source.frameIsCompleteAtIndex(m_currentFrame))
+        return;
+
...

These comments are obvious and expects that ImageSource::frameIsCompleteAtIndex() returns with true if the given frames is &quot;completely loaded&quot; &quot;Whether or not the frame is completely decoded.&quot;. But unfortunately ImageSourceCG implementation of ImageSource::frameIsCompleteAtIndex() doesn&apos;t pass this requirement. r151957 only revealed this bug and didn&apos;t caused.

The problem is that we can&apos;t ask CGImageSource if the frame is 
loaded or not. And I can&apos;t fix CGImageSource, only Apple can do it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912863</commentid>
    <comment_count>20</comment_count>
      <attachid>207713</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-07-30 09:05:37 -0700</bug_when>
    <thetext>Comment on attachment 207713
Patch

A random walk that inserts some bugs while fixing others, peppering the code with #ifdefs as we go, is not how WebKit development works.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912865</commentid>
    <comment_count>21</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-07-30 09:06:30 -0700</bug_when>
    <thetext>Ossy, I&apos;d like to give you a chance to fix r151957 -- but if you&apos;re still sure you can&apos;t fix it, I&apos;ll roll it out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912893</commentid>
    <comment_count>22</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-30 09:40:59 -0700</bug_when>
    <thetext>(In reply to comment #20)
&gt; (From update of attachment 207713 [details])
&gt; A random walk that inserts some bugs while fixing others, peppering the code with #ifdefs as we go, is not how WebKit development works.
I still think that r151957 was the correct fix and ImageSourceCG.cpp 
does the wrong thing. I&apos;m sorry that I couldn&apos;t convince you about
it in https://bugs.webkit.org/show_bug.cgi?id=119016#c19 :-(

(In reply to comment #21)
&gt; Ossy, I&apos;d like to give you a chance to fix r151957 -- but if you&apos;re still sure you can&apos;t fix it, I&apos;ll roll it out.

Thanks for the chance, but as I said, I can&apos;t fix the 3rdparty CG library 
and have no idea how can we do a workaround for Mac inside WebKit.

You won, let&apos;s break animated gifs everywhere except Mac. I reverted
r151957 and its followup patch r152531 by http://trac.webkit.org/changeset/153475</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>913010</commentid>
    <comment_count>23</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2013-07-30 13:47:02 -0700</bug_when>
    <thetext>(In reply to comment #22)
&gt; You won, let&apos;s break animated gifs everywhere except Mac. 

The change that you rolled out was an optimization. It broke Mac. Rolling it out undoes the optimization, it doesn&apos;t break anything.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>913016</commentid>
    <comment_count>24</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-30 14:03:44 -0700</bug_when>
    <thetext>(In reply to comment #23)
&gt; (In reply to comment #22)
&gt; &gt; You won, let&apos;s break animated gifs everywhere except Mac. 
&gt; 
&gt; The change that you rolled out was an optimization. It broke Mac. Rolling it out undoes the optimization, it doesn&apos;t break anything.

No, it wasn&apos;t only an optimization, it was originally to fix flakey crashes
during animated gifs on all non-CG platform. Maybe the name of the original
bug was a little bit misleading. But the details can be found as comments.

Right now I got an idea in the original bug how to fix it properly and 
will try it tomorrow. I hope all platforms would be happy soon.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>207656</attachid>
            <date>2013-07-29 07:29:50 -0700</date>
            <delta_ts>2013-07-30 03:39:36 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-119016-20130729163012.patch</filename>
            <type>text/plain</type>
            <size>2400</size>
            <attacher name="Csaba Osztrogonác">ossy</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTUzNDIzCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggODk5Y2E3ODM1OWZhYjY2
YzJmYTk4MGUzMDI0M2IzYTc2YTZmMmU5MS4uMTFlNTk1ZTdjM2I0MGNlZWIxNDFlNGQzNDA2MjM2
ZTFjN2Q1OTU4ZCAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE3IEBACisyMDEzLTA3LTI5ICBDc2Fi
YSBPc3p0cm9nb27DoWMgIDxvc3N5QHdlYmtpdC5vcmc+CisKKyAgICAgICAgUkVH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ogSW1hZ2VTb3VyY2VDRy5jcHAgc2hvdWxkbid0IGV4
cGVjdCB0aGF0IGZyYW1lRHVyYXRpb25BdEluZGV4KCkgZGVjb2RlcyB0aGUgaW1hZ2UKKy8vIGh0
dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xMTkyMTgKKyNpZiBQTEFURk9S
TShNQUMpCisgICAgaWYgKCFlbnN1cmVGcmFtZUlzQ2FjaGVkKGluZGV4KSkKKyAgICAgICAgcmV0
dXJuIDA7CisgICAgcmV0dXJuIG1fZnJhbWVzW2luZGV4XS5tX2R1cmF0aW9uOworI2Vsc2UKICAg
ICBpZiAoaW5kZXggPCBtX2ZyYW1lcy5zaXplKCkgJiYgbV9mcmFtZXNbaW5kZXhdLm1faGF2ZU1l
dGFkYXRhKQogICAgICAgICByZXR1cm4gbV9mcmFtZXNbaW5kZXhdLm1fZHVyYXRpb247CiAgICAg
cmV0dXJuIG1fc291cmNlLmZyYW1lRHVyYXRpb25BdEluZGV4KGluZGV4KTsKKyNlbmRpZgogfQog
CiBQYXNzTmF0aXZlSW1hZ2VQdHIgQml0bWFwSW1hZ2U6Om5hdGl2ZUltYWdlRm9yQ3VycmVudEZy
YW1lKCkK
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>207713</attachid>
            <date>2013-07-30 03:39:41 -0700</date>
            <delta_ts>2013-07-30 09:05:37 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-119016-20130730124004.patch</filename>
            <type>text/plain</type>
            <size>2396</size>
            <attacher name="Csaba Osztrogonác">ossy</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTUzNDYwCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggYTQ3NmQ4Njc5NTc5ZThm
ZTlkYTQ3OTRlN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zW2luZGV4XS5tX2hh
dmVNZXRhZGF0YSAmJiBtX2ZyYW1lc1tpbmRleF0ubV9pc0NvbXBsZXRlKQogICAgICAgICByZXR1
cm4gdHJ1ZTsKICAgICByZXR1cm4gbV9zb3VyY2UuZnJhbWVJc0NvbXBsZXRlQXRJbmRleChpbmRl
eCk7CisjZW5kaWYKIH0KIAogZmxvYXQgQml0bWFwSW1hZ2U6OmZyYW1lRHVyYXRpb25BdEluZGV4
KHNpemVfdCBpbmRleCkKIHsKKy8vIEZJWE1FOiBJbWFnZVNvdXJjZUNHLmNwcCBzaG91bGRuJ3Qg
ZXhwZWN0IHRoYXQgZnJhbWVEdXJhdGlvbkF0SW5kZXgoKSBkZWNvZGVzIHRoZSBpbWFnZQorLy8g
aHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTExOTIxOAorI2lmIFVTRShD
RykKKyAgICBpZiAoIWVuc3VyZUZyYW1lSXNDYWNoZWQoaW5kZXgpKQorICAgICAgICByZXR1cm4g
MDsKKyAgICByZXR1cm4gbV9mcmFtZXNbaW5kZXhdLm1fZHVyYXRpb247CisjZWxzZQogICAgIGlm
IChpbmRleCA8IG1fZnJhbWVzLnNpemUoKSAmJiBtX2ZyYW1lc1tpbmRleF0ubV9oYXZlTWV0YWRh
dGEpCiAgICAgICAgIHJldHVybiBtX2ZyYW1lc1tpbmRleF0ubV9kdXJhdGlvbjsKICAgICByZXR1
cm4gbV9zb3VyY2UuZnJhbWVEdXJhdGlvbkF0SW5kZXgoaW5kZXgpOworI2VuZGlmCiB9CiAKIFBh
c3NOYXRpdmVJbWFnZVB0ciBCaXRtYXBJbWFnZTo6bmF0aXZlSW1hZ2VGb3JDdXJyZW50RnJhbWUo
KQo=
</data>
<flag name="review"
          id="229520"
          type_id="1"
          status="-"
          setter="ggaren"
    />
          </attachment>
      

    </bug>

</bugzilla>