<?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>39628</bug_id>
          
          <creation_ts>2010-05-24 17:17:07 -0700</creation_ts>
          <short_desc>Rapid image reloading causes application failure or crash due to memory exhaustion</short_desc>
          <delta_ts>2011-06-03 14:26:54 -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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Patrick McMichael">patrick</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>thomas</cc>
    
    <cc>tonikitoo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>229989</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick McMichael">patrick</who>
    <bug_when>2010-05-24 17:17:07 -0700</bug_when>
    <thetext>Using the latest Windows nightly (WebKit-r60066) and the following basic DHTML page, I observe either a crash or an application failure after anywhere from 100-700 reloads (progressions):

&lt;html&gt; 
    &lt;head&gt; 
        &lt;title&gt;Test&lt;/title&gt; 
        &lt;script type=&quot;text/javascript&quot;&gt; 
 
        var num_progressions = 0;
        const max_progressions = 100000;
 
        function on_doc_load()
        {
            var el = document.getElementById(&quot;m_holder&quot;).addEventListener(&quot;load&quot;,on_image_received);
            on_image_received();
        }
 
        function on_image_received( i_event )
        {
            num_progressions++;
            document.getElementById(&quot;display&quot;).innerHTML = num_progressions;
            if (num_progressions &lt; max_progressions)
                document.getElementById(&quot;m_holder&quot;).src = &quot;test.jpg?time=&quot; + (new Date().getTime()) + &quot;&amp;rand=&quot; + (Math.round(Math.random()*10000)/10000)
        }
        &lt;/script&gt; 
    &lt;/head&gt; 
 
    &lt;body onload=&quot;on_doc_load()&quot; style=&quot;margin:0; padding:0; display:block;&quot;&gt; 
        &lt;div id=&quot;div_holder&quot;&gt; 
            &lt;div id=&quot;div_render&quot;&gt; 
                &lt;img width=&quot;100%&quot; height=&quot;100%&quot; id=&quot;m_holder&quot;/&gt; &lt;br /&gt; 
            &lt;/div&gt; 
            &lt;div id=&quot;display&quot; style=&quot;position:absolute; right:15px; bottom:15px; color:#777777; display:block;&quot;&gt;&lt;/div&gt; 
        &lt;/div&gt; 
    &lt;/body&gt; 
&lt;/html&gt;

Tested using HTTP only.  The page essentially just reloads the same &quot;test.jpg&quot; image over and over.

Note that you need to supply your own &quot;test.jpg&quot; in the same directory as this file and generally larger files cause the bug behavior to show up sooner (in my tests).  I used the one here:

http://farm4.static.flickr.com/3415/3245411639_f4a01b96b7_o.jpg
(Credit: http://www.flickr.com/photos/gcmenezes/3245411639/sizes/l/ )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>230099</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-05-24 22:30:37 -0700</bug_when>
    <thetext>On Mac OS X, I&apos;m seeing rapid memory growth, so I suspect that the crash is caused by an out of memory condition.

Could you please attach a crash log to confirm, as described in &lt;http://webkit.org/quality/crashlogs.html&gt;? Also, are you seeing memory growth in Windows process monitor?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>230101</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-05-24 22:33:17 -0700</bug_when>
    <thetext>I&apos;m seeing the same memory growth with shipping Safari 4.0.5 on Mac OS X as I do with r60082 nightly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>230388</commentid>
    <comment_count>3</comment_count>
    <who name="Patrick McMichael">patrick</who>
    <bug_when>2010-05-25 11:52:10 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; On Mac OS X, I&apos;m seeing rapid memory growth, so I suspect that the crash is caused by an out of memory condition.
&gt; 
&gt; Could you please attach a crash log to confirm, as described in &lt;http://webkit.org/quality/crashlogs.html&gt;? Also, are you seeing memory growth in Windows process monitor?

Thanks Alexey for your attentiveness to the matter.  I can confirm that the memory growth is continual until the crash, according to the Windows process monitor.  I figured the issue was memory related, so I apologize for not including this tidbit in the bug report.

The only crash report I can provide right now is that from the Windows crash dialog:

Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	Safari.exe
  Application Version:	5.31.22.7
  Application Timestamp:	4b8f94fa
  Fault Module Name:	ntdll.dll
  Fault Module Version:	6.0.6002.18005
  Fault Module Timestamp:	49e03824
  Exception Code:	80000003
  Exception Offset:	00010004
  OS Version:	6.0.6002.2.2.0.256.1
  Locale ID:	1033
  Additional Information 1:	fd00
  Additional Information 2:	ea6f5fe8924aaa756324d57f87834160
  Additional Information 3:	fd00
  Additional Information 4:	ea6f5fe8924aaa756324d57f87834160

It&apos;s outside of my scoped effort on this bug to reconfigure my workstation and reboot the machine.  Sorry.  I hope the above helps.  If you&apos;d like me to provide the dissassembly where the crash happens, I am willing to do that.  I did not build Webkit from source for this bug.

(In reply to comment #2)
&gt; I&apos;m seeing the same memory growth with shipping Safari 4.0.5 on Mac OS X as I do with r60082 nightly.

Yes, I concur.  In fact, I first observed the behavior in the shipping Mobile Safari on the iPad, and have since observed it in all Webkit based browsers I use -- Chrome, and Desktop Safari).  The issue is least pronounced on Desktop Safari, but as you note it is still present.

Thanks again for the prompt attention.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>230396</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-05-25 12:24:57 -0700</bug_when>
    <thetext>&lt;rdar://problem/8025930&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>308227</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-11-11 15:47:54 -0800</bug_when>
    <thetext>See also: bug 31253</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>