• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PlaybackAdapter.Reset NullReferenceExceptioni

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

    PlaybackAdapter.Reset NullReferenceExceptioni

    See attached trace file for the call stack.
    I was changing the time in the Playback connection. Playback dialog froze. Then I got a message box with the exception message. The trace file shows the call stack.

    Trace file too big. Inline message here:

    2016-10-25 20:23:12:091 (Playback Connection) NinjaTrader.Gui.ControlCenter.OnConnectionStatus.D ispatcherInvoke: Playback status=Disconnected priceStatus=Disconnected previousStatus=Disconnecting previousPriceStatus=Disconnecting errorCode=NoError nativeError=''
    2016-10-25 20:23:12:091 NinjaTrader.Gui.ControlCenter.OnConnectionStatus: Using args status=Disconnected
    2016-10-25 20:23:12:091 Gui.ControlCenter.OnConnectionStatus: System.NullReferenceException: Object reference not set to an instance of an object.
    at NinjaTrader.Gui.ControlCenter.<>c__DisplayClass59_ 0.<OnConnectionStatus>b__0(ConnectionStatusEventAr gs e)
    2016-10-25 20:23:12:204 *************** unhandled exception trapped ***************
    2016-10-25 20:23:12:204 Object reference not set to an instance of an object.
    2016-10-25 20:23:12:206 System.NullReferenceException: Object reference not set to an instance of an object.
    at NinjaTrader.Adapter.PlaybackAdapter.Reset(DateTime targetTimeEst, Action`1 callback)
    at NinjaTrader.Gui.Data.PlaybackControlCenter.OnWindo wLoaded(Object sender, RoutedEventArgs e)
    at System.Windows.EventRoute.InvokeHandlersImpl(Objec t source, RoutedEventArgs args, Boolean reRaised)
    at System.Windows.UIElement.RaiseEventImpl(Dependency Object sender, RoutedEventArgs args)
    at System.Windows.BroadcastEventHelper.BroadcastEvent (DependencyObject root, RoutedEvent routedEvent)
    at System.Windows.BroadcastEventHelper.BroadcastLoade dEvent(Object root)
    at MS.Internal.LoadedOrUnloadedOperation.DoWork()
    at System.Windows.Media.MediaContext.FireLoadedPendin gCallbacks()
    at System.Windows.Media.MediaContext.FireInvokeOnRend erCallbacks()
    at System.Windows.Media.MediaContext.RenderMessageHan dlerCore(Object resizedCompositionTarget)
    at System.Windows.Media.MediaContext.RenderMessageHan dler(Object resizedCompositionTarget)
    at System.Windows.Interop.HwndTarget.OnResize()
    at System.Windows.Interop.HwndTarget.HandleMessage(Wi ndowMessage msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Interop.HwndSource.HwndTargetFilter Message(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndSubclass.DispatcherCallbackOperation( Object o)
    at System.Windows.Threading.ExceptionWrapper.Internal RealCall(Delegate callback, Object args, Int32 numArgs)
    at System.Windows.Threading.ExceptionWrapper.TryCatch When(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)


    Should NinjaTrader distribute the .PDB files with the beta/RC releases so that you'll get line numbers with the stack traces?

    #2
    Hello Brillo, and thank you for your questions.

    First, with regard to receiving debugging information, I would like to invite you to review the improved Visual Studio integration NinjaTrader 8 has, which is documented here,

    http://ninjatrader.com/support/helpG...ightsub=visual

    You should be able to see the call stack relative to your script, and to be able to use debugging breakpoints, to make it easier to see what is happening with your code and why.

    That said, I would like to ask if you could let us know a few things which may help us reproduce what you were seeing?

    • With regard to your replay data, were you playing over historical or market replay data?
    • What time periods and instruments did you have data for?
    • Were you attempting to fast-forward, or were you trying to use the slider to set the time and date?
    • Did you have any strategies enabled? If you did, can you make NinjaTrader crash using the SampleMACrossover strategy the same way?
    • Did your chart use any indicators?

    Please also send me your log and trace files, templates, and other files, so that I may look into what occurred.
    You can do this by going to the Control Center-> Help-> Email Support.
    Please reference the following ticket number in the body of the email: 1593373
    Please include Attn:NinjaTrader_JessicaP in the body of your e-mail.
    IMPORTANT: Please also tick all the boxes in the "Other Files" section.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Hi Jessica.
      If you look at the top of the call stack you'll see this line:
      2016-10-25 20:23:12:206 System.NullReferenceException: Object reference not set to an instance of an object.
      at NinjaTrader.Adapter.PlaybackAdapter.Reset(DateTime targetTimeEst, Action`1 callback)

      This means that the null reference is happening inside the NinjaTrader platorm somewhere in that method ( exact line number not available due to no PDB files being distributed to us ).

      I can not easily repro the issue. I had a strat enabled. Replay was in historical mode. I had right clicked on it to change the date/time ( can't remember if I changed the time or had only just right clicked ).

      Anyway, programmers should review that method for any object references that could potentially be null and log more info if such is the case for the next release.

      Comment


        #4
        Thank you for this additional information Brillo. I agree that this is likely a NinjaTrader bug. The visual studio information was related only toward your mention of exposing debugging symbols to the community. We will use the information you have given us to attempt to reproduce this on our end. This has been assigned the tracking ID QA-2301
        Jessica P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by futurestrader7, Today, 11:31 AM
        0 responses
        3 views
        0 likes
        Last Post futurestrader7  
        Started by Teebone21, Today, 10:38 AM
        0 responses
        6 views
        0 likes
        Last Post Teebone21  
        Started by J_o_s, 03-30-2020, 12:29 AM
        2 responses
        16 views
        0 likes
        Last Post J_o_s
        by J_o_s
         
        Started by ptpatrader, Today, 10:27 AM
        0 responses
        5 views
        0 likes
        Last Post ptpatrader  
        Started by albertokeira, Today, 09:30 AM
        0 responses
        8 views
        0 likes
        Last Post albertokeira  
        Working...
        X