System.StackOverflowException when Calculating Overall Metrics

Sep 2, 2010 at 12:52 AM


I'm using the API to calculate the overal metrics in a windows forms application using the following code:

OverallMetricCalculator metricCalculator = new OverallMetricCalculator();
GraphMetricCalculatorBase.SetSnapGraphMetricCalculatorPath(@"C:\Program Files (x86)\Microsoft Research\Microsoft NodeXL Excel Template\SnapGraphMetricCalculator.exe");
var backgroundWorker = new BackgroundWorker {WorkerReportsProgress = true};
OverallMetrics metricsResults;
metricCalculator.TryCalculateGraphMetrics(oGraph, backgroundWorker, out metricsResults);

and I'm getting the following message:

An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll 

When I use the EigenvectorCentralityCalculator it works fine - even for graphs with 1 million edges + 1 million vertices).

Is this an expected behavior? Any suggestions?

Thanks in advance

Sep 2, 2010 at 3:49 PM


Is there a stack trace that indicates where the overflow is occurring?  The overall metrics include several different calculations, and on first glance I'm not sure which one might be overflowing the stack.

-- Tony

Sep 2, 2010 at 7:05 PM

Hi Tom,

the only info I have on my stack trace is that " The maximum number of stack frames supported by Visual Studio has been exceeded."

I'll try to run it using NodeXL source code to see what I can find out.