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 Nicholewatkinsi, Today, 10:53 PM
    0 responses
    6 views
    0 likes
    Last Post Nicholewatkinsi  
    Started by dward123, 01-02-2024, 09:59 PM
    4 responses
    175 views
    0 likes
    Last Post Lancer
    by Lancer
     
    Started by ETFVoyageur, Today, 04:00 PM
    2 responses
    19 views
    0 likes
    Last Post ETFVoyageur  
    Started by AaronKTradingForum, Today, 03:44 PM
    1 response
    14 views
    0 likes
    Last Post AaronKTradingForum  
    Started by Felix Reichert, 04-26-2024, 02:12 PM
    11 responses
    80 views
    0 likes
    Last Post Felix Reichert  
    Working...
    X