wliao008 / buffalo

an aspect oriented programming framework using mono cecil for the .NET platform
1 stars 0 forks source link

System.NullReferenceException when testing with an existing window program #17

Closed wliao008 closed 11 years ago

wliao008 commented 11 years ago

I created a BuffaloTrace and overrode the Before() to print some trace statment, then run BuffaloAOP.exe on the target dll and after a bit the following error occurred:

    <>f__AnonymousType0`2: Applied
            .ctor: Applied
            get_a: Applied
            get_b: Applied
            ToString: Applied
            Equals: Applied
            GetHashCode: Applied
    <>z__MulticastImplementationDetails3066306380: Applied

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Buffalo.MethodBoundaryInjector.Inject(AssemblyDefinition assemblyDefinitio n, Dictionary2 eligibleMethods) in c:\Users\wliao\Documents\Visual Studio 2012\ Projects\buffalo\Buffalo\MethodBoundaryInjector.cs:line 27 at Buffalo.Weaver.<Inject>b__4(IInjectable x) in c:\Users\wliao\Documents\Vis ual Studio 2012\Projects\buffalo\Buffalo\Weaver.cs:line 56 at System.Collections.Generic.List1.ForEach(Action`1 action) at Buffalo.Weaver.Inject(String outPath) in c:\Users\wliao\Documents\Visual S tudio 2012\Projects\buffalo\Buffalo\Weaver.cs:line 56 at BuffaloAOP.Program.Main(String[] args) in c:\Users\wliao\Documents\Visual Studio 2012\Projects\buffalo\BuffaloAOP\Program.cs:line 23

C:\Users\wliao\Documents\Visual Studio 2012\Projects\buffalo\BuffaloAOP\bin\Debug