KeyNotFoundException

Oct 14, 2011 at 11:29 AM

I get this exception sometimes for the same data, and i'm not able to catch where it happens.

It get triggered in the class "AlgorithmBase.cs" in method "Compute" when the method "InternalCompute" is invoiced!

I get "The given key was not present in the dictionary".

Thanks

Coordinator
Oct 14, 2011 at 12:37 PM

Which layout algorithm do you use? Stacktrace?

Oct 17, 2011 at 6:23 AM

Actually Tree

Oct 17, 2011 at 9:35 AM

Anyone have any idea where the problem is?

Thanks 

Coordinator
Oct 17, 2011 at 10:19 AM

Could you send me a stacktrace, please?

Oct 17, 2011 at 10:35 AM

Hi, That is the stack Trace.

Thanks for your help...

 

 at System.Collections.Generic.Dictionary`2.get_Item(TKey key) 

 at QuickGraph.BidirectionalGraph`2.OutDegree(TVertex v)   

at QuickGraph.BidirectionalGraph`2.Degree(TVertex v) 

 at GraphSharp.Controls.GraphLayout`3.InitializePosition(TVertex vertex) in C:\Users\exalt\Downloads\graphsharp-fdc61b0ab7b9\Source\Graph#.Controls\Controls\GraphLayout.GraphElements.cs:line 267   

at GraphSharp.Controls.GraphLayout`3.OnMutation() in C:\Users\exalt\Downloads\graphsharp-fdc61b0ab7b9\Source\Graph#.Controls\Controls\GraphLayout.GraphElements.cs:line 162   

at GraphSharp.Controls.GraphLayout`3.<DoNotificationLayout>b__24(Object s, RunWorkerCompletedEventArgs e) in C:\Users\exalt\Downloads\graphsharp-fdc61b0ab7b9\Source\Graph#.Controls\Controls\GraphLayout.GraphElements.cs:line 129   

at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)   

at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg) 

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)   

at System.Windows.Threading.DispatcherOperation.InvokeImpl() 

at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state) 

at System.Threading.ExecutionContext.runTryCode(Object userData)  

at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)  

at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)   

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)   

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)   

at System.Windows.Threading.DispatcherOperation.Invoke()   

at System.Windows.Threading.Dispatcher.ProcessQueue()   

at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)   

at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)   

at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)   

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)   

at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)   

at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)   

at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)   

at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)   

at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)   

at System.Windows.Application.RunDispatcher(Object ignore)   

at System.Windows.Application.RunInternal(Window window)   

at System.Windows.Application.Run(Window window)   

at System.Windows.Application.Run()   

at IFlow.App.Main() in C:\Local-IFlow\IFlow\IFlow\obj\x86\Debug\App.g.cs:line 0   

at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)   

at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)   

at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()   

at System.Threading.ThreadHelper.ThreadStart_Context(Object state)   

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)   

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 

at System.Threading.ThreadHelper.ThreadStart()

Coordinator
Oct 17, 2011 at 11:44 AM

Get the latest source... I hope it won't happen again.