ICSharpCode.ILSpy.AssertionFailedException: StackTypes must match!
greenozon opened this issue · comments
Input code
Please provide the input that failed to decompile.
Save as Project
Erroneous output
Error decompiling @06000049 ------------
in assembly "C:\tmp\1\err142.dll"
---> ICSharpCode.ILSpy.AssertionFailedException: StackTypes must match!
at ICSharpCode.ILSpy.ILSpyTraceListener.Fail(String message, String detailMessage) in offset 379
at System.Diagnostics.TraceInternal.Fail(String message, String detailMessage) in offset 48
at System.Diagnostics.Debug.Fail(String message, String detailMessage) in offset 0
at ICSharpCode.Decompiler.IL.Transforms.TransformExpressionTrees.<>c__DisplayClass16_0.<ConvertInstruction>g__DoConvert|0() in TransformExpressionTrees.cs:line 281
at ICSharpCode.Decompiler.IL.Transforms.TransformExpressionTrees.<>c__DisplayClass29_0.<ConvertComparison>b__1() in TransformExpressionTrees.cs:line 791
at ICSharpCode.Decompiler.IL.Transforms.TransformExpressionTrees.<>c__DisplayClass16_0.<ConvertInstruction>g__DoConvert|0() in TransformExpressionTrees.cs:line 279
at ICSharpCode.Decompiler.IL.Transforms.TransformExpressionTrees.<>c__DisplayClass12_0.<ConvertLambda>g__BuildFunction|0() in TransformExpressionTrees.cs:line 184
at ICSharpCode.Decompiler.IL.Transforms.TransformExpressionTrees.TryConvertExpressionTree(ILInstruction instruction, ILInstruction statement) in TransformExpressionTrees.cs:line 136
at ICSharpCode.Decompiler.IL.Transforms.TransformExpressionTrees.TryConvertExpressionTree(ILInstruction instruction, ILInstruction statement) in TransformExpressionTrees.cs:line 147
at ICSharpCode.Decompiler.IL.Transforms.TransformExpressionTrees.Run(Block block, Int32 pos, StatementTransformContext context) in TransformExpressionTrees.cs:line 118
at ICSharpCode.Decompiler.IL.Transforms.StatementTransform.Run(Block block, BlockTransformContext context) in StatementTransform.cs:line 140
at ICSharpCode.Decompiler.IL.Block.RunTransforms(IEnumerable`1 transforms, BlockTransformContext context) in Block.cs:line 333
at ICSharpCode.Decompiler.IL.Transforms.BlockILTransform.VisitBlock(ControlFlowNode entryNode, BlockTransformContext context) in BlockTransform.cs:line 136
at ICSharpCode.Decompiler.IL.Transforms.BlockILTransform.Run(ILFunction function, ILTransformContext context) in BlockTransform.cs:line 100
at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DecompileBody(IMethod method, EntityDeclaration entityDecl, DecompileRun decompileRun, ITypeResolveContext decompilationContext) in CSharpDecompiler.cs:line 1737
-- continuing with outer exception (ICSharpCode.Decompiler.DecompilerException) --
at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DecompileBody(IMethod method, EntityDeclaration entityDecl, DecompileRun decompileRun, ITypeResolveContext decompilationContext) in CSharpDecompiler.cs:line 1773
at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DoDecompile(IMethod method, DecompileRun decompileRun, ITypeResolveContext decompilationContext) in CSharpDecompiler.cs:line 1622
at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.<>c__DisplayClass74_0.<DoDecompile>g__DoDecompileMember|0(IEntity entity, RecordDecompiler recordDecompiler, PartialTypeInfo partialType) in CSharpDecompiler.cs:line 1497
at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DoDecompile(ITypeDefinition typeDef, DecompileRun decompileRun, ITypeResolveContext decompilationContext) in CSharpDecompiler.cs:line 1364
at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DoDecompileTypes(IEnumerable`1 types, DecompileRun decompileRun, ITypeResolveContext decompilationContext, SyntaxTree syntaxTree) in CSharpDecompiler.cs:line 651
at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DecompileTypes(IEnumerable`1 types) in CSharpDecompiler.cs:line 950
at ICSharpCode.Decompiler.CSharp.ProjectDecompiler.WholeProjectDecompiler.<>c__DisplayClass46_0.<WriteCodeFilesInProject>b__5(IGrouping`2 file) in WholeProjectDecompiler.cs:line 276
at System.Threading.Tasks.Parallel.<>c__DisplayClass43_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) in offset 259
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in offset 17
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(Exception source) in offset 0
at System.Threading.Tasks.Parallel.<>c__DisplayClass43_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) in offset 609
at System.Threading.Tasks.TaskReplicator.Replica.Execute() in offset 35
Details
- Product in use: e.g. ILSpy / ICSharpCode.Decompiler nuget package / VS extension
- ILSpy version 9.0.0.7612-preview1
- .NET version 8.0.3+9f4b1f5d664afdfc80e1508ab7ed099dff210fbd