← Back to team overview

desktop-packages team mailing list archive

[Bug 1194871] Re: Huge Memory consumption by extension and pipe not closed

 

Regarding comment #21:
I am not sure how to do it. Maybe someone more experienced in launchpad/programming/bucktracking can help me out.

Maybe I should file a new bugreport regarding the newest version. The problem I am experiencing is essentially the same reported here (second part) and at  Bug #235371.
However, there are no crashes. It is basically what is described in the second part of the OP:

Applying any extension irreversibly fills memory, until _all_ open inkscape documents are closed.
The larger the file or the more rastered images are embedded/linked the more drastic the problem ist.

The easiest way to reproduce the bug ist:

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to inkscape in Ubuntu.
https://bugs.launchpad.net/bugs/1194871

Title:
  Huge Memory consumption by extension and pipe not closed

Status in Inkscape: A Vector Drawing Tool:
  Triaged
Status in “inkscape” package in Ubuntu:
  New
Status in “inkscape” package in Arch Linux:
  New
Status in Mandriva Linux:
  New

Bug description:
  Hi,

  I was just playing around the different extension and I come to know a
  strange result.

  As per my understanding about Inkscape extension is as below.

  When any extesnion apply it creates temp. file in /tmp folder (in
  Linux) with extension effect and copy the temp. file using copy_doc
  function (in script.cpp_ file.

  Now to just play around I just comment the line
  copy_doc(doc->doc()->rroot, mydoc->rroot);
  from script.cpp file, now this will not display extension result on the screen but open pipes(fifo) to run the script, now every time pipes open to run the script as child process, but this pipes are not closed hence after some time it will give error as
  Can't Spawn!!! spawn returns: Failed to create pipe for communicating with child process (Too many open files
  which is why max. file descriptor limit reached. 

  So this is one thing about pipes.

  Now second thing is huge memory consumption, to generate the scenario please do the steps as below.
  Open Inkscape
  Go to extension->Render->Gear
  Now Just click Apply

  Now if you just applying the same plugin again and again inkscape
  memory will keep increasing, and If we delete the resulting effect by
  extension then also it is not getting free.

  You can also apply different extension to generate the same memory
  issue. I did it on inkscape version 0.84.4 on Ubuntu 10.04  and Ubuntu
  12.04 and results are same.

  Now I have debug the things and I found that when extension create new
  file and it is copied using copy_doc into original doc at that time
  inkscape also create Root, Metadata, namedview element, which is I
  think inkscape default, that creates when inkscape start and they will
  remain in memory until inkscape exit.

  So I think when new svg copied to the original at that time it start
  eating memory.

  I was behind this from last 2 days and while searching for memory leak
  issue when applying extension, I found this.

  I don't know how to contact developer, But If you give me more hints I
  can give you better testing feedback. In this bug If you require
  further details, please let me know. Also please let me know If there
  is any quick work around are possible to reduce memory usage.

To manage notifications about this bug go to:
https://bugs.launchpad.net/inkscape/+bug/1194871/+subscriptions