Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.6.1, 6.6.2, 6.6.3
-
None
-
-
c7328d8f3 (dev), 5ed3c6107 (6.7), 3899c791b (6.6), da1345450 (tqtc/lts-6.5)
Description
After QTBUG-96044 was fixed, one of the optimizations made was to abruptly ignore all path components after 32678 points in a single path.
However, some instances of SVGs easily can have more than 50000, sometimes 100000 points in a single path, especially when using an image trace to turn a complex shape into a vector path.
If the optimization brought by that bugfix is necessary, it would be great if it could be optionally turned off using an environment variable to enable these more complex use cases of QtSVG and not have to use a third-party library to parse and render SVG data.
Here's the result of loading a SVG with any build of Qt/PySide6 since 6.2.2:
Commenting out the lines 1881 and 1882 in qsvghandler.cpp fixes the issue completely:
Also, find the attached SVG file to reproduce the issue. Loading it will print out the error "qt.svg: Invalid path data; path truncated."
Attachments
For Gerrit Dashboard: QTBUG-120653 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
531424,3 | Allow opting out of resource limits on parsing and rendering | dev | qt/qtsvg | Status: MERGED | +2 | 0 |
537720,2 | Allow opting out of resource limits on parsing and rendering | 6.7 | qt/qtsvg | Status: MERGED | +2 | 0 |
537791,3 | Allow opting out of resource limits on parsing and rendering | 6.6 | qt/qtsvg | Status: MERGED | +2 | 0 |
541575,2 | Allow opting out of resource limits on parsing and rendering | tqtc/lts-6.5 | qt/tqtc-qtsvg | Status: MERGED | +2 | 0 |