Created attachment 128157 [details] SVG file that triggers the problem SUMMARY The attached svg file (which I generated with potrace) seems to make Krita eat up RAM. Shortly after selecting the PPI level I want, my computer freezes up and I start hearing my hard drive go crazy trying to write to swap. I had to ssh in and killall krita before the OOM killer kicked in. I can't actually confirm the memory usage level because top stopped working too. STEPS TO REPRODUCE 1. Open the attached SVG file. 2. Select the default 100 ppi resolution. 3. OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
I just tested with the 5.0-prealpha AppImage, same issue seems to happen.
Hm, curious, if I open your file in inkscape and save it, it opens fine in Krita, but the original file doesn't.
Even more curious, if I attach gdb to the running Krita process, it loads...
Huh... No, it's not that. I have had one session where krita started eating memory like crazy, but now I've been able to load your image a couple of times in a row. It's crazy big, though: 29,639 by 16,000 pixels at 100 dpi, which means it takes about 1,4gb of memory.
Yeah, definitely not an optimized SVG by any means. After trying some different options to try to reduce the number of nodes in the potrace output I got a much better result that doesn't seem to cause problems with Krita either, which is weird. So it doesn't seem to happen with every svg generated by potrace.
A counter "how big this layer will be (pixels, bytes) if you choose this and this ppi" in the dialog is possible, and I believe it would improve the UX greatly, however it doesn't seem to be the only issue here. The rapid increasing of RAM needed suggests an infinite loop somewhere, however it doesn't seem to be easily reproducible.