Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Failed to compare two elements in the array (Read 8920 times)
NiekC
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Mar 24th, 2009
Failed to compare two elements in the array
Mar 24th, 2009 at 2:51pm
Print Post  
I often encounter the following exception when selecting or dragging DiagramItems (hard to reproduce exactly). It causes my application to crash. Version:2.1.1.23367

Exception:
System.InvalidOperationException:Failed to compare two elements in the array.

StackTrace:
at System.Array.SorterObjectArray.SwapIfGreaterWithItems(Int32 a, Int32 b)
   at System.Array.SorterObjectArray.QuickSort(Int32 left, Int32 right)
   at System.Array.Sort(Array keys, Array items, Int32 index, Int32 length, IComparer comparer)
   at System.Collections.ArrayList.Sort(Int32 index, Int32 count, IComparer comparer)
   at MindFusion.Diagramming.Wpf.x2965d493a804ca6b.x3ae2538770cbf5a5(Int32 x7f8a886f51b477eb)
   at MindFusion.Diagramming.Wpf.Diagram.x3ae2538770cbf5a5(Int32 x7f8a886f51b477eb)
   at MindFusion.Diagramming.Wpf.Diagram.x3ae2538770cbf5a5()
   at MindFusion.Diagramming.Wpf.Diagram.ArrangeOverride(Size finalSize)
   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

InnerException:
[System.NullReferenceException] = {"Object reference not set to an instance of an object."}

StackTrace:
   at MindFusion.Diagramming.Wpf.Diagram.GetDiagramItem(UIElement item)
   at MindFusion.Diagramming.Wpf.xddab178229d7219f.x7aeaf17dbdd7799a(Object x08db3aeabb253cb1, Object x1e218ceaee1bb583)
   at MindFusion.Diagramming.Wpf.xddab178229d7219f.xd2b26c831a48c764(DiagramItem xde860fba55c41d76, DiagramNode xb6a159a84cb992d6)
   at MindFusion.Diagramming.Wpf.xddab178229d7219f.x7aeaf17dbdd7799a(Object x08db3aeabb253cb1, Object x1e218ceaee1bb583)
   at MindFusion.Diagramming.Wpf.xddab178229d7219f.Compare(Object x, Object y)
   at System.Array.SorterObjectArray.SwapIfGreaterWithItems(Int32 a, Int32 b)
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Failed to compare two elements in the array
Reply #1 - Mar 24th, 2009 at 4:09pm
Print Post  
Hi,

What kind of items do you use in your diagram? Could you email a saved xml file to support@mindfusion.eu?

Thanks,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Failed to compare two elements in the array
Reply #2 - Mar 24th, 2009 at 4:19pm
Print Post  
Have you by chance added any object not derived from DiagramItem as a child of Diagram or Diagram.DocumentPlane?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Failed to compare two elements in the array
Reply #3 - Mar 25th, 2009 at 4:03pm
Print Post  
Hi,

We could not reproduce that with the diagram you sent us. We don't have any idea how a random Visual object could appear in the diagram and break the comparer code, but added some check to handle this. Please try this version from the PM page and let me know if it still has the problem.

Stoyan
  
Back to top
 
IP Logged
 
Paul Eden
Full Member
***
Offline



Posts: 128
Joined: Aug 15th, 2007
Re: Failed to compare two elements in the array
Reply #4 - Jul 1st, 2009 at 5:24pm
Print Post  
Hi we've just got the message too. We've yet to replicate outside of our application, but thought we'd share the following exception details:

at MindFusion.Diagramming.Wpf.Diagram.GetDiagramItem(UIElement item)
at MindFusion.Diagramming.Wpf.xddab178229d7219f.x7aeaf17dbdd7799a(Object x08db3aeabb253cb1, Object x1e218ceaee1bb583)
at MindFusion.Diagramming.Wpf.xddab178229d7219f.xd2b26c831a48c764(DiagramItem xde860fba55c41d76, DiagramNode xb6a159a84cb992d6)
at MindFusion.Diagramming.Wpf.xddab178229d7219f.x7aeaf17dbdd7799a(Object x08db3aeabb253cb1, Object x1e218ceaee1bb583)
at MindFusion.Diagramming.Wpf.xddab178229d7219f.Compare(Object x, Object y)
at System.Array.SorterObjectArray.SwapIfGreaterWithItems(Int32 a, Int32 b)

Which was an inner exception of :
at System.Array.SorterObjectArray.SwapIfGreaterWithItems(Int32 a, Int32 b)
at System.Array.SorterObjectArray.QuickSort(Int32 left, Int32 right)
at System.Array.Sort(Array keys, Array items, Int32 index, Int32 length, IComparer comparer)
at System.Collections.ArrayList.Sort(Int32 index, Int32 count, IComparer comparer)
at MindFusion.Diagramming.Wpf.x2965d493a804ca6b.x3ae2538770cbf5a5(Int32 x7f8a886f51b477eb)
at MindFusion.Diagramming.Wpf.Diagram.x3ae2538770cbf5a5(Int32 x7f8a886f51b477eb)
at MindFusion.Diagramming.Wpf.Diagram.x3ae2538770cbf5a5()
at MindFusion.Diagramming.Wpf.Diagram.ArrangeOverride(Size finalSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

the rest of the exception is trunctaed due to forum restrictions.

Did the version sent to the original poster fix the issue?

Thanks

Paul Eden
  
Back to top
WWW  
IP Logged
 
NiekC
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Mar 24th, 2009
Re: Failed to compare two elements in the array
Reply #5 - Jul 2nd, 2009 at 8:08am
Print Post  
Yes, after being send a few tryouts, my problem was quickly solved.  Grin
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Failed to compare two elements in the array
Reply #6 - Jul 2nd, 2009 at 8:14am
Print Post  
Hi Paul,

Try the version from the PM page.

Stoyan
  
Back to top
 
IP Logged
 
Paul Eden
Full Member
***
Offline



Posts: 128
Joined: Aug 15th, 2007
Re: Failed to compare two elements in the array
Reply #7 - Jul 9th, 2009 at 12:31pm
Print Post  
Thanks - looks like tht has fixed the issue for us.

What development state is this DLL in - should it be considered beta and if so when will the live version have this fix?


Many thanks

Paul
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Failed to compare two elements in the array
Reply #8 - Jul 9th, 2009 at 2:45pm
Print Post  
It should be stable, it's close to the build we are releasing now with v2.2.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint