Mirror: Stack overflow in the weaver

reproduce: import uMMORPG from the asset store. (doesn’t happen when I import it from my hard drive)

bug: Mirror.Weaver error: Exception :: The requested operation caused a stack overflow. at (wrapper managed-to-native) System.GC._SuppressFinalize(object) at System.GC.SuppressFinalize (System.Object obj) [0x0000e] in <d7ac571ca2d04b2f981d0d886fa067cf>:0 at System.IO.Stream.Close () [0x00007] in <d7ac571ca2d04b2f981d0d886fa067cf>:0 at System.IO.Stream.Dispose () [0x00000] in <d7ac571ca2d04b2f981d0d886fa067cf>:0 at Mono.Disposable1[T].Dispose () [0x00015] in <cdc17f3d0a5e40c9ac948b7bd952fda8>:0 at Mono.Cecil.PE.Image.Dispose () [0x00000] in <cdc17f3d0a5e40c9ac948b7bd952fda8>:0 at Mono.Cecil.ModuleDefinition.Dispose () [0x00008] in <cdc17f3d0a5e40c9ac948b7bd952fda8>:0 at Mono.Cecil.AssemblyDefinition.Dispose () [0x00008] in <cdc17f3d0a5e40c9ac948b7bd952fda8>:0 at Mirror.Weaver.Weaver.Weave (System.String assName, System.Collections.Generic.IEnumerable1[T] dependencies, Mono.Cecil.IAssemblyResolver assemblyResolver, System.String unityEngineDLLPath, System.String mirrorNetDLLPath, System.String outputDir) [0x002ce] in /ummorpg_as/Assets/uMMORPG/Plugins/Mirror/Editor/Weaver/Weaver.cs:633 at Mirror.Weaver.Weaver.WeaveAssemblies (System.Collections.Generic.IEnumerable1[T] assemblies, System.Collections.Generic.IEnumerable1[T] dependencies, Mono.Cecil.IAssemblyResolver assemblyResolver, System.String outputDir, System.String unityEngineDLLPath, System.String mirrorNetDLLPath) [0x00046] in /ummorpg_as/Assets/uMMORPG/Plugins/Mirror/Editor/Weaver/Weaver.cs:652 UnityEngine.Debug:LogError(Object) Mirror.Weaver.CompilationFinishedHook:HandleError(String) (at Assets/uMMORPG/Plugins/Mirror/Editor/Weaver/CompilationFinishedHook.cs:46) Mirror.Weaver.Log:Error(String) (at Assets/uMMORPG/Plugins/Mirror/Editor/Weaver/Program.cs:20) Mirror.Weaver.Weaver:WeaveAssemblies(IEnumerable1, IEnumerable1, IAssemblyResolver, String, String, String) (at Assets/uMMORPG/Plugins/Mirror/Editor/Weaver/Weaver.cs:660) Mirror.Weaver.Program:Process(String, String, String, String[], String[], Action1, Action1) (at Assets/uMMORPG/Plugins/Mirror/Editor/Weaver/Program.cs:35) Mirror.Weaver.CompilationFinishedHook:OnCompilationFinished(String, CompilerMessage[]) (at Assets/uMMORPG/Plugins/Mirror/Editor/Weaver/CompilationFinishedHook.cs:204) UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:TickCompilationPipeline(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget)

Weaving failed for: Library/ScriptAssemblies/Assembly-CSharp.dll UnityEngine.Debug:LogError(Object) Mirror.Weaver.CompilationFinishedHook:OnCompilationFinished(String, CompilerMessage[]) (at Assets/uMMORPG/Plugins/Mirror/Editor/Weaver/CompilationFinishedHook.cs:212) UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:TickCompilationPipeline(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21 (6 by maintainers)

Commits related to this issue

Most upvoted comments

the recent compilationfinished change includes these dependencies (and more) when weaving regularly: image

when weaving first time after importing a new package, it includes none of the MonoBeleedingEdge, but those instead: image

ignoring “NetStandard” folder dependencies fixes it.

how to reproduce: open ummorpg project. right click assets folder, export package. open an empty project. import asset package.

Not a fix, but a workaround: Close unity, delete the Library folder and reopen the project in unity