Your message dated Tue, 30 Nov 2021 11:33:55 +
with message-id
and subject line Bug#99: fixed in ghostscript 9.55.0~dfsg-3
has caused the Debian Bug report #99,
regarding X-device: BadDrawable (invalid Pixmap or Window parameter)
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
99: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=99
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: ghostscript-x
Version: 9.54.0~dfsg-5
Severity: normal
Tags: patch
Dear Maintainer,
upstream commit 033ed8bf196b1cddd681a9b32d9398bf6bc02d24 (included in
debian/9.54.0~dfsg-1) introduced a call to XFreePixmap in gdev_x_close.
This might free a pixmap that was created by ghostview as a backing
pixmap and might still be used by ghostview for further drawing.
I'm not entirely sure which files causes the gs process to close the device
early, but with some files it does and gv actions like reloading/zooming
attempt to draw on the already freed pixmap and cause gv to crash with
X Error of failed request: BadPixmap (invalid Pixmap parameter).
Especially the -watch option of gv is broken if it is used to watch a
postscript file that's in development. Any postscript error will cause the
device to free the backing pixmap and ghostview will crash even if the
error in the file gets fixed. It was possible to do that in the past (the
backing pixmap was reused with a new gs process).
It's possible to reproduce the issue with a small example file like this:
newpath
100 200 moveto
200 250 lineto
100 300 lineto
2 setlinewidth
stroke
Please note that there is no "showpage", which seems to cause the invocation
of gdev_x_close (with showpage, the gs process keeps running). With such a
file gv will crash when trying to zoom / reload etc. (ghostview needs to run
with backing pixmap enabled (-pixmap), the -nopixmap option will of course
work around the bug).
I attached a simple patch that checks if the pixmap is created by ghostview
(xdev->ghostview is set) and only frees it if that's not the case.
Cheers,
Florian
-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (550, 'testing'), (210, 'unstable'), (1, 'experimental')
Architecture: i386 (x86_64)
Kernel: Linux 4.14.151-64+ (SMP w/96 CPU threads; PREEMPT)
Kernel taint flags: TAINT_DIE
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages ghostscript-x depends on:
ii ghostscript 9.54.0~dfsg-5bfw3
ii libc62.32-4bfw1
ii libx11-6 2:1.7.2-2+b1
ii libxt6 1:1.2.0-1
ghostscript-x recommends no packages.
ghostscript-x suggests no packages.
-- no debconf information
>From c924286b5844456605eb8a7e449cf66e1e220a76 Mon Sep 17 00:00:00 2001
From: Florian Lindemann
Date: Tue, 9 Nov 2021 14:56:49 +0100
Subject: [PATCH] patch
---
devices/gdevxini.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/devices/gdevxini.c b/devices/gdevxini.c
index 82032cd6..a2f96240 100644
--- a/devices/gdevxini.c
+++ b/devices/gdevxini.c
@@ -960,7 +960,7 @@ gdev_x_close(gx_device_X *xdev)
xdev->gc = NULL;
}
if (xdev->dpy && xdev->bpixmap != (Pixmap)0) {
-XFreePixmap(xdev->dpy, xdev->bpixmap);
+if (!xdev->ghostview) XFreePixmap(xdev->dpy, xdev->bpixmap);
xdev->bpixmap = (Pixmap)0;
xdev->dest = (Pixmap)0;
}
--
2.33.0
--- End Message ---
--- Begin Message ---
Source: ghostscript
Source-Version: 9.55.0~dfsg-3
Done: Jonas Smedegaard
We believe that the bug you reported is fixed in the latest version of
ghostscript, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 998...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Jonas Smedegaard (supplier of updated ghostscript package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
Format: 1.8
Date: Tue, 30 Nov 2021 15:46:45 +0100
Source: ghostscript
Architecture: source
Version: 9.55.0~dfsg-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Printing Team
Changed-By: Jonas Smedegaard
Closes: 99
Changes:
ghostscript