Bug 464381

Summary: inkscape cannot open valid EPS, pstoedit creates invalid SVG (libplot bug)
Product: [openSUSE] openSUSE 11.1 Reporter: Stanislav Brabec <sbrabec>
Component: GNOMEAssignee: Dr. Werner Fink <werner>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard: .
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Stanislav Brabec 2009-01-08 10:47:08 UTC
Many applications including inkscape refuse to import correct postscript files. Other applications including pstoedit create invalid svg file.

Here is a minimal example:

===== dash.ps =====
.5 setgray
10 setlinewidth
[18 2 2 2] 0 setdash
newpath
200 200 moveto
0 100 rlineto
-100 0 rlineto
0 -100 rlineto
closepath
gsave
stroke
grestore
eofill
showpage
quit
===================

Steps to reproduce:
# Encapsulate dash.ps
ps2ps dash.ps dashe.ps

Then try to open dashe.ps by inkscape or:

# Convert to SVG
pstoedit dashe.ps dash.svg

Then open the resulting SVG in inkscape or eog. Both fails.

Running xmllint discovers following line:
<polygon points="100,200 200,200 200,300 100,300 " stroke="#7f7f7f" stroke-width="0" stroke-dasharray="18 2 2 2"fill="#7f7f7f" />


Problem was debugged Wolfgang Glunz (pstoedit author):

Hi Stanislav,

This is a bug in libplot/ter. See s_path.c line 719 and replace it with
                       i < num_dashes - 1 ? " " : "\" ");

Unfortunately I don't know who is the maintainer of libplot/ter.

BR

Wolfgang
Comment 1 Stanislav Brabec 2009-01-08 10:54:14 UTC
Oops. Reassigning from lablot maintainer to libplot (plotutils) maintainer.
Comment 2 Dr. Werner Fink 2009-01-08 11:11:38 UTC
Add the fix and submitted to factory.
Anja? Does this bug get an official update?
Comment 3 Stanislav Brabec 2009-01-08 11:52:07 UTC
Confirming that the fix is correct and fixes reported problem.

Update for released products would be nice, at least for next SLED SP. The error happens whenever trying to import EPS with filled object with dashed boundary. It causes unexpected errors in many programs (several of them look very strange, like "Error writing" in eog).

While debugging, I also created update to version 2.5.1 for Factory. This bug is not fixed there but it has following other changes (I have ready the updated package):

- Minor SVG output format fixes to ensure compatability with SVG 1.1.
- Error formatting changes.
- Uses GPLv3.

If you are OK with the upgrade, I'll submit it for Factory.

I am also ready to split devel package and shared library into a separate package to be able to save ~10MB for GNOME installation.
Comment 4 Dr. Werner Fink 2009-01-08 11:57:15 UTC
Just do it but you may use the already submitted version ;)
Comment 5 Stanislav Brabec 2009-01-08 12:05:46 UTC
Already reported upstream a month ago:
http://lists.gnu.org/archive/html/bug-plotutils/2008-12/msg00000.html
Comment 6 Swamp Workflow Management 2009-01-09 20:48:18 UTC
The SWAMPID for this issue is 21487.
Please submit the patch and patchinfo file using this ID.
(https://swamp.suse.de/webswamp/wf/21487)
Comment 7 Dr. Werner Fink 2009-01-12 08:59:59 UTC
SWAMP done
Comment 8 Swamp Workflow Management 2009-01-26 10:26:27 UTC
Update released for: plotutils
Products:
openSUSE 11.1 (debug, i586, ppc, x86_64)