Created attachment 139654 [details] The svg file that causes the memory problem SUMMARY I wanted to open an svg file today but it required 15GB of memory, which then froze my computer forever. This doesn't happen for all svgs. STEPS TO REPRODUCE 1. open the attached svg 2. wait 3. freezes OBSERVED RESULT RAM fills up until earlyoom stops krita EXPECTED RESULT svg opens. It works in gimp SOFTWARE/OS VERSIONS Linux/KDE Plasma: Xubuntu 21.04 Qt Version: 5.15.2 ADDITIONAL INFORMATION svg attached
Hello. I can't reproduce the OOM. But it seems the rendering isn't correct. I tested this in multiple programs, browsers, GIMP are able to render it correctly. But Krita and Inkscape seem to fail even after tweaking the SVG file.
I can still reproduce it. Is there any log I could generate? The original file (that also caused the memory problem) used to contain stuff that should not be shown to the public, so I opened it in a text editor and removed a bunch of numbers and found that it still opens in my browser and still causes the same memory leak.
I don't have a problem opening this test.svg file in Inkscape and GIMP and in Krita with the Aug 04 5.0.0-prealpha (git 3dc6b64) and the 4.4.5 appimages on Debian 10. GIMP clearly shows naked paths extending far outside the view box. Inkscape does not show any indication of those 'strange' paths. Krita does show colouring in of those paths. Maybe the .svg file was malformed from the start ? This was reported for version 4.4.3 from Ubuntu packages. @to.213692 Can you try it with the version 4.4.5 appimage?
I can reproduce the OOM on a different computer with Manjaro running Krita 4.4.5-3
Thanks for your comment! Automatically switching the status of this bug to REPORTED so that the KDE team knows that the bug is ready to get confirmed. In the future you may also do this yourself when providing needed information.
@to.213692 Is "4.4.5-3" from Manjaro packages? Can you try it with the 4.4.5 appimage?
yes, it's from the manjaro repo. the appimage with the same version does not cause the OOM Maybe there is a dependency that is working in the appimage but sometimes broken in installations from repositories?
Yeah, using a distro version of Krita is generally speaking a bad idea. We have over eighty patches to Qt, and the appimage still uses Qt 5.12, because newer versions of Qt are barely usable.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1532
Git commit ac4afecd320ff029e3dddfab7e1b0a941ef141e9 by Sharaf Zaman. Committed on 26/07/2022 at 07:41. Pushed by szaman into branch 'master'. Fix Elliptic Arc to Bezier curve function in SVG To get rid of undefined behavior. Related: bug 456922 M +106 -98 libs/flake/KoPathShapeLoader.cpp https://invent.kde.org/graphics/krita/commit/ac4afecd320ff029e3dddfab7e1b0a941ef141e9
Git commit 07108aaa0d1e473b0b8c78347c2934d57dc8f497 by Sharaf Zaman. Committed on 28/07/2022 at 15:55. Pushed by szaman into branch 'krita/5.1'. Fix Elliptic Arc to Bezier curve function in SVG To get rid of undefined behavior. Related: bug 456922 (cherry picked from commit ac4afecd320ff029e3dddfab7e1b0a941ef141e9) M +106 -98 libs/flake/KoPathShapeLoader.cpp https://invent.kde.org/graphics/krita/commit/07108aaa0d1e473b0b8c78347c2934d57dc8f497