Closed mgwalm closed 7 years ago
What exactly were you trying to decompile?
A dll?
From: Vince Panuccio [mailto:notifications@github.com] Sent: Thursday, 20 March 2014 9:14 PM To: icsharpcode/ILSpy Cc: mgwalm Subject: Re: [ILSpy] Throws exception when decompiling (#446)
What exactly were you trying to decompile?
— Reply to this email directly or view it on GitHub https://github.com/icsharpcode/ILSpy/issues/446#issuecomment-38155547 . https://github.com/notifications/beacon/6946842__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxMDkzMzIxMSwiZGF0YSI6eyJpZCI6Mjc2NzA5MDF9fQ==--e6692f7cd5805264ff43eff7d3b49b7877ba663d.gif
I understand that, but which DLL? What version of the .NET framework was it compiled for? I can't reproduce the issue unless you tell me what your trying to decompile.
This was likely fixed in the new decompiler engine (which just landed on the master branch).
ILSpy throws the following exception:
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void MSI.Framework.UI.Application.ApplicationBase::LoadKnownTypes() ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at ICSharpCode.Decompiler.ILAst.StateRangeAnalysis.EnsureLabelAtPos(Listb 16()
1 body, Int32& pos, Int32& bodyLength) at ICSharpCode.Decompiler.ILAst.AsyncDecompiler.AnalyzeStateMachine(ILBlock block) at ICSharpCode.Decompiler.ILAst.AsyncDecompiler.Run() at ICSharpCode.Decompiler.ILAst.AsyncDecompiler.RunStep1(DecompilerContext context, ILBlock method) at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, ILAstOptimizationStep abortBeforeStep) at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable
1 parameters) at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDefinition methodDef, DecompilerContext context, IEnumerable1 parameters) --- End of inner exception stack trace --- at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDefinition methodDef, DecompilerContext context, IEnumerable
1 parameters) at ICSharpCode.Decompiler.Ast.AstBuilder.CreateMethod(MethodDefinition methodDef) at ICSharpCode.Decompiler.Ast.AstBuilder.AddTypeMembers(TypeDeclaration astType, TypeDefinition typeDef) at ICSharpCode.Decompiler.Ast.AstBuilder.CreateType(TypeDefinition typeDef) at ICSharpCode.ILSpy.CSharpLanguage.DecompileType(TypeDefinition type, ITextOutput output, DecompilationOptions options) at ICSharpCode.ILSpy.TextView.DecompilerTextView.DecompileNodes(DecompilationContext context, ITextOutput textOutput) at ICSharpCode.ILSpy.TextView.DecompilerTextView.<>cDisplayClass17.