restack extension hangs for drawings with many objects
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Low
|
Rob Antonishen |
Bug Description
As posted to the inkscape dev list:
I discovered the restack extension stopped working (under windows XP devel build inkscapeR9097-
The code calling inkscape with the --query-all parameter (to get all
the bounding boxes) was:
if bsubprocess:
p = Popen('inkscape --query-all "%s"' % (file), shell=True, stdout=PIPE, stderr=PIPE)
rc = p.wait()
f = p.stdout
err = p.stderr
It will just hang the python window in such a case.
I found my removing the rc = p.wait() line the extension will work...
but I am not sure of the impact of making that change.
I see the Popen.wait call is used in other extensions as well, but
they all seem to be using the single object query flag --query-id=ID,
so so not experience this problem.
The python docs state Popen.wait "will deadlock if the child process
generates enough output to a stdout or stderr pipe such that it blocks
waiting for the OS pipe buffer to accept more data. Use communicate()
to avoid that."
but it also states that with communicate() "The data read is buffered
in memory, so do not use this method if the data size is large or
unlimited."
tags: | added: extensions-plugins |
Changed in inkscape: | |
assignee: | nobody → Rob Antonishen (rob-antonishen) |
tags: | added: backport-proposed |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
confirmed on Windows XP using the attached file. I get an Inkscape hang (not responding) with a large number of exit messages saying:
(inkscape. exe:2808) : GLib-WARNING **: g_main_ context_ check() called recursively from within a source's check() or prepare() member.