out of sync
Options
vampir26
✭
Hi
I get this error:
InvalidOperationException: out of sync
System.Collections.Generic.Dictionary`2+Enumerator[System.String,Bomb].VerifyState () (at /Applications/buildAgent/work/84669f285f6a667f/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:912)
System.Collections.Generic.Dictionary`2+Enumerator[System.String,Bomb].MoveNext () (at /Applications/buildAgent/work/84669f285f6a667f/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:835)
System.Collections.Generic.Dictionary`2+ValueCollection+Enumerator[System.String,Bomb].MoveNext () (at /Applications/buildAgent/work/84669f285f6a667f/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:1145)
ServerScript.Update () (at Assets/_Scripts/ServerScript.cs:26)
I have no idea, what I'm doing wrong and I cannot find some information about this error.
Can somebody please help me?
I get this error:
InvalidOperationException: out of sync
System.Collections.Generic.Dictionary`2+Enumerator[System.String,Bomb].VerifyState () (at /Applications/buildAgent/work/84669f285f6a667f/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:912)
System.Collections.Generic.Dictionary`2+Enumerator[System.String,Bomb].MoveNext () (at /Applications/buildAgent/work/84669f285f6a667f/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:835)
System.Collections.Generic.Dictionary`2+ValueCollection+Enumerator[System.String,Bomb].MoveNext () (at /Applications/buildAgent/work/84669f285f6a667f/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:1145)
ServerScript.Update () (at Assets/_Scripts/ServerScript.cs:26)
I have no idea, what I'm doing wrong and I cannot find some information about this error.
Can somebody please help me?
0
Comments
-
This is not networking related at all but in case you need some guidance, let me answer this:
This is the exception (error) you get:
InvalidOperationException: out of sync
This is where it happens (the line number won't help you much, cause you can't access this piece of code):
Generic.Dictionary`2+Enumerator[System.String,Bomb].VerifyState ()[...] /class/corlib/System.Collections.Generic/Dictionary.cs:912
This is from where it was called (you can actually open this file and line in your editor and check what it does):
ServerScript.Update () (at Assets/_Scripts/ServerScript.cs:26
So, your script ServerScript is using a Dictionary and iterating over that (using the Enumerator). That fails.
Using this search "c# dictionary out of sync" gives you some idea of what happens.0 -
Thank you very much!
With your help I was able to solve the problem.
There is a good link for people with the same problem:
http://software.tavlikos.com/2010/12/20 ... ictionary/
cya0