playMaker

Author Topic: ArgumentException: An element with the same key already exists in the dictionary  (Read 8951 times)

Igmon

  • Playmaker Newbie
  • *
  • Posts: 5
I'm not exactly sure how I manage to have this error, but I believe it has something to do with importing globals via PlayMaker->Tools->Import Globals.

It may have been that I already have a defined event that is the exact name to what is being imported.

Kind of annoying to see that error, though it doesn't seem to break anything. Would be cool to somehow remedy it, though I'm not sure how.

I'm currently using PlayMaker 1.6.0 with the latest Unity3D 4.

This is the error I get each time the project view is changed (when creating new assets, modifying):

ArgumentException: An element with the same key already exists in the dictionary.
System.Collections.Generic.Dictionary`2[FsmTemplate,System.String].Add (.FsmTemplate key, System.String value) (at /Applications/buildAgent/work/84669f285f6a667f/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
HutongGames.PlayMakerEditor.FsmEditorUtility.AddTemplateToCategory (.FsmTemplate template, System.String category)
HutongGames.PlayMakerEditor.FsmEditorUtility.CategorizeTemplates ()
HutongGames.PlayMakerEditor.FsmEditorUtility.BuildTemplateList ()
HutongGames.PlayMakerEditor.FsmEditor.OnProjectChange ()
FsmEditorWindow.OnProjectChange () (at Assets/PlayMaker/Editor/FsmEditorWindow.cs:338)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/84669f285f6a667f/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/84669f285f6a667f/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Applications/buildAgent/work/84669f285f6a667f/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/BuildAgent/work/7535de4ca26c26ac/Editor/Mono/GUI/DockArea.cs:234)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/BuildAgent/work/7535de4ca26c26ac/Editor/Mono/GUI/DockArea.cs:227)
UnityEditor.HostView.OnProjectChange () (at C:/BuildAgent/work/7535de4ca26c26ac/Editor/Mono/GUI/DockArea.cs:177)
UnityEditor.DockArea:OnGUI()

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
What version of Playmaker do you have? There was a bug like this in an older version. The latest version is 1.6.1.

Igmon

  • Playmaker Newbie
  • *
  • Posts: 5
oh, heh, I just posted the version, but from the about info, it's 1.6.0.f5

Gonna go download the package now and reimport.

Thanks!

Igmon

  • Playmaker Newbie
  • *
  • Posts: 5
Cool, looks like it's gone now! I didn't know there's a new version.