playMaker

Author Topic: Argument Exception breaking game  (Read 2018 times)

JaxWall

  • Playmaker Newbie
  • *
  • Posts: 1
Argument Exception breaking game
« on: December 01, 2015, 06:46:47 PM »
Hi there,

I am using Playmaker in conjunction with EasyTouch and Pool Manager. After implementing Pool Manager, I am getting an argument exception once I touch an object in my game that sends a global event. This is not a fatal error, but it breaks the functionality of my game because if the error is thrown, it also means all PlayMaker FSMs do not receive the global event.

I am really stumped over this one. I have replicated it on a separate user account on my computer with a clean clone of the git repo. My development partner does not seem to experience this error which could suggest it may local.

The error also happens inconsistently. I am not quite sure if this is a PlayMaker issue, but the error mentions PlayMaker, Pool Manager, and EasyTouch.

Here is the console log:

Code: [Select]
ArgumentException: An element with the same key already exists in the dictionary.

System.Collections.Generic.Dictionary`2[System.String,UnityEngine.Transform].Add (System.String key, UnityEngine.Transform value) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)

PathologicalGames.PrefabsDict._Add (System.String prefabName, UnityEngine.Transform prefab) (at Assets/Plugins/PathologicalGames/PoolManager/SpawnPool.cs:2100)

PathologicalGames.SpawnPool.CreatePrefabPool (PathologicalGames.PrefabPool prefabPool) (at Assets/Plugins/PathologicalGames/PoolManager/SpawnPool.cs:359)

PathologicalGames.SpawnPool.Spawn (UnityEngine.Transform prefab, Vector3 pos, Quaternion rot, UnityEngine.Transform parent) (at Assets/Plugins/PathologicalGames/PoolManager/SpawnPool.cs:560)

PathologicalGames.SpawnPool.Spawn (UnityEngine.Transform prefab, Vector3 pos, Quaternion rot) (at Assets/Plugins/PathologicalGames/PoolManager/SpawnPool.cs:596)

HutongGames.PlayMaker.Actions.PmtSpawn.DoSpawn () (at Assets/PlayMakerCustomActions/Path-o-logical/PoolManager2/PmtSpawn.cs:86)

HutongGames.PlayMaker.Actions.PmtSpawn.OnEnter () (at Assets/PlayMakerCustomActions/Path-o-logical/PoolManager2/PmtSpawn.cs:55)

HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex)

HutongGames.PlayMaker.FsmState.OnEnter ()

HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state)

HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState)

HutongGames.PlayMaker.Fsm.UpdateStateChanges ()

HutongGames.PlayMaker.Fsm.Start ()

HutongGames.PlayMaker.Fsm.ProcessEvent (HutongGames.PlayMaker.FsmEvent fsmEvent, HutongGames.PlayMaker.FsmEventData eventData)

HutongGames.PlayMaker.Fsm.BroadcastEvent (HutongGames.PlayMaker.FsmEvent fsmEvent, Boolean excludeSelf)

HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEventTarget eventTarget, HutongGames.PlayMaker.FsmEvent fsmEvent)

HutongGames.PlayMaker.Actions.SendEvent.OnEnter () (at Assets/PlayMaker/Actions/SendEvent.cs:39)

HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex)

HutongGames.PlayMaker.FsmState.OnEnter ()

HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state)

HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState)

HutongGames.PlayMaker.Fsm.UpdateStateChanges ()

HutongGames.PlayMaker.Fsm.DoTransition (HutongGames.PlayMaker.FsmTransition transition, Boolean isGlobal)

HutongGames.PlayMaker.Fsm.ProcessEvent (HutongGames.PlayMaker.FsmEvent fsmEvent, HutongGames.PlayMaker.FsmEventData eventData)

HutongGames.PlayMaker.Fsm.BroadcastEvent (HutongGames.PlayMaker.FsmEvent fsmEvent, Boolean excludeSelf)

HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEventTarget eventTarget, HutongGames.PlayMaker.FsmEvent fsmEvent)

HutongGames.PlayMaker.Actions.SendEvent.OnEnter () (at Assets/PlayMaker/Actions/SendEvent.cs:39)

HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex)

HutongGames.PlayMaker.FsmState.OnEnter ()

HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state)

HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState)

HutongGames.PlayMaker.Fsm.UpdateStateChanges ()

HutongGames.PlayMaker.Fsm.DoTransition (HutongGames.PlayMaker.FsmTransition transition, Boolean isGlobal)

HutongGames.PlayMaker.Fsm.ProcessEvent (HutongGames.PlayMaker.FsmEvent fsmEvent, HutongGames.PlayMaker.FsmEventData eventData)

HutongGames.PlayMaker.Fsm.BroadcastEvent (HutongGames.PlayMaker.FsmEvent fsmEvent, Boolean excludeSelf)

HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEventTarget eventTarget, HutongGames.PlayMaker.FsmEvent fsmEvent)

HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEventTarget eventTarget, System.String fsmEventName)

HutongGames.PlayMaker.Actions.SendEventByName.OnEnter () (at Assets/PlayMaker/Actions/SendEventByName.cs:37)

HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex)

HutongGames.PlayMaker.FsmState.OnEnter ()

HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state)

HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState)

HutongGames.PlayMaker.Fsm.UpdateStateChanges ()

HutongGames.PlayMaker.Fsm.DoTransition (HutongGames.PlayMaker.FsmTransition transition, Boolean isGlobal)

HutongGames.PlayMaker.Fsm.ProcessEvent (HutongGames.PlayMaker.FsmEvent fsmEvent, HutongGames.PlayMaker.FsmEventData eventData)

HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEventTarget eventTarget, HutongGames.PlayMaker.FsmEvent fsmEvent)

HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEvent fsmEvent)

HutongGames.PlayMaker.Actions.EasyTouchTouch.HandleOn_TouchUp (.Gesture gesture) (at Assets/EasyTouchBundle/EasyTouch/EasyTouchPlaymakerActions/EasyTouchTouch.cs:309)

EasyTouch.RaiseEvent (EventName evnt, .Gesture gesture) (at Assets/EasyTouchBundle/EasyTouch/Plugins/EasyTouch.cs:1361)

EasyTouch.CreateGesture (Int32 touchIndex, EventName message, .Finger finger, SwipeDirection swipe, Single swipeLength, Vector2 swipeVector) (at Assets/EasyTouchBundle/EasyTouch/Plugins/EasyTouch.cs:818)

EasyTouch.OneFinger (Int32 fingerIndex) (at Assets/EasyTouchBundle/EasyTouch/Plugins/EasyTouch.cs:744)

EasyTouch.Update () (at Assets/EasyTouchBundle/EasyTouch/Plugins/EasyTouch.cs:507)

Any support is appreciated! Please let me know if there is any more information I can provide.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: Argument Exception breaking game
« Reply #1 on: December 02, 2015, 01:02:39 AM »
Hi,

 it seems you are trying to create a pool, I doubt this is what you need for the usual workflow when using pool manager.

 can you confirm what you are trying to achieve?

Bye,

 Jean