Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-34494

Out of control memory growth with Image loading disabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.2.1
    • 5.1.1, 5.2.0 Beta1
    • WebKit
    • None
    • Linux or Windows, binary Qt 5.1.1 distribution. 32 bit or 64 bit, doesn't matter.

    Description

      When using QtWebkit inside Qt 5.1.1, if you have javascript enabled for the QWebPage object, and also turn off image loading with QWebSettings::AutoLoadImages, you will get uncontrolled memory growth over time. If you re-enable image loading, this stops happening.

      This has been tested in multiple Qt projects, on both Windows and Linux. The easiest test method I have at the moment, is to setup a test project that does a google search, and then loads the next page urls until you hit say, page 10. Then repeat as many times as you desire. For example, this list of urls, loading with a random delay of about 5-10 seconds.(To avoid spamming google)

      "https://www.google.com/#q=avengers";
      "https://www.google.com/search?q=avengers&start=10&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=avengers&start=20&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=avengers&start=30&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=avengers&start=40&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=avengers&start=50&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=avengers&start=60&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=avengers&start=70&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=avengers&start=80&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=avengers&start=90&sa=N&biw=1096&bih=616";
      "https://www.google.com/#q=naruto+amv";
      "https://www.google.com/search?q=naruto+amv&start=10&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=naruto+amv&start=20&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=naruto+amv&start=30&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=naruto+amv&start=40&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=naruto+amv&start=50&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=naruto+amv&start=60&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=naruto+amv&start=70&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=naruto+amv&start=80&sa=N&biw=1096&bih=616";
      "https://www.google.com/search?q=naruto+amv&start=90&sa=N&biw=1096&bih=616";

      I have also in the past had a site crash Qt4.8.0, with the same trigger. Javascript on, image loading off, crash. Image loading back on, no crash. Sadly the site in question has changed their page layout, and this is no longer a test case I can present.

      Attachments

        1. Patch-noautoload-images.diff
          0.5 kB
        2. qWebMemTest.zip
          21 kB
        3. WebKitLoadTest.zip
          2 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              allan.jensen Allan Sandfeld Jensen
              urikkiru Nathan Slawson
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes