Bug 10945 - System.InvalidCastException: Cannot cast from source type to destination type.
Summary: System.InvalidCastException: Cannot cast from source type to destination type.
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: Trunk
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
: 11667 ()
Depends on:
Blocks:
 
Reported: 2013-03-06 13:52 UTC by Marek Safar
Modified: 2013-04-09 08:32 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Marek Safar 2013-03-06 13:52:13 UTC
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Comparison threw an exception. ---> System.InvalidCastException: Cannot cast from source type to destination type.
  at MonoDevelop.DesignerSupport.ClassOutlineNodeComparer.GetRegion (System.Object o) [0x00064] in /Users/builder/data/lanes/monodevelop-lion-master/2cdc737a/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/ClassOutlineNodeComparer.cs:294 
  at MonoDevelop.DesignerSupport.ClassOutlineNodeComparer.CompareRegion (System.Object o1, System.Object o2) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-master/2cdc737a/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/ClassOutlineNodeComparer.cs:299 
  at System.Array.qsort[Object] (System.Object[] array, Int32 low0, Int32 high0, System.Comparison`1 compare) [0x00000] in <filename unknown>:0 
  at System.Array.SortImpl[Object] (System.Object[] array, Int32 length, System.Comparison`1 comparison) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Array.SortImpl[Object] (System.Object[] array, Int32 length, System.Comparison`1 comparison) [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.List`1[System.Object].Sort (System.Comparison`1 comparison) [0x00000] in <filename unknown>:0 
  at MonoDevelop.DesignerSupport.ClassOutlineTextEditorExtension.AddTreeClassContents (Gtk.TreeStore store, TreeIter parent, MonoDevelop.Ide.TypeSystem.ParsedDocument parsedDocument, ITypeDefinition cls, IUnresolvedTypeDefinition part) [0x00109] in /Users/builder/data/lanes/monodevelop-lion-master/2cdc737a/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/ClassOutlineTextEditorExtension.cs:352 
  at MonoDevelop.DesignerSupport.ClassOutlineTextEditorExtension.BuildTreeChildren (Gtk.TreeStore store, TreeIter parent, MonoDevelop.Ide.TypeSystem.ParsedDocument parsedDocument) [0x00084] in /Users/builder/data/lanes/monodevelop-lion-master/2cdc737a/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/ClassOutlineTextEditorExtension.cs:334 
  at MonoDevelop.DesignerSupport.ClassOutlineTextEditorExtension.RefillOutlineStore () [0x00052] in /Users/builder/data/lanes/monodevelop-lion-master/2cdc737a/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/ClassOutlineTextEditorExtension.cs:304 
  at MonoDevelop.DesignerSupport.ClassOutlineTextEditorExtension.<GetOutlineWidget>m__30 (System.Object , System.EventArgs ) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-master/2cdc737a/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/ClassOutlineTextEditorExtension.cs:143 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0 
  at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0 
  at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <filename unknown>:0 
  at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0 
  at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0 
  at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in <filename unknown>:0
Comment 1 Mike Krüger 2013-03-26 05:04:30 UTC
fixed.
Comment 2 Mike Krüger 2013-04-09 08:28:37 UTC
*** Bug 11667 has been marked as a duplicate of this bug. ***
Comment 3 Maxim 2013-04-09 08:30:46 UTC
When XS update will be available?
Comment 4 Mike Krüger 2013-04-09 08:32:52 UTC
I think somewhere next week during the evolve conference.

I would recommend turning document outline off & use the breadcrumb bar on top until it's released.