Exception Thrown When Running From Command Line

gmcbathgmcbath Posts: 5
First time to use the tool so it's probably something that I'm doing, but can someone help?

I launch Exception Hunter with the following command line:

hunt /a:"PTU.Console.exe" /all /force /mr:"ptu.console.report.html" /vv /net2.0

The tool runs about 1.5 hours then gives the following error message:

Exception Hunter Command Line V1.0.0.551
Copyright c Red Gate Software Ltd 2007

= Initialising

Options in effect:
DetectInvalidCastExceptions = True
DetectNullReferenceExceptions = True
FastAnalysis = True
IgnoreCodeBranches = False
IgnoreChattyClasses = True
MaxOverrides = 1
SearchGAC = True
WarnOnlyOnMissingReference = False
Will load .NET framework version 2.0
Search paths are C:\Userdata3\Clients\Stewart Title2\Source\Premium Transfer Utility\Source\PTUSolution\PTU.StartupConsole\bin\Debug; C:\Userdata3\Clients\Stewart Title2\Source\Premium Transfer Utility\Source\PTUSolution\PTU.StartupConsole\bin\Debug
= Loading .NET framework
= Loading assemblies
Loading assembly 'PTU.Console.exe'
= Calculating exceptions
Finding exceptions for void StewartTitle.PTU.StartupConsole.frmMain::.ctor()
Error: Unhandled exception: Could not analyse the method StewartTitle.Systems.Configuration.ConfigInfo::GetExceptionDump due to an exception.

*** Inner Exception: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Collections.Generic.Dictionary`2.Resize()
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at aa.Store(Z valueSet)
at cq.Store(Z valueSet)
at X.Store(q variable, Z valueSet)
at ch.a(Object , ca )
at ac.ModelDataFlowOnEntry(W controlState)
at c.BranchToActiveExceptionBlock(ab catchBlock, W dataState, Z exception)
at c.a(IEnumerable`1 , Boolean )
at c.CallMethod(C method, Z instance, IEnumerable`1 parameters, W dataState, q returnVariable, Boolean isVirtual)
at aC.ModelControlFlow(b controlState, W stateAfterDataFlow)
at g.a(Int32 , X , c , Boolean )
at g.d()
at g.c()
at e.a()

*** Inner Exception: Could not analyse the method StewartTitle.Systems.Configuration.ConfigInfo::GetExceptionDump due to an exception. (CouldNotAnalyseMethodException)
at e.a()
at e.c()
at e.a(C )
at bw.CalculateExceptionsThrownByMethod(IClassMethod method)
at c.PerformAnalysis()
at RedGate.ExceptionHunter.CommandLine.CommandLine.a(String[] )
Exception Hunter finished with code 1


  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1

    I'm sorry to see you are having this problem. Because the process is running out of memory, the best recommendation I can think of is just to try to reduce the amount of memory used. From the stack trace, it would seem that the most likely option to change in order to save a bit of memory would be the "ignore code branches" option, which would also implicitly turn off detection for NullReferenceExceptions and InvalidCastExceptions.

    Not checking to see that null-reference situations are actually handled by analyzing the code could save quite a bit of time and reducing code branches would reduce the complexity of the static analysis.

    Hope this helps!
Sign In or Register to comment.