[Gtk-sharp-list] Unhandled Exception: System.Exception: Unknown type

Adam Tauno Williams adam at morrison-ind.com
Fri May 4 16:34:03 EDT 2007


On Thu, 2007-05-03 at 18:58 -0400, Andy York wrote:
> It sounds like you have an unknown data type loading into the treeview 
> like the it was expecting an image and got a string. Is it possible it 
> is loading incorrect data?

I'm becoming more convinced the bug isn't in my code.

I've changed the method to get the select object to:
-----------------------------------------
protected Task IterTask(Gtk.TreeModel _model, Gtk.TreeIter _iter)
  object o;
  o = _model.GetValue(_iter, 0);
  if (o == null) 
  {
    Console.WriteLine("Object from iter is null");
    return null;
  }
  if (o is Whitemice.ZOGI.Task)
    return (o as Whitemice.ZOGI.Task);
  Console.WriteLine("Object from iter is a {0}",
    o.GetType().ToString());
  return null;
}
-------------------------------------
And it crashes with the same "GLib.Value.get_Val ()" and silence from my
code;  like the crash is inside "_model.GetValue(_iter, 0);"

All the objects in the ListStore are the same type.

> Adam Tauno Williams wrote
> > Anyone got any clues given the following stack trace:
> > ----------------------------------------------------------------
> > (Whitemice.Consonance.exe:6201): Gtk-CRITICAL **:
> > gtk_tree_model_filter_get_value: assertion `GTK_TREE_MODEL_FILTER
> > (model)->priv->stamp == iter->stamp' failed
> >
> > Unhandled Exception: System.Exception: Unknown type 
> > at GLib.Value.get_Val () <0x006d0>
> > at Gtk.TreeModelFilter.GetValue (Gtk.TreeIter,int) <0x00068>
> > at Whitemice.ZOGI.GtkWidgets.TaskLists.IterTask
> > (Gtk.TreeModel,Gtk.TreeIter) <0x00035>
> > at Whitemice.ZOGI.GtkWidgets.TaskLists.RenderEnd
> > (Gtk.TreeViewColumn,Gtk.CellRenderer,Gtk.TreeModel,Gtk.TreeIter)
> > <0x00039>
> > at (wrapper delegate-invoke)
> > System.MulticastDelegate.invoke_void_TreeViewColumn_CellRenderer_TreeModel_TreeIter (Gtk.TreeViewColumn,Gtk.CellRenderer,Gtk.TreeModel,Gtk.TreeIter) <0x0005f>
> > at GtkSharp.TreeCellDataFuncWrapper.NativeCallback
> > (intptr,intptr,intptr,Gtk.TreeIter&,intptr) <0x00130>
> > at (wrapper native-to-managed)
> > GtkSharp.TreeCellDataFuncWrapper.NativeCallback
> > (intptr,intptr,intptr,Gtk.TreeIter&,intptr) <0x0003a>
> > in (unmanaged) 0xb6fe70e0
> > at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004>
> > at Gtk.Application.Run () <0x00007>
> > at Whitemice.Consonance.Consonance.Main (string[]) <0x000c3>
> > -----------------------------------------------------------------
> >
> > This TreeView occasionally dies in one of the rendering functions, not
> > always the same one, loading the exact same data.  Most of the time it
> > works, maybe 4 out of 5.
> >
> > The "Unhandled Exception: System.Exception: Unknown type" doesn't mean
> > much to me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070504/5c74879f/attachment.bin 


More information about the Gtk-sharp-list mailing list