Pattern fills cause memory leak

Bug #706294 reported by Mahendra Tallur
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Unassigned

Bug Description

Hi everyone,

there are other related bugs, but I decided to open a new one with a specific use case.

Short form : when using a complex spiraling pattern, hundreds of MegaBytes or ram are used by Inkscape after zooming in and out a couple of times. After working on the document for several minutes, Inkscape completely fills my 4 GB of ram and causes the system to crash (or is killed by the kernel).

I isolated the object which triggers the issue. It's a simple polygon to which is applied a complex pattern.
(please also note that PDF export fails : evince doesn't manage to render it and gets extremely slow before crashing)

Cheers !

(Using : Ubuntu 10.10 AMD64, no PPA, Inkscape 0.48)

Revision history for this message
Mahendra Tallur (mahen) wrote :
Revision history for this message
su_v (suv-lp) wrote :

> there are other related bugs, but I decided to open a new one with a specific use case.

Could you please add the links (or bug numbers) to the reports you are referring to?

tags: added: pattern performance
Revision history for this message
Mahendra Tallur (mahen) wrote :

Well, I was refering to reports that describe memory leaks. Most of them are pretty specific (and describe use cases different from mine) but there is also a general one here : https://bugs.launchpad.net/inkscape/+bug/608944

Revision history for this message
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.48+devel r10009 on OS X 10.5.8

Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

Seems to be the same issue as reported in bug #608944 - when removing the pattern fills from its attached SVG file, the memory leak no longer occurs when changing zoom levels.

summary: - Huge memory leak when zooming in & out complex pattern (example
- attached)
+ Pattern fills cause memory leak
tags: added: renderer
Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

The situation is substantially improved in current trunk, but there is still a smaller memory leak when zooming around in a document with pattern fills.

Revision history for this message
Beluga (buovjaga) wrote :

Unable to repro mem leak when zooming around. Mem is freed after zooming out and scrolling out of view at a minimum.
Plz re-test.

Arch Linux 64-bit, KDE Plasma 5
Inkscape 0.92pre1 15054 (GTK3)

Nathan Lee (nathan.lee)
tags: added: bug-migration
Changed in inkscape:
status: Confirmed → Fix Released
Revision history for this message
Nathan Lee (nathan.lee) wrote :

Closing because it is no longer an issue in 1.0alpha

2 issues were mentioned

1. Crash / memory leak on zooming with file (due to complex spiraling pattern used)
2. PDF export fails and gets extremely slow before crashing

Neither are present in
- 1.0alpha trunk (up to date) Linux Mint 19.1
- 0.92.3 (2405546, 2018-03-11) ppa Linux Mint 19.1
- 0.92.4 5da689c313, 2019-01-14 flatpak Linux Mint 19.1

Zooming can get to massive memory use (1.5GB for the file provided, which is relatively simple) but is properly dumped and only causes freezing at the worse.

To make sure I got the issue right, did some more tests on a Window 10 VM (3GB max memory). All of these were from archives on inkscape.org.
- 0.48 r9654 shows memory leak, eventual crash, but good pdf (note this is likely an earlier version than reported by OP)
- 0.91 r13725 has no problems zooming, but pdf fails. I guess pdf rendering exits early, only the top and bottom of the pattern are rendered. 3KB file.
- 0.92.0 r15299 crash zooming but no memory leak. Unknown cause. Pdf fails, see above, 3KB.
- 0.92.1 r15371 same as above.
- 0.92.2 can't get inkscape to open, let alone the file (crashes).
- 0.92.4 2019-01-14 (installed version). no leak, can freezing, but eventually back to normal. Good pdf.
- 1.0alpha 2019-03-24 same as above.

Closed by: https://gitlab.com/nathanal

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.