Skip to content

Null pointer exception trying to decompile DLL in latest build #2712

@avengerx

Description

@avengerx

Steps to reproduce

Follow the steps in issue #2622

  1. Downdload and extract (7zip works): KB5007409 exchange patch from microsoft website
  2. Decompile Microsoft.Exchange.Monitoring.ActiveMonitoring.Local.Components.dll into a project using ILSpy
    2.1. ILSpy GUI:
    2.1.1. Open the DLL
    2.1.2. Right click it
    2.1.3. Click "Save Code" and choose a target directory
    2.2. ILSpyCmd:
    2.2.1. Change to the directory where you extracted the .msp file and:
mkdir k
cd k
ilspycmd --languageversion latest --outputdir . --project --use-varnames-from-pdb --nested-directories ../Microsoft.Exchange.Monitoring.ActiveMonitoring.Local.Components.dll

Error message shown

Release

Error decompiling @06000735 Microsoft.Office.Datacenter.ActiveMonitoring.ActiveMonitoring.MonitoringMailboxCleaner.CreateDefinition
in assembly "A:\games\stpt\ilspy\issue2622\Exchange2019-KB5007409-x64-en\Microsoft.Exchange.Monitoring.ActiveMonitoring.Local.Components.dll"
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at ICSharpCode.Decompiler.CSharp.CallBuilder.BuildArgumentList(ExpectedTargetDetails expectedTargetDetails, ResolveResult target, IMethod method, Int32 firstParamIndex, IReadOnlyList`1 callArguments, IReadOnlyList`1 argumentToParameterMap) in CallBuilder.cs:line 710
   at ICSharpCode.Decompiler.CSharp.CallBuilder.BuildDictionaryInitializerExpression(OpCode callOpCode, IMethod method, InitializedObjectResolveResult target, IReadOnlyList`1 indices, ILInstruction value) in CallBuilder.cs:line 539
(...)

Debug

Process terminated. Assertion failed.
   at ICSharpCode.Decompiler.CSharp.ExpressionBuilder.BuildArrayInitializerExpression(Block block, InitializedObjectResolveResult initObjRR) in A:\games\stpt\ilspy\src\ICSharpCode.Decompiler\CSharp\ExpressionBuilder.cs:line 3247
   at ICSharpCode.Decompiler.CSharp.ExpressionBuilder.TranslateObjectAndCollectionInitializer(Block block) in A:\games\stpt\ilspy\src\ICSharpCode.Decompiler\CSharp\ExpressionBuilder.cs:line 3182
   at ICSharpCode.Decompiler.CSharp.ExpressionBuilder.VisitBlock(Block block, TranslationContext context) in A:\games\stpt\ilspy\src\ICSharpCode.Decompiler\CSharp\ExpressionBuilder.cs:line 3111
   at ICSharpCode.Decompiler.IL.Block.AcceptVisitor[C,T](ILVisitor`2 visitor, C context) in A:\games\stpt\ilspy\src\ICSharpCode.Decompiler\IL\Instructions.cs:line 876
(...)

Details

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions