Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 121849

Summary: gv-3.6.1-r1 (-r3 too) shows just a blank page
Product: Gentoo Linux Reporter: Jaroslaw Kalinowski <jak137>
Component: Current packagesAssignee: Printing Team <printing>
Severity: normal CC: michal, msteinbo
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
After 1/4 of a years testing, I think this patch fixes the bug 121849.
proposed patch against gv-3.6.1 replacing -g2x2 with -dFIXEDMEDIA

Description Jaroslaw Kalinowski 2006-02-06 09:50:10 UTC
For some *.ps documents gv-3.6.1-r1 shows just a blank page instead of the document content. The same documents are correctly shown by gv-3.5.8-r4 or ggv.
Unfortunately there is no error message.
Comment 1 Jaroslaw Kalinowski 2006-02-06 09:51:11 UTC
Created attachment 79039 [details]

Sample PostScript file for which there is a problem.
Comment 2 Jaroslaw Kalinowski 2006-02-06 09:51:49 UTC
Portage 2.1_pre4-r1 (default-linux/x86/2005.1, gcc-3.4.5, glibc-2.3.6-r2, 2.6.14-gentoo-r5 i686)
System uname: 2.6.14-gentoo-r5 i686 AMD Sempron(tm)   3000+
Gentoo Base System version 1.12.0_pre15
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
CFLAGS="-Os -march=athlon-xp -mfpmath=sse -mmmx -msse -m3dnow -funroll-loops -pipe"
CONFIG_PROTECT="/etc /usr/grass60/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-Os -march=athlon-xp -mfpmath=sse -mmmx -msse -m3dnow -funroll-loops -pipe"
FEATURES="autoconfig distlocks sandbox sfperms strict"
LINGUAS="pl en de fr it ru ar"
USE="x86 3dnow X Xaw3d a52 aac alsa apm arts avi berkdb bidi bitmap-fonts blas bonobo bzip2 cairo cdparanoia cdr crypt cscope ctype cups dbm dts dv dvb dvd dvdr dvdread eds emacs emboss encode exif fbcon ffmpeg fftw flac foomaticdb fortran gb gd gdbm gif ginac glut gmp gnome gphoto2 gpm gps gstreamer gtk gtk2 gtkhtml guile ieee1394 imagemagick imlib ipv6 jack java jpeg kde lapack lcms libg++ libgda libwww lm_sensors mad matroska mbox mikmod mime mmx mng mnogosearch mono motif mozilla mp3 mpeg msql mule ncurses netcdf nis nls nodrm nsplugin ocaml odbc ogg oggvorbis opengl oss pam pcmcia pdflib perl php plotutils png portaudio postgres python qt quicktime readline recode ruby samba scanner sdl sndfile speex spell spl sse ssl svg szip tcltk tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts unicode usb vcd vhosts vorbis wifi win32codecs wmf wxwindows xine xinerama xml2 xmms xosd xpm xv zeo zlib elibc_glibc kernel_linux linguas_pl linguas_en linguas_de linguas_fr linguas_it linguas_ru linguas_ar userland_GNU"
Comment 3 Stefan Schweizer (RETIRED) gentoo-dev 2006-02-06 14:16:57 UTC
I added a -r2 including fixes from debian. I guess debian fixed this. Please reopen if not.
Comment 4 Carl Michal 2006-04-10 16:27:30 UTC
This seems to be happening again in 3.6.1-r3

It appears to be a problem in the gs command line:  there is a -g2x2 which tells gs to render into a 2 pixel by 2 pixel window. 
Comment 5 Carl Michal 2006-04-11 17:21:06 UTC
This behaviour is caused by the gv-3.6.1-landscape.patch
which apparently is there to: 'Avoid unwanted rotation of landscape pdf files'

The original (?) posting of it:
says its a workaround - looks like kind of an ugly hack since the -g option is supposed to specifiy the device dimensions in pixels.

This patch breaks gv for some ps files - looks like the cure is worse than the disease.
Comment 6 Jaroslaw Kalinowski 2006-04-12 03:06:26 UTC
It seems that there is a problem again. Reopening.
Comment 7 Stefan Schweizer (RETIRED) gentoo-dev 2006-04-12 03:10:02 UTC
so what exactly do I need to do to fix this?
Comment 8 Carl Michal 2006-04-12 08:56:44 UTC
Just removing the gv-3.6.1-landscape.patch from the ebuild solves the blank page
problem for me.  That patch is a one liner that simply adds -g2x2 to the gs command line.

According to the bug at this will expose a not-that-easy to see cropping bug, but to me that sounds less harmful than the blanks it produces now.

The thing that is confusuing, is that the gnu bug says this patch solves a cropping problem, but the patch itself claims to avoid unwanted rotation of landscape pdf files - perhaps those are the same thing, but it isn't obvious to me that they are.
Comment 9 Markus Steinborn 2006-04-13 12:59:03 UTC
Created attachment 84582 [details, diff]
After 1/4 of a years testing, I think this patch fixes the bug 121849.

On, the same bug is bug #12155 (closed, as the maintainer has not reopened it yet). Perhaps he will not do so, because here is the fix:

I am not an official maintainer, but gv is my by
far most used postscript previewer - in fact, the same bug can be triggered
with usual postscript files, too.

I have benn testing the attached fix since 1/4 year with best results, so
it's time to release it :-)

"-dFIXEDMEDIA" instead of "-g2x2" seems to be much more compatible - even more compatible than giving no option at all.

Please note that this patch changes the default parameters of the
ghostscript invokation in the "State - Ghostscript options - Arguments" dialog, so consider clicking on "System defaults" in that window. If the user may edit
the parameter, he can easyly change it for hard files; 'specially if "-dFIXEDMEDIA" causes problems. I think it's just the best solution

As usual, my contact info is in the patch file as comment.
Comment 10 Markus Steinborn 2006-04-13 13:03:05 UTC
(In reply to comment #9)

Yust forget to mention: The patch is against the CVS HEAD Version of GNU GV from the
Comment 11 Stefan Schweizer (RETIRED) gentoo-dev 2006-04-13 13:13:40 UTC
Can you please make a svn-ebuild for it including the patch? :)

I guess I do not understand gv enough .. I already messed up the last ebuild-patch
Comment 12 Markus Steinborn 2006-04-13 13:31:44 UTC
(In reply to comment #8)

> The thing that is confusuing, is that the gnu bug says this patch solves a
> cropping problem, but the patch itself claims to avoid unwanted rotation of
> landscape pdf files - perhaps those are the same thing, but it isn't obvious to
> me that they are.

They are the same thing: The cropping occurs 'cause the dimensions of the landscape page are incorrently rotated by 90 degree (please do not ask me if clockwise or anticlockwise, I do not know) by ghostscript. "-g2x2" implies "-dFIXEDMEDIA" and therefore the dimensions of the page cannot be changed, 'specially they cannot be rotated by ghostscript.

-g2x2 implies other parameters then "-dFIXEDMEDIA", e.g. "-dFIXEDRESOLUTION" (Information originally taken from the source code of Ghostscript).  There should even more parameters be implied, but I do not remember them.

This is the explanation why the ugly parameter is a work-around for the problem. 

(In reply to comment #11)

If you mean me: I cannot, I am not using gentoo. YUst saw in the that you have a problem I have a solution for. But surely, you will find someone else for doing it.
Comment 13 Carl Michal 2006-04-13 16:36:12 UTC
Created attachment 84593 [details, diff]
proposed patch against gv-3.6.1 replacing -g2x2 with -dFIXEDMEDIA

This is a version of Markus' patch that will work with the ebuild.  It patches in addition to

All that needs to be done, I think to go from gv-3.6.1-r2.ebuild to
gv-3.6.1-r3.ebuild is to remove the gv-3.6.1-landscape.patch in the ebuild with this patch.  Works for me, and I like that this option is user changable.

To make the patch work, you must rebuild gv, and then etc-update, as this fix gets put into a config file in /etc/X11/app-defaults/GV
Comment 14 Dan Ost 2006-05-30 09:00:07 UTC
Why hasn't this fix been incorporated into portage yet?
Comment 15 Stefan Schweizer (RETIRED) gentoo-dev 2006-06-01 11:23:42 UTC
I added a -r4, can you please confirm that it works for you?

alpha amd64 ppc ppc64 sparc x86
Comment 16 Stefan Schweizer (RETIRED) gentoo-dev 2006-06-01 11:30:36 UTC
please test
Comment 17 Dan Ost 2006-06-02 06:00:34 UTC
The new ebuild (-r4) fixed the problem for me. Thanks.