Dia

dia eps export broken in gutsy

Bug #155091 reported by Thomas Coffee
4
Affects Status Importance Assigned to Milestone
Dia
Confirmed
Undecided
Unassigned
dia (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I routinely exported dia diagrams to eps for several months under feisty with no problems; however, upon upgrading to gutsy, dia now produces flawed eps files on my system when exporting to eps.

The version of dia has been the same in both cases (0.96.1-3).

I am not certain this is a bug in dia, but I have not been able to localize the problem elsewhere.

The following behavior is identical with eps export using Pango or PS Latin-1 fonts:

The export from dia appears to proceed normally, and an .eps file is produced. However, the .eps file when viewed with evince shows only a small, seemingly random subset of the graphics primitives present in the original file (i.e., out of many virtually identical primitives only a few may appear). The bounding box is sized as though all graphics primitives were present, and the size of the .eps file is proportionate to the number of primitives in the original .dia file, however, most graphics primitives are invisible in the output. The .eps files also appear to have errors: for instance, while ps2pdf can produce a .pdf file with the same appearance as each .eps file, it produces errors in the conversion (shown below); also, LyX is unable to load the .eps files into documents ("error converting to loadable format").

New .dia files created from scratch appear to work correctly. However, when pasting graphics primitives from other .dia files into a new file, only those that appeared in the .eps export of the old file will appear in the .eps export of the new file. Even this is not the whole story, as in some cases I have gotten primitives that did not export from an old file to export from a new file after copy-pasting, and vice versa. However, I have not been able to discern a definite pattern here. The success of export may have something to do with the order in which primitives are added to the diagram (could all primitives after a certain point in the .eps file be ignored?). The upshot is that copying all the primitives from an old file to a new file essentially does not change anything.

I have tried completely removing all dia packages and reinstalling, with no effect.

This is a terrible problem for me, as I have created all the block diagrams for my thesis in dia, and have no other way to import them into LaTeX: dia's XFig export produces a very poor quality .fig file for my diagrams, and the SVG export produces files with numerous errors and omissions. I will be more than happy to further help debug this if anyone has an idea where to start.

Many thanks!

- Thomas Coffee

Sample error output from ps2pdf:

Error: /undefined in nan
Operand stack:

Execution stack:
   %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1889 1 3 %oparray_pop 1888 1 3 %oparray_pop --nostringval-- 1872 1 3 %oparray_pop 1755 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
   --dict:1152/1684(ro)(G)-- --dict:0/20(G)-- --dict:133/200(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 7533
GPL Ghostscript SVN PRE-RELEASE 8.61: Unrecoverable error, exit code 1

Tags: gutsy
Revision history for this message
Thomas Coffee (tcoffee) wrote :

Here is an example .dia file I created prior to the gutsy upgrade

Revision history for this message
Thomas Coffee (tcoffee) wrote :

Here is the .eps output I get when exporting it

Revision history for this message
TerryG (tgalati4) wrote :

Thanks for your bug submission. Evince (2.20.1) under gutsy will not render diagram eps file correctly. Don't have a feisty machine handy to test, but this looks like a regression.

Marking as Confirmed.

Changed in dia:
status: New → Confirmed
Revision history for this message
TerryG (tgalati4) wrote :

Marking Confirmed as stated.

Changed in dia:
status: New → Confirmed
Revision history for this message
Gregory Hartman (ghartman17022-gmail) wrote :

I am seeing a similar problem with some of my diagrams. Just for reference I also run dia under Debian etc, and the EPS export on etch works for the same files.

Revision history for this message
Gregory Hartman (ghartman17022-gmail) wrote :

I'm fairly confident that the problem is in the eps output, not the viewers. I've reached this conclusion by comparing the EPS output from etch and gutsy. A diff of the files reveals:

 diff request-categories-etch.eps request-categories-gutsy.eps
4c4
< %%CreationDate: Thu Apr 3 14:36:56 2008
---
> %%CreationDate: Fri Apr 4 11:30:33 2008
737c737
< n 34.542893 22.542893 0.000000 0.000000 -18007.812500 359.900000 ellipse s
---
> n nan 22.542893 0.000000 0.000000 360.000000 359.900000 ellipse s
739c739
< n 34.542893 22.542893 0.000000 0.000000 -18007.812500 359.900000 ellipse s
---
> n nan 22.542893 0.000000 0.000000 360.000000 359.900000 ellipse s

and so on. This explains the error message from ghostscript, since nan is quite literally not a number and not defined in the dictionary

I suspect that the problem lies somewhere in the zig-zag lines in the .dia file. These lines seem to include extra points that throw off the rounding code. The problem doesn't seem to be in the dia code base, since I recompiled the exact code that I used on etch and still had the problem.

In the short term I've been able to work around the problem by doing a grep -v " nan " on the resulting .eps. Naturally this isn't the best solution...

Revision history for this message
Gregory Hartman (ghartman17022-gmail) wrote :

Here's the corresponding bad file from gutsy.

Revision history for this message
Thomas Coffee (tcoffee) wrote : Re: [Bug 155091] Re: dia eps export broken in gutsy

Thanks, Gregory --- I will give this a try next time I revisit these files.

- Thomas

On Fri, Apr 4, 2008 at 8:38 AM, Gregory Hartman <email address hidden>
wrote:

> Here's the corresponding bad file from gutsy.
>
> ** Attachment added: "request-categories-gutsy.eps"
> http://launchpadlibrarian.net/13115013/request-categories-gutsy.eps
>
> --
> dia eps export broken in gutsy
> https://bugs.launchpad.net/bugs/155091
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
______________________________________

Thomas Coffee
Massachusetts Institute of Technology
Department of Aeronautics & Astronautics
Space Systems Laboratory

NASA Jet Propulsion Laboratory
Mission Systems Concepts
Systems Analysis & Modeling Group
M/S 301-165

285 N Garfield Ave #5B
Pasadena, CA 91101
617.549.5492
______________________________________

Revision history for this message
madbiologist (me-again) wrote :

Support for Ubuntu 7.10 "Gutsy Gibbon" has ended. If this problem is still ocurring on Ubuntu 12.10 "Quantal Quetzal" please file a new bug.

tags: added: gutsy
Changed in dia (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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