Details
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
Issue Links
- relates to
-
QTBUG-36707 Memory leak in GStreamer
- Closed
- replaces
-
QTBUG-36530 QtWebKit memory leaks (memory increases with every new page load)
- Closed