Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Compiling Errors

Discussion in '5.1 Beta' started by Don-Gray, Apr 19, 2015.

  1. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    What do I do about these two compiling errors?

    UNetWeaver error: Exception :System.ArgumentException: An element with the same key already exists in the dictionary.
    at System.Collections.Generic.Dictionary`2[System.UInt32,System.UInt32].Add (UInt32 key, UInt32 value) [0x0007e] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404
    at Mono.Cecil.MetadataSystem.SetReverseNestedTypeMapping (UInt32 nested, UInt32 declaring) [0x00000] in <filename unknown>:0
    at Mono.Cecil.MetadataReader.AddNestedMapping (UInt32 declaring, UInt32 nested) [0x00000] in <filename unknown>:0
    at Mono.Cecil.MetadataReader.InitializeNestedTypes () [0x00000] in <filename unknown>:0
    at Mono.Cecil.MetadataReader.InitializeTypeDefinitions () [0x00000] in <filename unknown>:0
    at Mono.Cecil.MetadataReader.ReadTypes () [0x00000] in <filename unknown>:0
    at Mono.Cecil.ModuleDefinition.<get_Types>b__8 (Mono.Cecil.ModuleDefinition _, Mono.Cecil.MetadataReader reader) [0x00000] in <filename unknown>:0
    at Mono.Cecil.ModuleDefinition.Read[ModuleDefinition,TypeDefinitionCollection] (Mono.Cecil.ModuleDefinition item, System.Func`3 read) [0x00000] in <filename unknown>:0
    at Mono.Cecil.ModuleDefinition.get_Types () [0x00000] in <filename unknown>:0
    at Unity.UNetWeaver.Weaver.Weave (System.String assName, IEnumerable`1 dependencies, System.String unityEngineDLLPath, System.String unityUNetDLLPath, System.String outputDir) [0x00049] in C:\buildslave\unity\build\Extensions\UNetHLAPI\UNetWeaver\UNetWeaver.cs:1455
    at Unity.UNetWeaver.Weaver.WeaveAssemblies (IEnumerable`1 assemblies, IEnumerable`1 dependencies, System.String outputDir, System.String unityEngineDLLPath, System.String unityUNetDLLPath) [0x00060] in C:\buildslave\unity\build\Extensions\UNetHLAPI\UNetWeaver\UNetWeaver.cs:1531
    UnityEngine.Debug:LogError(Object)
    Unity.UNetWeaver.Log:Error(String) (at C:/buildslave/unity/build/Extensions/UNetHLAPI/UNetWeaver/Program.cs:19)
    Unity.UNetWeaver.Weaver:WeaveAssemblies(IEnumerable`1, IEnumerable`1, String, String, String) (at C:/buildslave/unity/build/Extensions/UNetHLAPI/UNetWeaver/UNetWeaver.cs:1538)
    Unity.UNetWeaver.Program:process(String, String, String, String[], String[], Action`1, Action`1) (at C:/buildslave/unity/build/Extensions/UNetHLAPI/UNetWeaver/Program.cs:33)
    UnityEditor.Scripting.Serialization.Weaver:WeaveUnetFromEditor(String, String, String, String)

    and


    Failure generating network code.
    UnityEditor.Scripting.Serialization.Weaver:WeaveUnetFromEditor(String, String, String, String)

     
  2. larus

    larus

    Unity Technologies

    Joined:
    Oct 12, 2007
    Posts:
    280
    These two are related, could you send a bug with the bug reporter and the project attached? Need to reproduce this locally to see exactly what is up. Send me the bug number directly so I'll have it for sure (you can PM it to me).
     
  3. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Yeah, if I can still produce it after trimming down the 105 GB project.
    Thanks!

    :{)
     
  4. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Any ideas on what to take out (besides textures and videos) and what to leave intact?
    I create a new project but nothing out of the ordinary, no errors.
     
  5. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    After updating the project to 5.1.0b6 the error is resolved.
     
  6. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Well, it's back now!
    And after upgrading my project so I cannot go into play mode.
     
  7. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    Ouch, hope you made a backup of that whopping project!
     
  8. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Yes, I have many backups, thanks.
    The main problem I see is that I've done work in 5.1b6 and now that work is locked until I can resolve this.
    After being on the same project for almost 6 years this isn't really all that new, just frustrating.

    :)
     
  9. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    566
    I get a different UNetWeaver error after replacing the compiler included in the Unity installation with Roslyn.

    UNetWeaver error: Exception :Microsoft.Cci.Pdb.PdbDebugException: Unknown custom metadata item kind: 6

    Specifically it happens when using the bracket operator in a local variable, ie. void Test(){ int[] a };

    Don Gray, since the problem went away for a while after you installed a new Unity beta, maybe something or someone is messing around with the compiler? Could maybe be caused by file corruption due to a failing hard disk.
     
  10. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Pretty sure none of these things, I live and work alone on this, my hard drive is new ssd.
    Wonder if all the strange meta data issues people see are related.
     
  11. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Since I've never been successful at stripping the project to a reasonable size and things still working,
    or errors being produced I reverted back to 5.0.f4 and all seems well.
     
  12. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    5.1.0f1 does not display the problem, if anything changes will post here.
     
  13. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    566
    So your problem happened with beta 5 and beta 6, but not beta 4 and RC 1?
     
  14. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Sorry, short term memory, been looking at betas for too long.
    I know it did work in some beta in this round (5.1) but confused at exactly which one(s).
    One thing I did find that was quite helpful, the reversion from a beta release back to 5.0.0f4 seems to have been without incident.
    However, the upgrade from 5.0.0f4 to 5.1.0f1 took a very long time, a good 10 hours, which seems excessive, when it usually takes about 45 min - an hour from version to version on the project.
    I am just starting up for today (tonight) and after finishing installing the latest win 10 prerelease (second ssd) I will be testing further on the win 8.1 drive.
     
  15. Immanuel-Scholz

    Immanuel-Scholz

    Joined:
    Jun 8, 2013
    Posts:
    221
    I get the same error, reproducible but also in a huge project ("Only" about 40gig here ;)). So I would have to strip down too.. :(

    Are you still interested in a test case, Iarus?

    Oh, and its 5.1.0f2
     
  16. Immanuel-Scholz

    Immanuel-Scholz

    Joined:
    Jun 8, 2013
    Posts:
    221
    I've uploaded a bug report with a stripped project. Case 701313.
     
    Don-Gray likes this.
  17. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Glad you did, Immanuel!
    I'm finding this intermittently, upon launch, when importing third party packages.
    I can also get it to go away by removing third party packages, sometimes.
    Wondering if it is triggered by some internal networking mumbo-jumbo as these things (launch and import/export touch it).

    Please, do send your case number to Larus via PM!
    I am creating another bug report that will mention your case number and will send that case number to him also.

    Thanks!
    Don
     
    Dream_Iverson likes this.
  18. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Mine is:

    Case 701834