Bug#633769: python-gtk2: crashes as soon as a call to set_events is done
Fabien Givors (Debian packages)
f+debian at chezlefab.net
Sun Sep 30 11:59:15 UTC 2012
Hi,
Apparently, this is not a bug.
- It's not specific to this package since it can be reproduced with the
following C code:
-------------------------------------------------------
#include <gtk/gtk.h>
#include <gdk/gdk.h>
int main(int argc, char* argv[])
{
gtk_init(&argc, &argv);
GdkWindow* rootwin = gdk_get_default_root_window();
gdk_window_set_events(rootwin, GDK_BUTTON_PRESS_MASK);
gtk_main();
return 0;
}
-------------------------------------------------------
gcc -o test script.c -g $(pkg-config --libs gtk+-2.0 --cflags)
./test
The program 'test' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAccess (attempt to access private resource denied)'.
(Details: serial 111 error_code 10 request_code 2 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
- This happens when the event we try to grab is already listened by a
program (here, the window manager).
The following raises no problem:
Xephyr :3 &
DISPLAY=:3 ./test
But the bug is reproduced with
Xephyr :3 &
DISPLAY=:3 awesome &
DISPLAY=:3 ./test
Where test is either the compiled C program or the following python code:
-------------------------------------------------------
#!/usr/bin/env python
import gtk
rootwin = gtk.gdk.get_default_root_window()
rootwin.set_events(gtk.gdk.BUTTON_PRESS_MASK)
gtk.main()
-------------------------------------------------------
Maybe this bug should be marked as done since it appears to be normal
behaviour for gtk2 [1].
[1] http://comments.gmane.org/gmane.comp.gnome.lib.gtk%2B.devel.apps/5895
More information about the pkg-gnome-maintainers
mailing list