KeyNotFoundException

Topics: glee, graph
Sep 8, 2007 at 3:28 PM
hi,
i have tried to generate several graphs now, which are all working fine. but there is one which causes an exception when populating it to the GleeGraphProvider. I get the following error message (in German):

System.Collections.Generic.KeyNotFoundException was unhandled
  Message="Der angegebene Schlüssel war nicht im Wörterbuch angegeben."
  Source="mscorlib"
  StackTrace:
       bei System.ThrowHelper.ThrowKeyNotFoundException()
       bei System.Collections.Generic.Dictionary`2.get_Item(TKey key)
       bei QuickGraph.Glee.GleeDefaultGraphPopulator`2.AddEdge(Edge e)
       bei QuickGraph.Glee.GleeGraphPopulator`2.InternalCompute()
       bei QuickGraph.Algorithms.AlgorithmBase`1.Compute()
       ....

The translation would be like "The key was not found in the dictionary".

Why could this happen? I generate the graph in the same way as all others with:

GleeGraphPopulator<string, Edge<string>> populator = GleeGraphUtility.Create<string, Edge<string>>(graph);
populator.Compute();
Graph gleeGraph = populator.GleeGraph;
Coordinator
Sep 8, 2007 at 4:59 PM
Please open a workitem on this.
Coordinator
Sep 9, 2007 at 5:57 AM
Which graph datastructure are you using? there might be a bug over there.
Sep 9, 2007 at 8:34 AM
i use an AdjacencyGraph which i constructed as follows:

AdjacencyGraph<string, Edge<string>> graph = new AdjacencyGraph<string, Edge<string>>();

followed by some graph.AddVertex(someString); and graph.AddEdge(new Edge<string>(someString1, someString2)); commands.

and in the end comes the code shown above with the GraphPopularor
Coordinator
Sep 14, 2007 at 7:30 AM
That sounds correct. You can open a workitem on this.