Re: gdk_display_close problems ...



> Hi there,
> 
> 	So - I've been debugging an embarassing set of problems with
> gdk_display_close. I'm assuming that in gtk+ for some reason we let a
> number of GdkDisplay refs float around the place so that the display is
> never finalized, and we only dispose it once (with the 'closed' guard).
> 
> 	However - quite a simple program will provoke a SEGV eg.
> 
> #include <gtk/gtk.h>
> 
> int
> main (int argc, char **argv)
> {
> 	GdkDisplay *display;
> 	gtk_init (&argc, &argv);
> 	display = gdk_display_open (":0.0");
> 	gdk_display_close (display);
> 	return 0;	
> } 
> 
> 	Which approximate what OO.o is doing, although in fact we create a
> GtkWindow and tear it down as well; my attached patch fixes a number of
> obvious problems, however I'm slightly stumped wrt. GdkScreenX11.
> gdk_screen_init calls _gdk_windowing_window_init (screen); which sets up
> root_window.
> 
> 	The gdk_screen_dispose NULL'd the pointer that then gdk_screen_finalize
> tried to unref - causing noise. Initially I binned the NULLing of it in
> gdk_screen_dispose and got:
> 
> (soffice.bin:20615): Gdk-WARNING **: losing last reference to
> undestroyed window
> Gdk-ERROR **: attempted to destroy root window
> 
> 	What was intended here ?
> 
> 	And/or am I doing something stupid / was this code tested ?
> 

Closing displays doesn't work. Nobody got around to fixing it yet. 
See http://bugzilla.gnome.org/show_bug.cgi?id=85715

Regards, Matthias

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]