Search Issue Tracker

By Design

Votes

0

Found in

5.2.3p2

Issue ID

750709

Regression

No

Project doesn't play with "UNetWeaver error: Exception :System.ArgumentException: An element with the same key already exists.."

Networking

-

Reproduction steps:
1. Open and play attached project with 5.2.3p2 version of unity (reproduces with any scene).

Actual result: project doesn't start because of errors:
Expected result: project start as usual.

(5.2.0p1, 5.2.3p2)
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

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

Additional notes:
* Might be related to case 701313.
* Could be caused by lambda expressions.
* Project doesn't work on 5.3.0f4 after API update.
* Might be fixed in 5.3.0f4.
* After cleaning up more than half scripts with 5.1.4p1 to start the project, issue disappears. But it doesn't reproduce on new versions either. Not sure if this is a regression.

Comments (3)

  1. IndieGa

    Feb 21, 2016 00:33

    We had the same error, and it is really a compiler error. We found that if the Assembly-CSharp.dll larger than 1 MB is not possible to read it. That is, when the amount of code that is greater than a threshold, the library is compiled crooked. So now we use this https://bitbucket.org/alexzzzz/unity-c-5.0-and-6.0-integration/overview. Eeverything works fine. I hope this helps someone. Good luck!

  2. ZimM

    Feb 20, 2016 19:56

    How could this be by design? This is a bug in Mono compiler:
    https://github.com/jbevain/cecil/issues/241

  3. kyubuns

    Feb 17, 2016 23:55

    I have same problem.
    Why is the issue priority 2??
    I cannot develop our product because of the issue.

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.