[gtkmm] treeview get_selected_rows crash



using gtkmm-2.2.5, i have a segment of code, intended to scroll a treeview to a selected row:

TreeModel::Children rows = m_windows_store->children();
for(TreeModel::iterator i = rows.begin();
    rows.end() != i;
    ++i) {
  if((*i)[m_windows_record.m_record_column] == window_record) {
    Glib::RefPtr<TreeSelection> selection = m_tree_view->get_selection();
    selection->select(i);
    list<TreeModel::Path> paths = selection->get_selected_rows();
    list<TreeModel::Path>::iterator path = paths.begin();
    m_tree_view->scroll_to_row(*path);
    return;
  }
}

which is in a function which is connected to a signal emitted when a window receives focus in. on solaris x86, this seems to function correctly, but on linux x86, it crashed with the stack dump below. i suspect i'm using an invalid smartpointer or iterator, but i can't find my glitch. can anyone see what i'm doing wrong?

thaks!
-tim


#0  0x405b89d1 in gtk_tree_selection_get_selected_rows ()
   from /usr/lib/libgtk-x11-2.0.so.0
#1  0x40302086 in Gtk::TreeSelection::get_selected_rows() const ()
   from /usr/lib/libgtkmm-2.0.so.1
#2 0x081305a2 in ClosedWindowsManager_c::on_WindowFocused(WindowRecord_c*) (
    this=0x8466900, window_record=0x832fc28) at closedWindowsManager.C:211
#3 0x08124c17 in SigC::ObjectSlot1_<void, WindowRecord_c*, ClosedWindowsManager_c>::proxy(WindowRecord_c* const&, void*) (p1= 0x85d17a4, s=0x85d1890)
    at object_slot.h:100
#4 0x08124ce9 in SigC::AdaptorBindSlot0_1_<void, WindowRecord_c*>::proxy(void*) (data=0x85d1780) at bind.h:153
#5  0x08192bf0 in SigC::Signal0<void, SigC::Marshal<void> >::emit_(void*) (
    data=0x85d19c0) at signal.h:625
#6  0x0811f3c5 in SigC::Signal0<void, SigC::Marshal<void> >::operator()() (
    this=0x8363d88) at signal.h:594
#7  0x08119348 in ArbitrageMediator_c::on_FocusIn(_GdkEventFocus*) (
    this=0x8363d48, event=0x85dcfc4) at arbitrageMediator.C:1589
#8 0x08122675 in SigC::ObjectSlot1_<bool, _GdkEventFocus*, ArbitrageMediator_c>::proxy(_GdkEventFocus* const&, void*) (p1= 0xbffff054, s=0x8477348)
    at object_slot.h:100
#9 0x40316a7c in (anonymous namespace)::Widget_signal_focus_in_event_callback(_GtkWidget*, _GdkEventFocus*, void*) () from /usr/lib/libgtkmm-2.0.so.1
#10 0x40503a8f in _gtk_marshal_BOOLEAN__BOXED ()
#11 0x4081aef7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#12 0x4082d826 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0
#13 0x4082c7ad in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#14 0x4082cbe4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#15 0x405e8d6b in gtk_widget_event_internal ()
   from /usr/lib/libgtk-x11-2.0.so.0
#16 0x40502620 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#17 0x40733e25 in gdk_event_dispatch () from /usr/lib/libgdk-x11-2.0.so.0
#18 0x40870d60 in g_main_dispatch () from /usr/lib/libglib-2.0.so.0
#19 0x40871df8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#20 0x4087210d in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#21 0x4087282f in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#22 0x40501dbf in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#23 0x402bc489 in Gtk::Main::run_impl() () from /usr/lib/libgtkmm-2.0.so.1
#24 0x402bc234 in Gtk::Main::run() () from /usr/lib/libgtkmm-2.0.so.1
#25 0x081403fd in EventLoop_c::Run() (this=0x831a048) at eventLoop.C:34
#26 0x081486b6 in main (argc=1, argv=0xbffff6e4) at main.C:105
#27 0x40b7a746 in __libc_start_main () from /lib/libc.so.6




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