Question

index was outside bounds of array
While running automation the following error message showing up. Index was outside bounds of array
How can we resolve it?
-
Like (0)
-

Can you provide the details of the exception stack?
Did the error occurred during execution of user-defined routine or aggregate "pr_read_from_stream"?

it's happening while automation retrieving the data from PDF( user-defined routine).it showing same error message to different records

Where is the error originating from - the application or the automation/runtime?
Do you have the full exception stack from the RuntimeLog?

Do you have any reference to list item with hardcoded index specified?
Index Out Of Bound exception occurs only when an array is referenced with index that doesn't have a value at that time of reference.
So in PEGA, if such PageList or any array type reference is made with index, if there is no value in memory, the exception will occur.
Check the full stack trace or see if you can identify the exception cause in tracer.

*********************************************
Exception Type: System.Reflection.TargetInvocationException
Message: "Exception has been thrown by the target of an invocation."
Data: IDictionary (System.Collections.ListDictionaryInternal) with 0 items
TargetSite: System.Object InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
HelpLink: NULL
Source: "mscorlib"
HResult: -2146232828
*********************************************
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at OpenSpan.Utils.SafeInvokeHelper.Invoke(Object baseInstance, Object instance, MethodInfo methodInfo, Object[] args)
at OpenSpan.Automation.EventLink.Execute(Object sender, ExecutionEventArgs e)
*********************************************
*********************************************
Exception Type: System.Reflection.TargetInvocationException
Message: "Exception has been thrown by the target of an invocation."
Data: IDictionary (System.Collections.ListDictionaryInternal) with 0 items
TargetSite: System.Object InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
HelpLink: NULL
Source: "mscorlib"
HResult: -2146232828
*********************************************
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at OpenSpan.Utils.SafeInvokeHelper.Invoke(Object baseInstance, Object instance, MethodInfo methodInfo, Object[] args)
at OpenSpan.Automation.EventLink.Execute(Object sender, ExecutionEventArgs e)
*********************************************
Exception Type: System.Reflection.TargetInvocationException
Message: "Exception has been thrown by the target of an invocation."
Data: IDictionary (System.Collections.ListDictionaryInternal) with 0 items
TargetSite: System.Object InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
HelpLink: NULL
Source: "mscorlib"
HResult: -2146232828
*********************************************
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at OpenSpan.Utils.SafeInvokeHelper.Invoke(Object baseInstance, Object instance, MethodInfo methodInfo, Object[] args)
at OpenSpan.Automation.ConnectableMethod.ExecuteInvoke(Object instance, Object[] parameters, ExecutionEventArgs e)
at OpenSpan.Automation.ConnectableMethod.DoCustomWork(Object instance, Hashtable inputValueHash, Hashtable outputValueHash, ExecutionEventArgs e)
at OpenSpan.Automation.ConnectableWorker.DoWork(Object sender, ExecutionEventArgs executionArgs)
*********************************************
Exception Type: System.IndexOutOfRangeException
Message: "Index was outside the bounds of the array."
Data: IDictionary (System.Collections.ListDictionaryInternal) with 0 items
TargetSite: Void InternalGetReference(Void*, Int32, Int32*)
HelpLink: NULL
Source: "mscorlib"
HResult: -2146233080
*********************************************
at System.Array.InternalGetReference(Void* elemRef, Int32 rank, Int32* pIndices)
at System.Array.GetValue(Int32 index)
INFO | 2019-07-18 11:05:01,799 | 7 | 7 | 4356 | MTA | Automation | F_DrctAsrFeeRevFilterData | labelHost6-65354168 | GoToLabel: Exception invoking method - Error executing link in Automation: F_DrctAsrFeeRevFilterData - From: F_DrctAsrFeeRevFilterData.stringUtils1.Split() To: F_DrctAsrFeeRevFilterData.strArrayPDFLine2.GetValue()
INFO | 2019-07-18 11:05:01,815 | 7 | 7 | 4356 | MTA | Automation | F_DrctAsrFeeRevFilterData | labelHost3-26998997 | GoToLabel: Exception invoking method - Error executing link in Automation: F_DrctAsrFeeRevFilterData - From: F_DrctAsrFeeRevFilterData.stringUtils1.Split() To: F_DrctAsrFeeRevFilterData.strArrayPDFLine2.GetValue()
INFO | 2019-07-18 11:05:01,835 | 7 | 7 | 4356 | MTA | Automation | F_DrctAsrFeeRevFilterData | labelHost2-56309765 | GoToLabel: Exception invoking method - Error executing link in Automation: F_DrctAsrFeeRevFilterData - From: F_DrctAsrFeeRevFilterData.stringUtils1.Split() To: F_DrctAsrFeeRevFilterData.strArrayPDFLine2.GetValue()
INFO | 2019-07-18 11:05:01,846 | 7 | 7 | 4356 | MTA | ExecutionTracker | | | UnRegisterArgs: cee77281-f599-4c2b-8fe8-8593222c9b5f 23230789
INFO | 2019-07-18 11:05:01,856 | 7 | 7 | 4356 | MTA | ExecutionTracker | | | UnRegisterArgs: a0ecbc06-7e3c-49ea-9274-195992566013 29064971
INFO | 2019-07-18 11:05:01,867 | 7 | 7 | 4356 | MTA | ExecutionTracker | | | UnRegisterArgs: db41ad2d-6528-4bd4-933d-3b1fd33b71d6 2359753
INFO | 2019-07-18 11:05:01,876 | 7 | 7 | 4356 | MTA | ExecutionTracker | | | UnRegisterArgs: 55c3b905-c144-4181-b4ec-5e03540104a2 24474730
INFO | 2019-07-18 11:05:01,886 | 7 | 7 | 4356 | MTA | ExecutionTracker | | | UnRegisterArgs: 55c3b905-c144-4181-b4ec-5e03540104a2 24113990
INFO | 2019-07-18 11:05:01,896 | 7 | 7 | 4356 | MTA | Automation | F_DrctAsrFeeRevMain | F_DrctAsrFeeRevFilterData-34664795 | Execute: Exception invoking method - Error executing link in Automation: F_DrctAsrFeeRevFilterData - From: F_DrctAsrFeeRevFilterData.stringUtils1.Split() To: F_DrctAsrFeeRevFilterData.strArrayPDFLine2.GetValue()
INFO | 2019-07-18 11:05:01,906 | 7 | 7 | 4356 | MTA | ExecutionTracker | | | UnRegisterArgs: a0ecbc06-7e3c-49ea-9274-195992566013 29064971
INFO | 2019-07-18 11:05:01,916 | 7 | 7 | 4356 | MTA | ExecutionTracker | | | UnRegisterArgs: db41ad2d-6528-4bd4-933d-3b1fd33b71d6 2359753
INFO | 2019-07-18 11:05:01,925 | 7 | 7 | 4356 | MTA | ExecutionTracker | | | UnRegisterArgs: 55c3b905-c144-4181-b4ec-5e03540104a2 24474730
INFO | 2019-07-18 11:05:01,935 | 7 | 7 | 4356 | MTA | ExecutionTracker | | | UnRegisterArgs: 55c3b905-c144-4181-b4ec-5e03540104a2 24113990
INFO | 2019-07-18 11:05:01,944 | 7 | 7 | 4356 | MTA | Automation | F_DrctAsrMain | F_DrctAsrFeeRevMain-3303966 | Execute: Exception invoking method - Error executing link in Automation: F_DrctAsrFeeRevFilterData - From: F_DrctAsrFeeRevFilterData.stringUtils1.Split() To: F_DrctAsrFeeRevFilterData.strArrayPDFLine2.GetValue()
INFO | 2019-07-18 11:05:01,954 | 7 | 7 | 4356 | MTA | Automation | F_DrctAsrMain | labelHost4-19304939 | GoToLabel: Exception invoking method - Error executing link in Automation: F_DrctAsrFeeRevFilterData - From: F_DrctAsrFeeRevFilterData.stringUtils1.Split() To: F_DrctAsrFeeRevFilterData.strArrayPDFLine2.GetValue()
INFO | 2019-07-18 11:05:01,964 | 7 | 7 | 4356 | MTA | Automation | F_DrctAsrMain | labelHost5-31331930 | GoToLabel: Exception invoking method - Error executing link in Automation: F_DrctAsrFeeRevFilterData - From: F_DrctAsrFeeRevFilterData.stringUtils1.Split() To: F_DrctAsrFeeRevFilterData.strArrayPDFLine2.GetValue()
INFO | 2019-07-18 11:05:01,975 | 7 | 7 | 4356 | MTA | ExecutionTracker | | | UnRegisterArgs: db41ad2d-6528-4bd4-933d-3b1fd33b71d6 2359753
INFO | 2019-07-18 11:05:01,985 | 7 | 7 | 4356 | MTA | ExecutionTracker | | | UnRegisterArgs: 55c3b905-c144-4181-b4ec-5e03540104a2 24474730
INFO | 2019-07-18 11:05:01,994 | 7 | 7 | 4356 | MTA | ExecutionTracker | | | UnRegisterArgs: 55c3b905-c144-4181-b4ec-5e03540104a2 24113990
INFO | 2019-07-18 11:05:02,004 | 7 | 7 | 4356 | MTA | Automation | E_QACollectData | F_DrctAsrMain-34215089 | Execute: Exception invoking method - Error executing link in Automation: F_DrctAsrFeeRevFilterData - From: F_DrctAsrFeeRevFilterData.stringUtils1.Split() To: F_DrctAsrFeeRevFilterData.strArrayPDFLine2.GetValue()
INFO | 2019-07-18 11:05:15,645 | 7 | 7 | 4356 | MTA | ExecutionTracker | | | UnRegisterArgs: 55c3b905-c144-4181-b4ec-5e03540104a2 24474730
INFO | 2019-07-18 11:05:15,661 | 7 | 7 | 4356 | MTA | ExecutionTracker | | | UnRegisterArgs: 55c3b905-c144-4181-b4ec-5e03540104a2 24113990