Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8.0.4.0-Playback-MR-System.ArgumentException: Destination array was not long enough

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    NT8.0.4.0-Playback-MR-System.ArgumentException: Destination array was not long enough

    Ugh, I thought all these exception thrown by the target of invocation had been solved.

    This is a new variation that I've never seen.

    Happened around 8 months out of 36 months into replay. Slightly new variation in my code. Replay continued. Results might be incorrect.

    I'll test on another machine and re-test on this machine. I'll see if I can narrow down to the day and what happened.



    Code:
    2017-02-01 21:54:58:211 (Playback Connection) Cbi.Account.PositionUpdateCallback: instrument='ES ##-##' account='Playback101' avgPrice=0 quantity=0 marketPosition=Flat operation=Remove
    2017-02-01 21:54:58:215 *************** unhandled exception trapped ***************
    2017-02-01 21:54:58:215 Exception has been thrown by the target of an invocation.
    2017-02-01 21:54:58:256 [B]System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
       at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
    [/B]   at System.Collections.Generic.List`1.CopyTo(T[] array, Int32 arrayIndex)
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
       at NinjaTrader.Gui.NinjaScript.StrategiesGrid.CalculateRealizedProfit(StrategyBase strategy, Instrument instrument)
       at NinjaTrader.Gui.NinjaScript.StrategiesGrid.<OnPositionUpdate>b__69_0(PositionEventArgs e)
       --- End of inner exception stack trace ---
       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.Delegate.DynamicInvokeImpl(Object[] args)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
    2017-02-01 21:54:58:398 (Playback Connection) Cbi.Account.AccountItemCallback: account='Playback101' accountItem=CashValue currency=UsDollar value=*****

    This is close, but not exactly the same:


    #2
    Hello sledge,

    I took a look at the linked post and the issue that was created from it. I tried the sample we had used to confirm with the other post and was unable to see the same result in the current release. As you noted it seems similar but different so I am unsure if these two items are related. If you happen to have create a sample or confirm this on your other machines, could you provide the sample along with setup steps to try and run this?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by zstheorist, Today, 07:52 PM
    0 responses
    3 views
    0 likes
    Last Post zstheorist  
    Started by pmachiraju, 11-01-2023, 04:46 AM
    8 responses
    149 views
    0 likes
    Last Post rehmans
    by rehmans
     
    Started by mattbsea, Today, 05:44 PM
    0 responses
    5 views
    0 likes
    Last Post mattbsea  
    Started by RideMe, 04-07-2024, 04:54 PM
    6 responses
    33 views
    0 likes
    Last Post RideMe
    by RideMe
     
    Started by tkaboris, Today, 05:13 PM
    0 responses
    5 views
    0 likes
    Last Post tkaboris  
    Working...
    X