ok, thank you Matthias.

dave

On 6/28/06, Matthias Clasen <[EMAIL PROTECTED]> wrote:
On 6/28/06, Dave Foster <[EMAIL PROTECTED] > wrote:
> Hi,
>
> 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) ...
> gdk_display_close(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 ([EMAIL PROTECTED], [EMAIL PROTECTED],
>     mode=SetBG::SET_SCALE, [EMAIL PROTECTED]) 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
> do?

gdk_display_close has been fixed in GTK+ 2.10, which should  be
available soon.

_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to