Bug 140387 - ghostsript crash while printing to pdf in Krita
Summary: ghostsript crash while printing to pdf in Krita
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: KDE (show other bugs)
Version: RC 4
Hardware: Other Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Marcus Schaefer
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-20 18:47 UTC by Pavel Nemec
Modified: 2006-03-20 16:36 UTC (History)
4 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
/tmp/kde-llunakKWY1w8/kdeprint_TTkva9pf (21.86 KB, application/postscript)
2006-01-12 17:43 UTC, Lubos Lunak
Details
Print preview and same document printed to pdf (165.68 KB, image/png)
2006-03-14 15:13 UTC, Pavel Nemec
Details
Coparision between resulting print.pdf and kdeprint_TTkva9pf (39.82 KB, image/png)
2006-03-14 15:33 UTC, Dr. Werner Fink
Details
Printed page to pdf (80.87 KB, application/pdf)
2006-03-16 17:29 UTC, Pavel Nemec
Details
Printed preview, postscript (730.05 KB, application/postscript)
2006-03-16 17:30 UTC, Pavel Nemec
Details
Snapshot of various program trying to open pdf (294.92 KB, image/jpeg)
2006-03-16 17:30 UTC, Pavel Nemec
Details
screen shot of the acroread window. (98.09 KB, image/png)
2006-03-16 17:43 UTC, Dr. Werner Fink
Details
xorg conf (8.11 KB, text/plain)
2006-03-20 11:26 UTC, Pavel Nemec
Details
Xorg log file (62.39 KB, text/x-log)
2006-03-20 11:29 UTC, Pavel Nemec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Nemec 2005-12-20 18:47:32 UTC
When i try print something to pdf next message appear:
A print error occurred. Error message received from system:

Abnormal process termination (gs -q -dSAFER -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$out{/home/thidney/print.pdf} -sPAPERSIZE=a4 -c .setpdfwrite -f '/tmp/kde-pnemec/kdeprint_JUFiWSxW' ).

Printing in ps work perfectly. 
Print preview also do not work.
Comment 1 Lubos Lunak 2006-01-12 17:42:27 UTC
Crash in gs. The actual command is e.g. 

/usr/bin/gs -q -dSAFER -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=/home/llunak/print.pdf -sPAPERSIZE=a4 -c .setpdfwrite -f /tmp/kde-llunakKWY1w8/kdeprint_TTkva9pf

I'll also attach /tmp/kde-llunakKWY1w8/kdeprint_TTkva9pf .
Comment 2 Lubos Lunak 2006-01-12 17:43:38 UTC
Created attachment 63162 [details]
/tmp/kde-llunakKWY1w8/kdeprint_TTkva9pf
Comment 3 Dr. Werner Fink 2006-01-13 10:52:39 UTC
Explain why this bug is critical?  I can reproduce this even
for SuSE Linux 9.3.
Comment 4 Pavel Nemec 2006-01-13 12:04:18 UTC
I think is critical, because printing is really elementary feature and it is very visible feature.
Comment 5 Dr. Werner Fink 2006-01-13 12:17:33 UTC
Even ghostscript 8.50 shows this bug. IMHO this looks
like a application producing HUGE dict in postscript.
The crahs happens within comparision of two dicts on
the stack.
Comment 6 Dr. Werner Fink 2006-01-13 14:31:31 UTC
OK, I've a patch for this, build checks are running.
The fix is for the next release SL10.1 and SLES10
Comment 7 Pavel Nemec 2006-03-14 15:10:15 UTC
It is work now. But little bit strange. Preview is stretch, when printed page is normal. See attached picture.
Comment 8 Pavel Nemec 2006-03-14 15:13:14 UTC
Created attachment 72798 [details]
Print preview and same document printed to pdf
Comment 9 Dr. Werner Fink 2006-03-14 15:25:47 UTC
This has nothing todo with ghostscript and the bug within
this bugzilla but with Konqueror.  I've run the line

gs -q -dSAFER -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=print.pdf -sPAPERSIZE=a4 -c .setpdfwrite -f kdeprint_TTkva9pf

with the attachment and done a comparision with gs and xpdf and found that
the graphic results are identical.
Comment 10 Dr. Werner Fink 2006-03-14 15:33:00 UTC
Created attachment 72803 [details]
Coparision  between resulting print.pdf and kdeprint_TTkva9pf

Here you can see.
Comment 11 Pavel Nemec 2006-03-16 17:21:26 UTC
I am not sure, you have right. 
I did some tests.
I get postscript picture from print preview. Ghostview open it right, but kghostview (which is only parser for gv?) and evince failed and stretch picture. I tested in on Mac OS X and i was able to converted correctly to pdf. I will attach this file.

I get printed pdf file. Ghostview, AdobeReader!!, KghostView stretch page. And evince kpdf, open it correctly. I can`t open this pdf file on Mac OS X at all!! GhostView have strange behavior with zooming (see attached snapshot)

I am not sure if this have something to do with gs :( but it is terrible behavior.
Comment 12 Pavel Nemec 2006-03-16 17:29:42 UTC
Created attachment 73356 [details]
Printed page to pdf
Comment 13 Pavel Nemec 2006-03-16 17:30:20 UTC
Created attachment 73357 [details]
Printed preview, postscript
Comment 14 Pavel Nemec 2006-03-16 17:30:53 UTC
Created attachment 73358 [details]
Snapshot of various program trying to open pdf
Comment 15 Dr. Werner Fink 2006-03-16 17:42:07 UTC
I've just open the pdf in comment #7 with acroread and it
looke absolut normal.  Could it be that your monitor
resolution is broken?  I'm using

  /suse/werner> xdpyinfo | grep -i resolution:
    resolution:    98x98 dots per inch

which is dpi in x and y direction are the same.     
Comment 16 Dr. Werner Fink 2006-03-16 17:43:37 UTC
Created attachment 73361 [details]
screen shot of the acroread window.
Comment 17 Pavel Nemec 2006-03-16 18:03:34 UTC
Hmmm i use dual head (LCD+CRT)
resolution:    180x96 dots per inch
Comment 18 Dr. Werner Fink 2006-03-16 18:12:51 UTC
This is a aspect ratio of aproximatly 2:1 ... please try out
what happens single head (LCD or CRT).  The resultion pdf
file seems to be device dependend (binary image, no other way).
In other words if you're not printing and if the viewer is not
able to correct the resolution to fit the resolution of the
xinerama screen, the pdf file must be streched into the other
direction ... e.g. with the option -r of gs. But you can not
print this file on an printer with a normal resolution.
Comment 19 Pavel Nemec 2006-03-16 18:38:22 UTC
On single monitor all work perfectly :(
Comment 20 Dr. Werner Fink 2006-03-17 10:05:47 UTC
Hmmm ... do you have set the dpi values on the command line
of the Xserver(s) and what are you using for the dimension
of the two monitors in the /etc/X11/xorg.conf?  Search for
the valies of DisplaySize in the sections "Monitor".

IMHO the x and y dpi values should be the same ±2
Comment 21 Pavel Nemec 2006-03-20 10:30:25 UTC
You pointed me to right direction.
If i add 
Option        "MergedDPI" "95 96"
to xorg.conf all problems vanish.
I am not sure if i should report it as sax bug? (xorg.conf was generated using sax without any modification)
Comment 22 Dr. Werner Fink 2006-03-20 10:34:58 UTC
Marcus? Just read comment #21. would it make sence to use this Option
in xorg.conf for dual head configurations?
Comment 23 Marcus Schaefer 2006-03-20 10:55:40 UTC
MergedDPI *hui* never heard of that and it's not documented
I think this entry will overwrite the X-Server calculated DPI
values referring to the mm values of the DisplaySize setup in
xorg.conf.

- First and foremost the question here is what are
  the DisplaySize value of your current /etc/X11/xorg.conf ?
  I still assume the error to be there

I'm using DualHead as well and my DPI values has been calculated
correctly by the server 
Comment 24 Pavel Nemec 2006-03-20 11:24:52 UTC
Section "Monitor"
DisplaySize  360 270
...
EndSection

I have ATI card, i will attach xorg.conf

I tried switch on/of IgnoreEDID option, because this helped me once with wrong monitor on nvidia card. 
Comment 25 Pavel Nemec 2006-03-20 11:26:28 UTC
Created attachment 73943 [details]
xorg conf
Comment 26 Pavel Nemec 2006-03-20 11:29:14 UTC
Created attachment 73945 [details]
Xorg log file

i find interesting this:
(II) Module theatre_detect: vendor="X.Org Foundation"
        compiled for 4.3.99.902, module version = 1.0.0
        ABI class: X.Org Video Driver, version 0.8
(II) RADEON(0): no multimedia table present, disabling Rage Theatre.
(WW) RADEON(0): Option "SaXDualHead" is not used
(WW) RADEON(0): Option "SaXDualMonitorVendor" is not used
(WW) RADEON(0): Option "SaXDualOrientation" is not used
(WW) RADEON(0): Option "SaXDualResolution" is not used
(WW) RADEON(0): Option "SaXDualMode" is not used
(WW) RADEON(0): Option "SaXDualHSync" is not used
(WW) RADEON(0): Option "SaXDualMonitorModel" is not used
(WW) RADEON(0): Option "SaXDualVSync" is not used
(==) RandR enabled
Comment 27 Marcus Schaefer 2006-03-20 11:56:19 UTC
Thanks for the information, well the DisplaySize is correct for
the monitor and I see no reason why the DPI calculation gets so wrong.
I assume this is another radeon driver problem. By the way if you
set

   DisplaySize 720 270

does it fix your problem without using MergedDPI ?
Comment 28 Pavel Nemec 2006-03-20 12:06:44 UTC
Yes. DPI is 90 x 96. Pdf files are displayed correctly. 
I am using native radeon driver, not proprietal one.

Comment 29 Marcus Schaefer 2006-03-20 16:36:09 UTC
ok, I added a fix to adapt the DisplaySize correctly if the secondary
monitor size could be detected. The code will be in the DualHead
profile

  /usr/share/sax/profile/Radeon_DualHead_DriverOptions.pl