playMaker

Author Topic: Error Loading Action - Index was out of range  (Read 3509 times)

K

  • Playmaker Newbie
  • *
  • Posts: 2
Error Loading Action - Index was out of range
« on: December 05, 2018, 03:37:30 AM »
Hi there,

I encounter the following error when I attempted to change an enum field to FsmEnum. I appreciate if someone could help m(- -)m


Error Loading Action: [ActionName] : [ClassName] : Action
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <f2e6809acb14476a81f399aeb800f8f2>:0
  at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <f2e6809acb14476a81f399aeb800f8f2>:0
  at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <f2e6809acb14476a81f399aeb800f8f2>:0
  at HutongGames.PlayMaker.ActionData.GetFsmEnum (HutongGames.PlayMaker.Fsm fsm, System.Int32 paramIndex) [0x00000] in C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1749
  at HutongGames.PlayMaker.ActionData.LoadActionField (HutongGames.PlayMaker.Fsm fsm, System.Object obj, System.Reflection.FieldInfo field, System.Int32 paramIndex) [0x00241] in C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1067
  at HutongGames.PlayMaker.ActionData.LoadActionField (HutongGames.PlayMaker.Fsm fsm, System.Object obj, System.Reflection.FieldInfo field, System.Int32 paramIndex) [0x006e5] in C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1225
  at HutongGames.PlayMaker.ActionData.CreateAction (HutongGames.PlayMaker.ActionData+Context context, System.Int32 actionIndex) [0x0024f] in C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:942
UnityEngine.Debug:LogError(Object)
HutongGames.PlayMaker.ActionData:CreateAction(Context, Int32) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/ActionData.cs:947)
HutongGames.PlayMaker.ActionData:LoadActions(FsmState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/ActionData.cs:776)
HutongGames.PlayMaker.FsmState:LoadActions() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:123)
HutongGames.PlayMaker.Fsm:InitData() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1745)
HutongGames.PlayMakerEditor.FsmErrorChecker:DoCheckFsmForErrors(Fsm) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmGraphView.cs:2459)
HutongGames.PlayMakerEditor.FsmErrorChecker:DoCheckForErrors() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmGraphView.cs:2347)
HutongGames.PlayMakerEditor.FsmErrorChecker:Update() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmGraphView.cs:2332)
HutongGames.PlayMakerEditor.FsmEditor:Update() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmEditorGUILayout.cs:566)
HutongGames.PlayMakerEditor.FsmEditorWindow:Update() (at Assets/PlayMaker/Editor/FsmEditorWindow.cs:276)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()



Code snippet before and after change is as follows. I'm using Unity 2018.2.9f1 with PlayMaker 1.9.0

Code: [Select]
public class ClassName : FsmStateAction {
[System.Serializable]
public class SubClassName {
// vvv Before Change vvv //
public EnumClassName VariableName = EnumClassName.Value;
// ^^^ Before Change ^^^ //
// vvv After Change vvv //
[ObjectType(typeof(EnumClassName))]
public FsmEnum VariableName = new FsmEnum("name", typeof(EnumClassName), (int)EnumClassName.Value) { UseVariable = false };
// ^^^ After Change ^^^ //
...
}

[RequiredField, Tooltip("Tooltips")]
public SubClassName[] ArrayVariable;
...
}

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Error Loading Action - Index was out of range
« Reply #1 on: December 20, 2019, 01:30:03 PM »
Hey, got the same thing out all of a sudden, don't know what's going on.

Code: [Select]
Error Loading Action: Wait : HutongGames.PlayMaker.Actions.Wait : realTime
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: startIndex

  at System.BitConverter.ToBoolean (System.Byte[] value, System.Int32 startIndex) [0x0003e] in <d7ac571ca2d04b2f981d0d886fa067cf>:0

  at HutongGames.PlayMaker.FsmUtility+BitConverter.ToBoolean (System.Byte[] value, System.Int32 startIndex) [0x00000] in C:\Projects\Playmaker_1.9.1\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\FsmUtility.cs:832

  at HutongGames.PlayMaker.ActionData.LoadActionField (HutongGames.PlayMaker.Fsm fsm, System.Object obj, System.Reflection.FieldInfo field, System.Int32 paramIndex) [0x00399] in C:\Projects\Playmaker_1.9.1\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1107

  at HutongGames.PlayMaker.ActionData.CreateAction (HutongGames.PlayMaker.ActionData+Context context, System.Int32 actionIndex) [0x0024f] in C:\Projects\Playmaker_1.9.1\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:942

It appeared after doing a build.
Available for Playmaker work

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Error Loading Action - Index was out of range
« Reply #2 on: December 23, 2019, 08:03:30 AM »
Hi,

 uhm, can you report that via the  playmaker bug report? this will help gather infos on your unity, playmaker, and build setup.

 thanks

Bye,

 Jean

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Error Loading Action - Index was out of range
« Reply #3 on: December 23, 2019, 08:20:20 AM »
Ok, submitted  ;)
Available for Playmaker work

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Error Loading Action - Index was out of range
« Reply #4 on: December 23, 2019, 12:29:25 PM »
replied :)

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Error Loading Action - Index was out of range
« Reply #5 on: December 27, 2019, 05:29:49 AM »
Sent you the reply, tried both latest 2018.3 and 2018.4 with latest PM beta, it still errors. It doesn't affect anything as far as i can tell, but maybe it makes a problem somewhere where i can't see it. I've sent you the whole stacktrace.
Available for Playmaker work

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Error Loading Action - Index was out of range
« Reply #6 on: December 27, 2019, 07:07:50 AM »
Hi,

 Did not receive anything, is it via pm or email?

Bye,

 Jean

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Error Loading Action - Index was out of range
« Reply #7 on: December 27, 2019, 08:02:31 AM »
E-mail. Nevermind, here's the dump:

Error Loading Action: Wait : HutongGames.PlayMaker.Actions.Wait : realTime
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: startIndex

  at System.BitConverter.ToBoolean (System.Byte[] value, System.Int32 startIndex) [0x0003e] in <e1319b7195c343e79b385cd3aa43f5dc>:0

  at HutongGames.PlayMaker.FsmUtility+BitConverter.ToBoolean (System.Byte[] value, System.Int32 startIndex) [0x00000] in C:\Projects\Playmaker_1.9.1\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\FsmUtility.cs:832

  at HutongGames.PlayMaker.ActionData.LoadActionField (HutongGames.PlayMaker.Fsm fsm, System.Object obj, System.Reflection.FieldInfo field, System.Int32 paramIndex) [0x00399] in C:\Projects\Playmaker_1.9.1\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1124

  at HutongGames.PlayMaker.ActionData.CreateAction (HutongGames.PlayMaker.ActionData+Context context, System.Int32 actionIndex) [0x00260] in C:\Projects\Playmaker_1.9.1\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:959
0x000000014145CAF8 (Unity) StackWalker::GetCurrentCallstack
0x0000000141462FA6 (Unity) StackWalker::ShowCallstack
0x00000001413458FB (Unity) GetStacktrace
0x000000014014B318 (Unity) DebugStringToFile
0x00000001417D10FD (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x000000003F25DB10 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,string,UnityEngine.Object) (at ?)
0x000000003F25D763 (Mono JIT Code) [DebugLogHandler.cs:10] UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])  (at ?)
0x000000004F0D9C75 (Mono JIT Code) [Logger.cs:61] UnityEngine.Logger:Log (UnityEngine.LogType,object)  (at ?)
0x0000000072B97F39 (Mono JIT Code) [Debug.bindings.cs:117] UnityEngine.Debug:LogError (object)  (at ?)
0x000000004C87B593 (Mono JIT Code) [ActionData.cs:968] HutongGames.PlayMaker.ActionData:CreateAction (HutongGames.PlayMaker.ActionData/Context,int)  (at ?)
0x000000004C8799B3 (Mono JIT Code) [ActionData.cs:787] HutongGames.PlayMaker.ActionData:LoadActions (HutongGames.PlayMaker.FsmState)  (at ?)
0x000000004C8796BB (Mono JIT Code) [FsmState.cs:136] HutongGames.PlayMaker.FsmState:LoadActions ()  (at ?)
0x000000004C87391B (Mono JIT Code) [Fsm.cs:1815] HutongGames.PlayMaker.Fsm:InitData ()  (at ?)
0x0000000033A2B4E3 (Mono JIT Code) [PlayMakerFSM.cs:912] PlayMakerFSM:OnAfterDeserialize ()  (at ?)
0x000000004BC4D048 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) (at ?)
0x000007FEDB93B7B0 (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
0x000007FEDB8C1892 (mono-2.0-bdwgc) [object.c:2919] do_runtime_invoke
0x000007FEDB8CA88F (mono-2.0-bdwgc) [object.c:2966] mono_runtime_invoke
0x0000000140C38D4A (Unity) scripting_method_invoke
0x0000000140C28F9A (Unity) ScriptingInvocation::Invoke
0x0000000140C412AF (Unity) InvokeMethod<SafeBinaryRead>
0x0000000140BEAAF1 (Unity) TransferScriptingObject<StreamedBinaryRead>
0x0000000140BFF622 (Unity) MonoBehaviour::VirtualRedirectTransfer
0x0000000140CA10A5 (Unity) SerializedFile::ReadObject
0x0000000140CA0100 (Unity) PersistentManager::ReadAndActivateObjectThreaded
0x0000000140C9DA95 (Unity) PersistentManager::LoadRemainingPreallocatedObjects
0x0000000140C9CE45 (Unity) PersistentManager::LoadFileCompletelyThreaded
0x00000001409DBDC5 (Unity) LoadSceneOperation::Perform
0x00000001409DD9DE (Unity) PreloadManager::Run
0x00000001409DDBAE (Unity) PreloadManager::Run
0x0000000140AABB50 (Unity) Thread::RunThreadWrapper
0x00000000776559CD (kernel32) BaseThreadInitThunk
0x000000007778A561 (ntdll) RtlUserThreadStart
Available for Playmaker work

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Error Loading Action - Index was out of range
« Reply #8 on: January 14, 2020, 01:51:28 PM »
Any news on this one? Some more appeared too:

Code: [Select]
Error Loading Action: State 1 : HutongGames.PlayMaker.Actions.SetProperty : targetProperty
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

  at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <d7ac571ca2d04b2f981d0d886fa067cf>:0

  at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <d7ac571ca2d04b2f981d0d886fa067cf>:0

  at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <d7ac571ca2d04b2f981d0d886fa067cf>:0

  at HutongGames.PlayMaker.ActionData.GetFsmProperty (HutongGames.PlayMaker.Fsm fsm, System.Int32 paramIndex) [0x00000] in C:\Projects\Playmaker_1.9.1\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1872

  at HutongGames.PlayMaker.ActionData.LoadActionField (HutongGames.PlayMaker.Fsm fsm, System.Object obj, System.Reflection.FieldInfo field, System.Int32 paramIndex) [0x00279] in C:\Projects\Playmaker_1.9.1\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1092

  at HutongGames.PlayMaker.ActionData.CreateAction (HutongGames.PlayMaker.ActionData+Context context, System.Int32 actionIndex) [0x00260] in C:\Projects\Playmaker_1.9.1\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:959

Code: [Select]
Error Loading Action: State 1 : HutongGames.PlayMaker.Actions.SetProperty : everyFrame
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

  at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <d7ac571ca2d04b2f981d0d886fa067cf>:0

  at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <d7ac571ca2d04b2f981d0d886fa067cf>:0

  at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <d7ac571ca2d04b2f981d0d886fa067cf>:0

  at HutongGames.PlayMaker.ActionData.LoadActionField (HutongGames.PlayMaker.Fsm fsm, System.Object obj, System.Reflection.FieldInfo field, System.Int32 paramIndex) [0x00399] in C:\Projects\Playmaker_1.9.1\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1124

  at HutongGames.PlayMaker.ActionData.CreateAction (HutongGames.PlayMaker.ActionData+Context context, System.Int32 actionIndex) [0x00260] in C:\Projects\Playmaker_1.9.1\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:959

Code: [Select]
Error Loading Action: State 1 : HutongGames.PlayMaker.Actions.SetProperty : debug
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

  at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <d7ac571ca2d04b2f981d0d886fa067cf>:0

  at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <d7ac571ca2d04b2f981d0d886fa067cf>:0

  at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <d7ac571ca2d04b2f981d0d886fa067cf>:0

  at HutongGames.PlayMaker.ActionData.LoadActionField (HutongGames.PlayMaker.Fsm fsm, System.Object obj, System.Reflection.FieldInfo field, System.Int32 paramIndex) [0x00399] in C:\Projects\Playmaker_1.9.1\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1124

  at HutongGames.PlayMaker.ActionData.CreateAction (HutongGames.PlayMaker.ActionData+Context context, System.Int32 actionIndex) [0x00260] in C:\Projects\Playmaker_1.9.1\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:959
Available for Playmaker work

dt1000

  • Playmaker Newbie
  • *
  • Posts: 37
Re: Error Loading Action - Index was out of range
« Reply #9 on: January 15, 2020, 12:07:00 AM »
I don't know if this is a similar issue to the one I am encountering, but you might try the fix here:
https://hutonggames.com/playmakerforum/index.php?topic=21557.0

It may or may not help, but it's worth a try.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Error Loading Action - Index was out of range
« Reply #10 on: January 16, 2020, 04:04:26 AM »
Thanks, i'll give it a go.
Available for Playmaker work

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Error Loading Action - Index was out of range
« Reply #11 on: February 08, 2020, 04:35:43 PM »
Nah, didn't do anything. I'll just put it on ignore in the console.
Available for Playmaker work