Exception when clicking on the tomboy icon after upgrading to gtk+ 2.9 -- Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Cannot cast from source type to destination type. in <0x00055> Gtk.Widget:get_GdkWindow () in <0x00049> Tomboy.GuiUtils:GetMenuPosition (Gtk.Menu,int&,int&,bool&) in <0x00063> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_Menu_int&_int&_bool& (Gtk.Menu,int&,int&,bool&) in <0x00068> GtkSharp.MenuPositionFuncWrapper:NativeCallback (intptr,int&,int&,bool&,intptr) in <0x00045> (wrapper native-to-managed) GtkSharp.MenuPositionFuncWrapper:NativeCallback (intptr,int&,int&,bool&,intptr) in (unmanaged) 0x1069963 in <0x00004> (wrapper managed-to-native) Gtk.Menu:gtk_menu_popup (intptr,intptr,intptr,GtkSharp.MenuPositionFuncNative,intptr,uint,uint) in <0x000de> Gtk.Menu:Popup (Gtk.Widget,Gtk.Widget,Gtk.MenuPositionFunc,intptr,uint,uint) in <0x001b4> Tomboy.GuiUtils:PopupMenu (Gtk.Menu,Gdk.EventButton) in <0x00095> Tomboy.TomboyTray:ButtonPress (object,Gtk.ButtonPressEventArgs) in (unmanaged) 0x80b4b8a in <0x00004> (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[]) in <0x0008d> System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) --- End of inner exception stack trace --- in <0x0010e> System.Reflection.MonoMethod:Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) in <0x0001a> System.Reflection.MethodBase:Invoke (System.Object obj, System.Object[] parameters) in <0x000ad> System.Delegate:DynamicInvokeImpl (System.Object[] args) in <0x00028> System.MulticastDelegate:DynamicInvokeImpl (System.Object[] args) in <0x0001a> System.MulticastDelegate:DynamicInvokeImpl (System.Object[] args) in <0x0000e> System.Delegate:DynamicInvoke (System.Object[] args) in <0x00175> GtkSharp.boolObjectEventButtonSignal:boolObjectEventButtonCallback (IntPtr arg0, IntPtr arg1, Int32 key) in (wrapper native-to-managed) GtkSharp.boolObjectEventButtonSignal:boolObjectEventButtonCallback (intptr,intptr,int) in <0x00000> <unknown method> in (wrapper managed-to-native) Gtk.Application:gtk_main () in <0x00007> Gtk.Application:Run () in <0x00007> Gnome.Program:Run () in <0x00044> Tomboy.Tomboy:StartTrayIcon () in <0x00152> Tomboy.Tomboy:Main (System.String[] args) The obvious of "rebuild gtk-sharp" doesn't seem to have fixed it.
mono stackgraces are pretty useless to me. Please take this to the gtk# guys.
This is still broken with tomboy-0.3.5-5, gtk-sharp-1.0.10-5 and gtk-sharp2-2.8.2-1. This has been filed against gtk-sharp: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=192820 but not much action. Would any additional info be useful?
The problem lies in gtk-sharp2 so it was the wrong component, but all mono stuff doesn't get much love.
gtk 2.9.2 actually fixes this.
Damn, I worked on updating gtk# to the svn version and posted this bugreport with patches and stuff https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=194262 I updated gtk2 right before I started doing this, so I thought that the update fixed this. Sorry for the spam :)