[Mono-bugs] [Bug 553675] PropertyInfo.GetValue() throws InvalidCastException instead of TargetException when supplied invalid argument

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Sep 9 15:33:12 EDT 2011



olivier dufour <olivier.duff at gmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |olivier.duff at gmail.com

--- Comment #3 from olivier dufour <olivier.duff at gmail.com> 2011-09-09 19:33:11 UTC ---
I get exactly the same bug with banshee when trying to make a patch for
ginterface properties support in gtk#.

obj: Banshee.Collection.Gui.ArtistListView
get prop: Gtk.ScrollablePolicy HscrollPolicy

The HscrollPolicy property is inherited of ListView<T>.
ArtistListView : ListView<T>

Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle
the exception.
System.InvalidCastException: Cannot cast from source type to destination type.
(System.Reflection.Getter`2 getter, System.Object obj) [0x00000] in
  at System.Reflection.MonoProperty.GetValue (System.Object obj,
System.Object[] index) [0x0005e] in

I am think in my case it is even worse because it do not succeed to cast
whereas must be castable...

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list