Re: gdk_display_close segfault?
- From: "Matthias Clasen" <matthias clasen gmail com>
- To: "Dave Foster" <dave foster gmail com>
- Cc: gtk-devel-list gnome org
- Subject: Re: gdk_display_close segfault?
- Date: Wed, 28 Jun 2006 09:55:43 -0400
On 6/28/06, Dave Foster <dave foster gmail com> 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
#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:
(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
gdk_display_close has been fixed in GTK+ 2.10, which should be
] [Thread Prev