Exception Thrown When Running From Command Line

Hi Red Gate,

Congratulations on the release of Exception Hunter. It looks like a great product and is really quite innovative -- I haven't heard of a similar tool.

I tried running Exception Handler from the command-line on an application I am developing and received the following exception (NB: Here's the command-line output of my run):
C:\Work\wm\build>"c:\Program Files\Red Gate\Exception Hunter 1\Hunt.exe" /assembly:".\<MyAppHere>.exe" /all /warnOnlyOnMissingReference:on
Exception Hunter Command Line V1.0.0.551
======================================================================================================================================================================================================
Copyright c Red Gate Software Ltd 2007

= Loading .NET framework
= Loading assemblies
Warning: Could not locate assembly ActiveReports.Chart, Version=4.1.0.1127, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
= Calculating exceptions
Error: Unhandled exception: Could not analyse the method NativeOledbWrapper::MemoryCompare due to an exception.

*** Inner Exception: The method or operation is not implemented. (NotImplementedException)
   at bm.get_Flags()
   at aK.ModelDataFlow(W dataState)
   at g.a(Int32 , X , c , Boolean )
   at g.d()
   at g.c()
   at e.a()

*** Inner Exception: Could not analyse the method NativeOledbWrapper::MemoryCompare 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[] )

C:\Work\wm\build>

Other than this particular exception, I have been able to run Exception Hunter no problem.

Darryl

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Darryl,

    We have identified a potential problem in the handling of missing dependent assemblies in the command-line version of Exception Hunter, which will be fixed in a future release.

    In the meantime, the program should work without error if you specify the path to the missing assembly in the searchPaths argument:
    Hunt.exe" /assembly:".\<MyAppHere>.exe" /all /searchPaths:<pathToActiveReports.chart> /warnOnlyOnMissingReference:on
    
    We're sorry for the inconvenience.
  • I'm currently evaluating EH and am getting the same exceptions from command line that Darryl is. However, I've tried setting the search paths (I run out of my assembly's bin directory as well) to include as many locations as I can come up with, but the error still appears. Is there some way to determine which dependent assembly is causing the issue?

    BTW, this is the full line I'm currently executing (I've got another one with bin\debug paths to every reference in the project, separated by commas):
    C:\DEV2\LOSSMIT\WebSite\bin>"C:\Program Files\Red Gate\Exception Hunter1\Hunt.exe" /assembly:elmsbl.dll /all /warnOnlyOnMissingReference:on /searchPaths:"C:\Program Files\Microsoft Visual Studio 8\ReportViewer","C:\dev2\LossMit\WebSite\bin" /exceptionReport:true
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    You may want to try the latest private build of Exception Hunter 1.1. It has some improved reading of assembly metadata:

    http://downloads.red-gate.com/BleedingE ... tBuild.msi
  • Unfortunately, EH 1.1 gives me the same error.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Just to clarify, are you getting the warning about not being able to locate the assembly or the error about not being able to analyze a method?

    If you can't analyze a method, it may just be that the assembly, or one of its' dependencies, was built using an obfuscator. These can make it difficult or impossible for Exception Hunter to disassemble the code (essectially that's their job!) and there may not be a way of analyzing this dll without getting a version that isn't obfuscated.
  • It's an error (happens very late in the process, but the exception report isn't generated):
    Finding exceptions for public System.Boolean ELMSBL.WorkoutCreator.FileProcess
    or::ProcessFile(System.String)
    Error: Unhandled exception: Could not analyse the method NativeOledbWrapper::Mem
    oryCompare due to an exception.
    
    *** Inner Exception: The method or operation is not implemented. (NotImplemented
    Exception)
       at bm.get_Flags()
       at aK.ModelDataFlow(X dataState)
       at g.a(Int32 , Y , c , Boolean )
       at g.d()
       at g.c()
       at e.a()
    
    *** Inner Exception: Could not analyse the method NativeOledbWrapper::MemoryComp
    are due to an exception. (CouldNotAnalyseMethodException)
       at e.a()
       at e.c()
       at e.a(D , aa , IList`1 )
       at bw.CalculateExceptionsThrownByMethod(IClassMethod method, IClass instanceC
    lass)
       at bw.CalculateExceptionsThrownByMethod(IClassMethod method)
       at c.PerformAnalysis()
       at RedGate.ExceptionHunter.CommandLine.CommandLine.a(String[] )
    Exception Hunter finished with code 1
    
  • I get the same error.
    Error: Unhandled exception: Could not analyse the method NativeOledbWrapper::MemoryCompare due to an exception.
    
    *** Inner Exception: The method or operation is not implemented. (NotImplementedException)
       at bm.get_Flags()
       at aK.ModelDataFlow(W dataState)
       at g.a(Int32 , X , c , Boolean )
       at g.d()
       at g.c()
       at e.a()
    
    *** Inner Exception: Could not analyse the method NativeOledbWrapper::MemoryCompare due to an exception. (CouldNotAnalys
    eMethodException)
       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
    
Sign In or Register to comment.