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

ILSpy crash on save: some issues during assemblies lookup #1192

Closed
greenozon opened this Issue Jun 30, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@greenozon

greenozon commented Jun 30, 2018

ILSpy version 3.2.0.3850-rc

drag-n-drop only the UI assembly (not two, just this one)
CTRL+S
crash

---------------------------
Sorry, we crashed
---------------------------
System.IO.FileNotFoundException: Could not load file or assembly ......


   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)

   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)

   at System.Type.GetType(String typeName, Boolean throwOnError)

   at System.Resources.ResourceReader.FindType(Int32 typeIndex)

   at System.Resources.ResourceReader.DeserializeObject(Int32 typeIndex)

   at System.Resources.ResourceReader.LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)

   at System.Resources.ResourceReader.GetValueForNameIndex(Int32 index)

   at System.Resources.ResourceSet.ReadResources()

   at ICSharpCode.Decompiler.CSharp.WholeProjectDecompiler.GetEntries(Stream stream, IEnumerable`1& entries)

   at ICSharpCode.Decompiler.CSharp.WholeProjectDecompiler.<WriteResourceFilesInProject>d__23.MoveNext()

   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)

   at ICSharpCode.Decompiler.CSharp.WholeProjectDecompiler.DecompileProject(ModuleDefinition moduleDefinition, String targetDirectory, TextWriter projectFileWriter, CancellationToken cancellationToken)

   at ICSharpCode.ILSpy.CSharpLanguage.DecompileAssembly(LoadedAssembly assembly, ITextOutput output, DecompilationOptions options)

   at ICSharpCode.ILSpy.TreeNodes.AssemblyTreeNode.Decompile(Language language, ITextOutput output, DecompilationOptions options)

   at ICSharpCode.ILSpy.TextView.DecompilerTextView.DecompileNodes(DecompilationContext context, ITextOutput textOutput)

   at ICSharpCode.ILSpy.TextView.DecompilerTextView.<>c__DisplayClass45_0.<SaveToDiskAsync>b__0()

   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

   at System.Threading.ThreadHelper.ThreadStart()



WRN: Assembly binding logging is turned OFF.

To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging.

To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


---------------------------
OK   
---------------------------

il_crash2

target: https://www.sendspace.com/file/ij5ier

Note: if you remove out the 2nd dll (eg put it to another dir) the crash will not happen (some other, already reported assert will be shown instead)

Expected behavior: not crash, but rather error/warning box and continue decompiling (or just silence)

@dgrunwald dgrunwald closed this in c17c3c7 Jul 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment