Re: gdk_display_close segfault?
- From: Michael Natterer <mitch gimp org>
- To: Dave Foster <dave foster gmail com>
- Cc: gtk-devel-list gnome org
- Subject: Re: gdk_display_close segfault?
- Date: Wed, 28 Jun 2006 15:01:39 +0200
you can stop debugging right away. Display closing *only* works
in GTK+ 2.9.x (upcoming 2.10). No way of making this work in any
On Wed, 2006-06-28 at 01:01 -0400, Dave Foster wrote:
> I've been trying to write a small section of code in my program which
> makes a second connection to the X display, using gtkmm.. I kept having
> problems, after rewriting it about 5 or 6 times, I tried writing it in
> straight gdk, and STILL got the problems.
> I seem to get a segfault whenever I call gdk_display_close(). Here is a
> rediculously simple example that gives the problem:
> Glib::ustring disp = ":0.0";
> GdkDisplay* gdisp = gdk_display_open(disp.c_str());
> if (!gdisp) ...
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1224202560 (LWP 5689)]
> 0xb7b413d0 in gdk_display_x11_dispose () from /usr/lib/libgdk-x11-2.0.so.0
> (gdb) bt
> #0 0xb7b413d0 in gdk_display_x11_dispose () from /usr/lib/libgdk-x11-2.0.so.0
> #1 0xb7a11f2b in g_object_unref () from /usr/lib/libgobject-2.0.so.0
> #2 0xb7b20c04 in gdk_display_close () from /usr/lib/libgdk-x11-2.0.so.0
> #3 0x080571d5 in SetBG::set_bg (disp= 0xbfe1b2b0, file= 0xbfe1b2ac,
> mode=SetBG::SET_SCALE, bgcolor= 0xbfe1b2a8) at SetBG.cc:67
> The display is opening fine. I'm running:
> gtk: 2.8.17-1
> glib: 2.10.2-1
> (hmm, didn't notice that before,t he 2.8 vs 2.10 thing, could that be it?)
> Anyway, I've spent all night trying to debug this and weeks trying to
> sort this problem out in my program. What is up with this, what can I
> thanks all.
> gtk-devel-list mailing list
> gtk-devel-list gnome org
] [Thread Prev