We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Bowtie algorithm crashes

Thread ID:

Created:

Updated:

Platform:

Replies:

102527 Feb 7,2012 04:56 AM UTC Feb 8,2012 04:26 AM UTC WPF 2
loading
Tags: Diagram
nadeem
Asked On February 7, 2012 04:56 AM UTC

Hi,
I am using Syncfusion diagram in two views. I am using Bowtie algorithm for presentation of nodes and connectors. I am using this code in both views.

diagramModel.LayoutRoot = nodeList[0];
diagramModel.LayoutType = LayoutType.BowtieLayout;
BowtieLayout tree = new BowtieLayout(diagramModel, diagramView);
tree.RefreshLayout();

while switching between views I am getting this error.

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.BitArray.Set(Int32 index, Boolean value)
at Syncfusion.Windows.Diagram.DiagramModel.Syncfusion.Windows.Diagram.IGraph.MakeTraversing(IShape node)
at Syncfusion.Windows.Diagram.BowtieLayout.InitializeLayout()
at Syncfusion.Windows.Diagram.BowtieLayout.StartNodeArrangement()
at Syncfusion.Windows.Diagram.BowtieLayout.RefreshPart()
at Syncfusion.Windows.Diagram.BowtieLayout.RefreshLayout()
at Syncfusion.Windows.Diagram.DiagramControl.DiagramControl_Loaded(Object sender, RoutedEventArgs e)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
at MS.Internal.LoadedOrUnloadedOperation.DoWork()
at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
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, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)


Looking for a positive response from your side.



nadeem
Replied On February 7, 2012 09:52 AM UTC

Hi,
I am using Syncfusion diagram in two views. I am using Bowtie algorithm for presentation of nodes and connectors. I am using this code in both views.

diagramModel.LayoutRoot = nodeList[0];
diagramModel.LayoutType = LayoutType.BowtieLayout;
BowtieLayout tree = new BowtieLayout(diagramModel, diagramView);
tree.RefreshLayout();

One more thing is common in both views,sometime I redraw by canvas from XML file(if file exist),in that case I have not run the above code,if file doesnot exist I executed the above code.

So while switching between views I am getting this error.

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.BitArray.Set(Int32 index, Boolean value)
at Syncfusion.Windows.Diagram.DiagramModel.Syncfusion.Windows.Diagram.IGraph.MakeTraversing(IShape node)
at Syncfusion.Windows.Diagram.BowtieLayout.InitializeLayout()
at Syncfusion.Windows.Diagram.BowtieLayout.StartNodeArrangement()
at Syncfusion.Windows.Diagram.BowtieLayout.RefreshPart()
at Syncfusion.Windows.Diagram.BowtieLayout.RefreshLayout()
at Syncfusion.Windows.Diagram.DiagramControl.DiagramControl_Loaded(Object sender, RoutedEventArgs e)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
at MS.Internal.LoadedOrUnloadedOperation.DoWork()
at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
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, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)


Looking for a positive response from your side.


Ramya Thirugnanam [Syncfusion]
Replied On February 8, 2012 04:26 AM UTC

Hi Nadeem,

We are unable to reproduce this” ArgumentOutOfRangeException” issue in the reported scenario. We have created the simple sample to represent this. Please refer to the sample from the attachment.

Sample Details:
In that sample, we have used tab control with 2 tab items with same Diagram content.

Suggestions:

After analyzing the provided Stack Trace, the cause of this issue is absence of Layout root. So please verify that the LayoutRoot is properly set in your application.

If this response does not satisfy your requirement, please provide us the simple sample to reproduce this issue.

Please let us know if you have any concerns.
Regards,
Ramya




Sample_15a74a7.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;