Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICSharpCode.ILSpy.AssertionFailedException: Container should not have any unreachable blocks #3323

Open
greenozon opened this issue Nov 5, 2024 · 0 comments
Labels
Bug Decompiler The decompiler engine itself

Comments

@greenozon
Copy link

Input code

save as project

Erroneous output

Error decompiling @060033A7 
in assembly "C:\Tmp\1\err145.dll"
 ---> ICSharpCode.ILSpy.AssertionFailedException: Container should not have any unreachable blocks
   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.BlockContainer.CheckInvariant(ILPhase phase) in BlockContainer.cs:line 202
   at ICSharpCode.Decompiler.IL.ILInstruction.CheckInvariant(ILPhase phase) in ILInstruction.cs:line 95
   at ICSharpCode.Decompiler.IL.ILInstruction.CheckInvariant(ILPhase phase) in ILInstruction.cs:line 95
   at ICSharpCode.Decompiler.IL.Block.CheckInvariant(ILPhase phase) in Block.cs:line 108
   at ICSharpCode.Decompiler.IL.ILInstruction.CheckInvariant(ILPhase phase) in ILInstruction.cs:line 95
   at ICSharpCode.Decompiler.IL.BlockContainer.CheckInvariant(ILPhase phase) in BlockContainer.cs:line 196
   at ICSharpCode.Decompiler.IL.ILInstruction.CheckInvariant(ILPhase phase) in ILInstruction.cs:line 95
   at ICSharpCode.Decompiler.IL.ILFunction.CheckInvariant(ILPhase phase) in ILFunction.cs:line 260
   at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DecompileBody(IMethod method, EntityDeclaration entityDecl, DecompileRun decompileRun, ITypeResolveContext decompilationContext) in CSharpDecompiler.cs:line 1760
-- 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 1795
   at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DoDecompile(IMethod method, DecompileRun decompileRun, ITypeResolveContext decompilationContext) in CSharpDecompiler.cs:line 1644
   at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.<>c__DisplayClass75_0.<DoDecompile>g__DoDecompileMember|0(IEntity entity, RecordDecompiler recordDecompiler, PartialTypeInfo partialType) in CSharpDecompiler.cs:line 1519
   at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DoDecompile(ITypeDefinition typeDef, DecompileRun decompileRun, ITypeResolveContext decompilationContext) in CSharpDecompiler.cs:line 1382
   at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DoDecompileTypes(IEnumerable`1 types, DecompileRun decompileRun, ITypeResolveContext decompilationContext, SyntaxTree syntaxTree) in CSharpDecompiler.cs:line 656
   at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DecompileTypes(IEnumerable`1 types) in CSharpDecompiler.cs:line 955
   at ICSharpCode.Decompiler.CSharp.ProjectDecompiler.WholeProjectDecompiler.<>c__DisplayClass46_0.<WriteCodeFilesInProject>b__5(IGrouping`2 file) in WholeProjectDecompiler.cs:line 289
   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

  • ILSpy version 9.0.0.7832-preview3+1134313515d9c4ad908eb024942e740b591aaac5
    .NET version 8.0.8+08338fcaa5c9b9a8190abb99222fed12aaba956c

err145.zip

@greenozon greenozon added Bug Decompiler The decompiler engine itself labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Decompiler The decompiler engine itself
Projects
None yet
Development

No branches or pull requests

1 participant