[gtkmm] weird segfault
- From: "Rui Lopes" <rui ruilopes com>
- To: <gtkmm-list gnome org>
- Subject: [gtkmm] weird segfault
- Date: Sun, 26 Jan 2003 22:24:53 -0000 (WET)
Hello all,
I have this code,
int main(int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
Gtk::Window window;
Glib::RefPtr<Gdk::Display> refDisplay = Gdk::Display::get_default();
GdkDisplay *pGdkDisplay = refDisplay->gobj();
Gtk::Main::run(window);
return 0;
}
but it segfauls; here is the backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x405b4a70 in _gdk_windowing_set_default_display () from
/usr/lib/libgdk-x11-2.0.so.0
(gdb) bt
#0 0x405b4a70 in _gdk_windowing_set_default_display () from
/usr/lib/libgdk-x11-2.0.so.0
#1 0x4059d307 in gdk_display_manager_set_default_display () from
/usr/lib/libgdk-x11-2.0.so.0
#2 0x40595892 in gdk_display_dispose () from /usr/lib/libgdk-x11-2.0.so.0
#3 0x405b480d in gdk_display_x11_dispose () from
/usr/lib/libgdk-x11-2.0.so.0
#4 0x40688bdd in g_object_last_unref () from /usr/lib/libgobject-2.0.so.0
#5 0x4055d8c2 in Glib::ObjectBase::unreference() const () from
/usr/lib/libglibmm-2.0.so.1
#6 0x080496e0 in ~RefPtr (this=0xbffff980) at
/usr/include/gtkmm-2.0/glibmm/refptr.h:176
#7 0x080495a8 in main (argc=1, argv=0xbffffa34) at wininfo.cpp:114
#8 0x40830e34 in __libc_start_main () from /lib/libc.so.6
(gdb)
note: line #6 is the destructor of RefPtr.
i'm doing something wrong?
TIA,
Rui Lopes
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]