Your message dated Sat, 27 Aug 2011 09:03:13 +0000
with message-id <[email protected]>
and subject line Bug#639328: fixed in gtk-vector-screenshot 0.3.1-1
has caused the Debian Bug report #639328,
regarding [gtk-vector-screenshot] pdfscreenshot_event_filter() may cause 
BadWindow X-Protocol errors.
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 [email protected]
immediately.)


-- 
639328: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=639328
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gtk-vector-screenshot
Version: 0.3-1
Severity: important
Tags: patch

Everytime I open UI (glade) file in anjuta and start dragging a signal from any widget properties panel to the source code, in order to create signal handler, anjuta crashes with BadWindow X-Protocol error.

Sometimes it crashes another application too, i.e. gnome-terminal or gnome-shell.

I experience BadWindow errors from other apps too, but I didn't check if it comes from gtk-vector-screenshot (i.e. gnome-screensaver, gnome-shell).

Debug logs for anjuta attached. The window with id 23070566 for which is XSetTextProperty() from pdfscreenshot_event_filter() called did not exist before crash (dragging start) and did not exists after (checked with xwininfo -int -tree -root)

Patch installing custom error handler ingoring BadWindow errors is attached.

Cheers,
Petr Gajdůšek



--- System information. ---
Architecture: i386
Kernel:       Linux 3.0.0-1-686-pae

Debian Release: wheezy/sid
  990 unstable        ftp.cz.debian.org
  500 experimental    ftp.cz.debian.org

--- Package information. ---
Depends                    (Version) | Installed
====================================-+-==============
libatk1.0-0              (>= 1.12.4) | 2.0.1-2
libc6                  (>= 2.3.6-6~) | 2.13-18
libcairo-gobject2        (>= 1.10.0) | 1.10.2-6.1
libcairo2                 (>= 1.2.4) | 1.10.2-6.1
libfontconfig1            (>= 2.8.0) | 2.8.0-3
libfreetype6              (>= 2.2.1) | 2.4.6-2
libgdk-pixbuf2.0-0       (>= 2.22.0) | 2.23.5-3
libglib2.0-0             (>= 2.16.0) | 2.28.6-2
libgtk-3-0                (>= 3.0.0) | 3.0.12-1
libgtk2.0-0               (>= 2.8.0) | 2.24.5-4
libpango1.0-0            (>= 1.14.0) | 1.28.4-3
libx11-6                             | 2:1.4.4-1


Package's Recommends field is empty.

Package's Suggests field is empty.

Attachment: anjuta.debug.log.gz
Description: GNU Zip compressed data

diff --git a/gtk-vector-screenshot.c b/gtk-vector-screenshot.c
index fd525c8..3106f2c 100644
--- a/gtk-vector-screenshot.c
+++ b/gtk-vector-screenshot.c
@@ -20,6 +20,7 @@
 // For strchrnul
 #define _GNU_SOURCE
 
+#include <stdlib.h>
 #include <math.h>
 #include <string.h>
 #include <libgen.h>
@@ -290,6 +291,18 @@ pdfscreenshot_window_create()
     gtk_widget_show_all(GTK_WIDGET(window));
 }
 
+/* 
+ * Ignore all BadWindow errors.
+ */
+int
+silent_error_handler (Display *display, XErrorEvent *error) 
+{
+    if (error->error_code != BadWindow) {
+        exit (error->error_code);
+    }
+    return 0;
+}
+
 GdkFilterReturn
 pdfscreenshot_event_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data)
 {
@@ -299,10 +312,13 @@ pdfscreenshot_event_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data)
         XTextProperty supported;
         XStringListToTextProperty(&supported_str, 1, &supported);
 
+        XErrorHandler old_handler = (XErrorHandler) 0 ;
+        old_handler = XSetErrorHandler (silent_error_handler);
         XSetTextProperty(ev->xmap.display,
             ev->xmap.window,
             &supported,
             gdk_x11_atom_to_xatom(pdfscreenshot_atom));
+        (void) XSetErrorHandler (old_handler);
     } else if (ev->type == ClientMessage &&
             ev->xclient.message_type == gdk_x11_atom_to_xatom(pdfscreenshot_atom)) {
         if (event->any.window != NULL) {

--- End Message ---
--- Begin Message ---
Source: gtk-vector-screenshot
Source-Version: 0.3.1-1

We believe that the bug you reported is fixed in the latest version of
gtk-vector-screenshot, which is due to be installed in the Debian FTP archive:

gtk-vector-screenshot_0.3.1-1.debian.tar.gz
  to main/g/gtk-vector-screenshot/gtk-vector-screenshot_0.3.1-1.debian.tar.gz
gtk-vector-screenshot_0.3.1-1.dsc
  to main/g/gtk-vector-screenshot/gtk-vector-screenshot_0.3.1-1.dsc
gtk-vector-screenshot_0.3.1-1_amd64.deb
  to main/g/gtk-vector-screenshot/gtk-vector-screenshot_0.3.1-1_amd64.deb
gtk-vector-screenshot_0.3.1.orig.tar.gz
  to main/g/gtk-vector-screenshot/gtk-vector-screenshot_0.3.1.orig.tar.gz



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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joachim Breitner <[email protected]> (supplier of updated 
gtk-vector-screenshot 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 [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 27 Aug 2011 10:58:13 +0200
Source: gtk-vector-screenshot
Binary: gtk-vector-screenshot
Architecture: source amd64
Version: 0.3.1-1
Distribution: unstable
Urgency: low
Maintainer: Joachim Breitner <[email protected]>
Changed-By: Joachim Breitner <[email protected]>
Description: 
 gtk-vector-screenshot - takes screenshots of applications as PDF or SVG files
Closes: 639328
Changes: 
 gtk-vector-screenshot (0.3.1-1) unstable; urgency=low
 .
   * New upstream version
     + Prevents BadWindow X-Protocol errors in random application. Thanks to
       Petr Gajdůšek for reporting, analyzing and fixing the bug.  (Closes:
       #639328)
Checksums-Sha1: 
 07fbecf2e71f78348a14db37edb3ac0acdc27721 1323 gtk-vector-screenshot_0.3.1-1.dsc
 6d4b0dfe1c3ef527fc6a7dc1e76c759b45531394 319116 
gtk-vector-screenshot_0.3.1.orig.tar.gz
 06953df0ec38dcc95d2928985c0994cb2f93a13b 2493 
gtk-vector-screenshot_0.3.1-1.debian.tar.gz
 25f0463a23ca0cb3f0afe4ac7dbfc5e130f43c44 22082 
gtk-vector-screenshot_0.3.1-1_amd64.deb
Checksums-Sha256: 
 e38e2f8761d8d9f4746861e86c9d7708334aa0a10dc6d62b0d010062266d2a84 1323 
gtk-vector-screenshot_0.3.1-1.dsc
 a8cacfbbbb2fbbf2e61f028a6ebf2e5943476bbef36e3f1f416e5ccc77ff7437 319116 
gtk-vector-screenshot_0.3.1.orig.tar.gz
 5a759584c676ff9a61a42c2799d3a7b5b9d5eaa2ceed6059eb8e3bf2a4deed4f 2493 
gtk-vector-screenshot_0.3.1-1.debian.tar.gz
 83fb0b1e4b4ff8e975934a9e8c10878bff46f81cffb98f0bda4489df292b6f64 22082 
gtk-vector-screenshot_0.3.1-1_amd64.deb
Files: 
 b5a637e2981dc68d1cf1ad067419db28 1323 gnome optional 
gtk-vector-screenshot_0.3.1-1.dsc
 ac72af358586d6b2436e3892a8540a22 319116 gnome optional 
gtk-vector-screenshot_0.3.1.orig.tar.gz
 e4f5247cca89fd6fd09f88cefdaf2067 2493 gnome optional 
gtk-vector-screenshot_0.3.1-1.debian.tar.gz
 edf09e5c8efcd6c603e0e22e71c71e89 22082 gnome optional 
gtk-vector-screenshot_0.3.1-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk5YseoACgkQ9ijrk0dDIGx16QCguk2GlokY3vQvDzAP7ENV/9cf
9XoAoMyI+tAlndYKQDY0+cdv2fX1J225
=kXWY
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to