RESOLVED INVALID 68187
[Qt] very small stroke-width in embedded svg document + dashed css border causes excessive memory use
https://bugs.webkit.org/show_bug.cgi?id=68187
Summary [Qt] very small stroke-width in embedded svg document + dashed css border cau...
Michael Nutt
Reported 2011-09-15 13:29:27 PDT
I'm rendering screenshots from web pages with qtwebkit and have found that in certain instances a stroke-width seems to cause qt to use 100% cpu and eventually 100% memory trying to compute. A stroke-width of 0.00000001 effectively locks the rendering until my machine runs out of memory. Oddly, this only appears to happen when a css border-type attribute of 'dashed' or 'dotted' is specified in the html. I've attached a test-case. I believe the offending lines to be: html: <body style="border-top:1px dashed #CCC;"> svg: <rect rx="2" ry="2" fill="#CCFFFF" x="9" y="7" width="20" height="12" stroke-width="0.00000001" zIndex="3" stroke="#FFFFFF" r="2"></rect> <rect rx="2" ry="2" fill="#FFBB66" x="79" y="7" width="20" height="12" stroke-width="0.00000001" zIndex="3" stroke="#FFFFFF" r="2"></rect> I've also attached a simple qt app that renders to a png and demonstrates the issue. qmake make ./test_dashed broken.html As written, it hangs for me after render() is called. If I change the border to solid or the stroke-width to 1, it correctly renders a test.png.
Attachments
html page that causes crash (241 bytes, text/html)
2011-09-15 13:30 PDT, Michael Nutt
no flags
svg linked from html page (should be in the same directory) (3.02 KB, image/svg+xml)
2011-09-15 13:30 PDT, Michael Nutt
no flags
small qt app that reproduces crash (2.01 KB, application/octet-stream)
2011-09-15 13:31 PDT, Michael Nutt
no flags
test_dashed.h (439 bytes, application/octet-stream)
2011-09-15 13:31 PDT, Michael Nutt
no flags
test_dashed.pro (219 bytes, application/octet-stream)
2011-09-15 13:37 PDT, Michael Nutt
no flags
Stack trace (22.28 KB, text/plain)
2011-09-15 15:20 PDT, Michael Nutt
no flags
Michael Nutt
Comment 1 2011-09-15 13:30:17 PDT
Created attachment 107537 [details] html page that causes crash
Michael Nutt
Comment 2 2011-09-15 13:30:42 PDT
Created attachment 107538 [details] svg linked from html page (should be in the same directory)
Michael Nutt
Comment 3 2011-09-15 13:31:30 PDT
Created attachment 107539 [details] small qt app that reproduces crash
Michael Nutt
Comment 4 2011-09-15 13:31:49 PDT
Created attachment 107540 [details] test_dashed.h
Michael Nutt
Comment 5 2011-09-15 13:37:14 PDT
Created attachment 107543 [details] test_dashed.pro
Michael Nutt
Comment 6 2011-09-15 15:08:40 PDT
This is on qt 4.7.4.
Michael Nutt
Comment 7 2011-09-15 15:20:24 PDT
Created attachment 107556 [details] Stack trace This is a stack trace from when I killed the app after it froze.
Jocelyn Turcotte
Comment 8 2014-02-03 03:18:56 PST
=== Bulk closing of Qt bugs === If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary. If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.
Note You need to log in before you can comment on or make changes to this bug.