Re: libglademm core dumps with older glade files



On Thu, 2005-02-24 at 19:09 +0100, Murray Cumming wrote:
> On Thu, 2005-02-24 at 13:03 -0500, Carl Nygard wrote:
> > On Thu, 2005-02-24 at 11:06 +0100, Murray Cumming wrote:
> > 
> > Where do I use --g-fatal-warnings?
> 
> In gdb, use "run --g-fatal-warnings" instead of "run". It's a command-
> line argument that all GTK+-based applications can take.
> 

Yah, silly me.  tried that first and misread a cmdline error report.

Ok, I'm not sure how this might be reproduced in a test program, so I'll
describe what's going on first, in case anyone recognizes something.
Valgrind output to follow at the end, there's some complaining about
mutex ownership problems, prior to the error.


Basically, I read in a glade file, call show_all() on the main window,
and then do the following in relation to setting up some colors.  

    Glib::RefPtr<Gdk::Visual> best = 
//         Gdk::Visual::get_best(24, Gdk::VISUAL_TRUE_COLOR);
//         Gdk::Visual::get_best(Gdk::VISUAL_TRUE_COLOR);
        _mw->get_screen()->get_system_visual();

    Glib::RefPtr<Gdk::Screen> scr = best->get_screen();
    _cmap = scr->get_default_colormap();

It seems to dump when the RefPtr dtor for Gdk::Screen gets called as the
function goes out of scope.

Printing out the values of the Screen ptr looks reasonable.

I'll see if this stuff can be condensed, in the meantime, anyone have
any ideas?


Valgrind:

  GtkGUI::GtkWindowMgr::_InitMainWin: ENTRY...
==9223== Reading syms from /usr/lib/gtk-2.0/2.4.0/engines/libbluecurve.so (0x37544000)
==9223==    object doesn't have a symbol table
==9223==    object doesn't have any debug info
==9223== pthread_mutex_lock/trylock: mutex has invalid owner
==9223==    at 0x34190AF7: pthread_mutex_lock (vg_libpthread.c:1324)
==9223==    by 0x34195FD1: _IO_flockfile (vg_libpthread.c:3395)
==9223==    by 0xB47793: pango_read_line (in /usr/lib/libpango-1.0.so.0.600.0)
==9223==    by 0xB3691F: pango_find_map (in /usr/lib/libpango-1.0.so.0.600.0)
==9223==    by 0xB3A361: (within /usr/lib/libpango-1.0.so.0.600.0)
==9223==    by 0xB3A959: pango_itemize_with_base_dir (in /usr/lib/libpango-1.0.so.0.600.0)
==9223==    by 0xB4175B: (within /usr/lib/libpango-1.0.so.0.600.0)
==9223==    by 0xB424F6: (within /usr/lib/libpango-1.0.so.0.600.0)
==9223==    by 0x1F957A: (within /usr/lib/libgtk-x11-2.0.so.0.400.14)
==9223==    by 0x1466DE: (within /usr/lib/libgtk-x11-2.0.so.0.400.14)
==9223==    by 0xAD1DCC: g_cclosure_marshal_VOID__BOXED (in /usr/lib/libgobject-2.0.so.0.400.8)
==9223==    by 0xAB96B1: (within /usr/lib/libgobject-2.0.so.0.400.8)
==9223== Reading syms from /usr/lib/pango/1.4.0/modules/pango-basic-fc.so (0x37552000)
==9223==    object doesn't have a symbol table
==9223==    object doesn't have any debug info
==9223== Reading syms from /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-png.so (0x37558000)
==9223==    object doesn't have a symbol table
==9223==    object doesn't have any debug info
==9223==
==9223== pthread_mutex_lock/trylock: mutex has invalid owner
==9223==    at 0x34190AF7: pthread_mutex_lock (vg_libpthread.c:1324)
==9223==    by 0x34195FD1: _IO_flockfile (vg_libpthread.c:3395)
==9223==    by 0xB47793: pango_read_line (in /usr/lib/libpango-1.0.so.0.600.0)
==9223==    by 0x1F03F4: (within /usr/lib/libgtk-x11-2.0.so.0.400.14)
==9223==    by 0x1F0A6F: (within /usr/lib/libgtk-x11-2.0.so.0.400.14)
==9223==    by 0x1F0FEC: (within /usr/lib/libgtk-x11-2.0.so.0.400.14)
==9223==    by 0x1F1023: (within /usr/lib/libgtk-x11-2.0.so.0.400.14)
==9223==    by 0x1EEBD9: gtk_im_context_set_client_window (in /usr/lib/libgtk-x11-2.0.so.0.400.14)
==9223==    by 0x1AC7ED: (within /usr/lib/libgtk-x11-2.0.so.0.400.14)
==9223==    by 0x34396BC7: Gtk::Widget_Class::realize_callback(_GtkWidget*) (in /usr/lib/libgtkmm-2.4.so.1.0.7)
==9223==    by 0xAD13AD: g_cclosure_marshal_VOID__VOID (in /usr/lib/libgobject-2.0.so.0.400.8)
==9223==    by 0xAB96B1: (within /usr/lib/libgobject-2.0.so.0.400.8)
==9223==
==9223== pthread_mutex_lock/trylock: mutex has invalid owner
==9223==    at 0x34190AF7: pthread_mutex_lock (vg_libpthread.c:1324)
==9223==    by 0x34195FD1: _IO_flockfile (vg_libpthread.c:3395)
==9223==    by 0xB47793: pango_read_line (in /usr/lib/libpango-1.0.so.0.600.0)
==9223==    by 0x1F044E: (within /usr/lib/libgtk-x11-2.0.so.0.400.14)
==9223==    by 0x1F0A6F: (within /usr/lib/libgtk-x11-2.0.so.0.400.14)
==9223==    by 0x1F0FEC: (within /usr/lib/libgtk-x11-2.0.so.0.400.14)
==9223==    by 0x1F1023: (within /usr/lib/libgtk-x11-2.0.so.0.400.14)
==9223==    by 0x1EEBD9: gtk_im_context_set_client_window (in /usr/lib/libgtk-x11-2.0.so.0.400.14)
==9223==    by 0x1AC7ED: (within /usr/lib/libgtk-x11-2.0.so.0.400.14)
==9223==    by 0x34396BC7: Gtk::Widget_Class::realize_callback(_GtkWidget*) (in /usr/lib/libgtkmm-2.4.so.1.0.7)
==9223==    by 0xAD13AD: g_cclosure_marshal_VOID__VOID (in /usr/lib/libgobject-2.0.so.0.400.8)
==9223==    by 0xAB96B1: (within /usr/lib/libgobject-2.0.so.0.400.8)
    GtkGUI::GtkWindowMgr::_FinishInit: ENTRY...
      GtkGUI::GtkWindowMgr::_InitColor: ENTRY...
        Got visual: 0x36a5d1e0
        Got screen: 0x36aea540
        Got cmap: 0x36a5d338
inner
middle

GLib-GObject-CRITICAL **: file gobject.c: line 1579 (g_object_unref): assertion `G_IS_OBJECT (object)' failed
aborting...
==9223== TRANSLATE: 0x5E8900 redirected to 0x341449A4
==9223==
==9223== Process terminating with default action of signal 6 (SIGABRT): dumping core
==9223==    at 0x5E8DF6: kill (in /lib/tls/libc-2.3.4.so)
==9223==    by 0x5EA318: abort (in /lib/tls/libc-2.3.4.so)
==9223==    by 0x96BF7D: g_logv (in /usr/lib/libglib-2.0.so.0.400.8)
==9223==    by 0x96BFAF: g_log (in /usr/lib/libglib-2.0.so.0.400.8)
==9223==    by 0xABB884: g_object_unref (in /usr/lib/libgobject-2.0.so.0.400.8)
==9223==    by 0xBD0A0E: (within /usr/lib/libgdk-x11-2.0.so.0.400.14)
==9223==    by 0xABB8DB: g_object_unref (in /usr/lib/libgobject-2.0.so.0.400.8)
==9223==    by 0x345125BD: Glib::ObjectBase::unreference() const (in /usr/lib/libglibmm-2.4.so.1.0.5)
==9223==    by 0x862A22C: Glib::RefPtr<Gdk::Screen>::~RefPtr() (refptr.h:169)
==9223==    by 0x861ECA2: GtkWindowMgr::_InitColor() (gtkwindowmgr.cxx:1345)
==9223==    by 0x8622D8C: GtkWindowMgr::_FinishInit() (gtkwindowmgr.cxx:2221)
==9223==    by 0x8616D43: GtkWindowMgr::_InitMainWin() (gtkwindowmgr.cxx:719)

valgrind: vg_signals.c:1660 (make_coredump): Assertion `vgPlain_lseek(core_fd, 0, 1) == phdrs[i].p_offset' failed.
==9223==    at 0xB002BFEF: vgPlain_skin_assert_fail (vg_mylibc.c:1137)
==9223==    by 0xB002BFEE: assert_fail (vg_mylibc.c:1133)
==9223==    by 0xB002C02C: vgPlain_core_assert_fail (vg_mylibc.c:1144)
==9223==    by 0xB003186E: make_coredump (vg_signals.c:1660)
==9223==    by 0xB0031B79: vg_default_action (vg_signals.c:1803)
==9223==    by 0xB0031D94: vgPlain_deliver_signal (vg_signals.c:1912)
==9223==    by 0xB002F00E: sys_wait_results (vg_proxylwp.c:1165)
==9223==    by 0xB002F24A: vgPlain_proxy_waitsig (vg_proxylwp.c:1272)
==9223==    by 0xB0042E76: after_kill (vg_syscalls.c:4011)
==9223==    by 0xB00471C4: vgPlain_post_syscall (vg_syscalls.c:6339)
==9223==    by 0xB000D3BC: sched_do_syscall (vg_scheduler.c:730)
==9223==    by 0xB000DA51: do_scheduler (vg_scheduler.c:1136)

sched status:

Thread 1: status = Runnable, associated_mx = 0x0, associated_cv = 0x0
==9223==    at 0x9C5FF042: ???
==9223==    by 0x5EA318: abort (in /lib/tls/libc-2.3.4.so)
==9223==    by 0x96BF7D: g_logv (in /usr/lib/libglib-2.0.so.0.400.8)
==9223==    by 0x96BFAF: g_log (in /usr/lib/libglib-2.0.so.0.400.8)
==9223==    by 0xABB884: g_object_unref (in /usr/lib/libgobject-2.0.so.0.400.8)
==9223==    by 0xBD0A0E: (within /usr/lib/libgdk-x11-2.0.so.0.400.14)
==9223==    by 0xABB8DB: g_object_unref (in /usr/lib/libgobject-2.0.so.0.400.8)
==9223==    by 0x345125BD: Glib::ObjectBase::unreference() const (in /usr/lib/libglibmm-2.4.so.1.0.5)
==9223==    by 0x862A22C: Glib::RefPtr<Gdk::Screen>::~RefPtr() (refptr.h:169)
==9223==    by 0x861ECA2: GtkWindowMgr::_InitColor() (gtkwindowmgr.cxx:1345)
==9223==    by 0x8622D8C: GtkWindowMgr::_FinishInit() (gtkwindowmgr.cxx:2221)
==9223==    by 0x8616D43: GtkWindowMgr::_InitMainWin() (gtkwindowmgr.cxx:719)


-- 
Carl Nygard <cjnygard fast net>




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