Search Issue Tracker

Won't Fix

Votes

3

Found in

2017.1.1f1

Issue ID

976779

Regression

No

[ScriptUpdater] MDB file is not being created when reimporting DLL and PDB and System.IndexOutOfRangeException is thrown

Mono

-

To reproduce:
1. Open project attached by the user
2. In the project, window go to Plugins/Nuget
3. Find FOLDER_NAME (Edits below) folder, right click on it and reimport

Expected result: MDB file should be created, no errors in the console
Actual result: MDB file is not created, exception is being thrown in the console

Reproduced with: 5.6.4p4, 2017.1.2p4
Newer versions (2017.2.1f1, 2017.3.0f3, 2018.1.0a7) also reproduce the issue (MDB is not being created) but either produce a not related exception or don't throw exceptions at all.

Comments (3)

  1. gtzpower

    Mar 29, 2018 16:22

    Forgot to mention, Unity 2017.3.1

  2. gtzpower

    Mar 29, 2018 16:21

    I too am experiencing this issue. I have 2 dll's we shall name them a.dll and b.dll (b.dll references a.dll). When I import both, b.dll seems to reliably produce a .mdb file. However, a.dll never generates a .mdb file. If I remove b.dll, and try reimporting a.dll, still no .mdb. If I delete both files then only build a.dll, a .mdb DOES generate for a.dll.

    a.dll works perfectly fine other than this. I am working around the issue by running a post-build event to generate the .mdb using pdb2mdb for the time being.

    So the process seems to break down when both files are included. This is the exception I get on a.dll when trying to import it.

    System.InvalidOperationException: Operation is not valid due to the current state of the object.
    at Mono.Cecil.ModuleDefinition.ReadSymbols (Mono.Cecil.Cil.ISymbolReader reader) [0x0002f] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at Mono.Cecil.ModuleReader.ReadSymbols (Mono.Cecil.ModuleDefinition module, Mono.Cecil.ReaderParameters parameters) [0x0004a] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at Mono.Cecil.ModuleReader.CreateModule (Mono.Cecil.PE.Image image, Mono.Cecil.ReaderParameters parameters) [0x00081] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at Mono.Cecil.ModuleDefinition.ReadModule (Mono.Disposable`1[T] stream, System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0000d] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0006c] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at AssemblyUpdater.Core.AssemblyUpdaterContext.ReadAssembly (System.String assemblyPath, APIUpdater.Framework.Log.IAPIUpdaterListener listener, System.IO.FileAccess mode, System.String[] searchPaths) [0x00071] in <3f368bacb6c34f4db5fe7e90570f303a>:0
    at AssemblyUpdater.Core.AssemblyUpdaterContext.From (System.String assemblyPath, APIUpdater.Framework.Configuration.IConfigurationProvider configuration, System.String[] assemblySearchPaths, AssemblyUpdater.Core.UpdaterMode mode, APIUpdater.Framework.Log.IAPIUpdaterListener listener) [0x0002b] in <3f368bacb6c34f4db5fe7e90570f303a>:0
    at AssemblyUpdater.Core.AssemblyUpdaterContext.From (System.String assemblyPath, System.String[] assemblySearchPaths, AssemblyUpdater.Core.UpdaterMode mode, APIUpdater.Framework.Log.IAPIUpdaterListener listener) [0x00001] in <3f368bacb6c34f4db5fe7e90570f303a>:0
    at AssemblyUpdater.Application.Program.CheckForObsoleteAPIUsage (AssemblyUpdater.Application.CommandLineSpec config) [0x00013] in <3f368bacb6c34f4db5fe7e90570f303a>:0
    at AssemblyUpdater.Application.Program.Main (System.String[] args) [0x00057] in <3f368bacb6c34f4db5fe7e90570f303a>:0
    UnityEditor.Scripting.APIUpdaterHelper:DoesAssemblyRequireUpgrade(String)

  3. faviann

    Feb 19, 2018 16:50

    More than half a year on this issue and no apparent progress unfortunately

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.