Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

New update is causing Ninjatrader to crash (TDAmeritrade)

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

    New update is causing Ninjatrader to crash (TDAmeritrade)

    Hi,

    Ever since I updated, NT8 is crashing almost daily forcing me to close and reopen the application. Never happened on the old versions. It seems related to the new TDAmeritrade changes.

    2019-12-22 20:06:23:821 (My TD AMERITRADE) Tda.Adapter.Disconnect: response='<?xml version="1.0"?><amtd><result>LoggedOut</result></amtd>'
    2019-12-22 20:06:23:821 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback: Status=Connected, force .Disconnecting
    2019-12-22 20:06:23:821 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback: status=Disconnecting priceStatus=Connected previousStatus=Connected previousPriceStatus=Connected errorCode=NoError nativeError=''
    2019-12-22 20:07:22:857 Server.HdsClient.Connect: type=IS server='is-us-nt-001.ninjatrader.com' port=31658 system='NT'
    2019-12-22 20:18:59:087 (My TD AMERITRADE) NinjaTrader.Gui.ControlCenter.OnConnectionStatus: Tda status=Disconnecting priceStatus=Connected previousStatus=Connected previousPriceStatus=Connected errorCode=NoError nativeError=''
    2019-12-22 20:18:59:087 (My TD AMERITRADE) NinjaTrader.Gui.ControlCenter.OnConnectionStatus.D ispatcherInvoke: Tda status=Disconnecting priceStatus=Connected previousStatus=Connected previousPriceStatus=Connected errorCode=NoError nativeError=''
    2019-12-22 20:18:59:087 (Coinbase) Gui.ControlCenter.OnConnectionStatus.Adding: provider=Provider25 status=Connected priceStatus=Connected
    2019-12-22 20:18:59:087 (My TD AMERITRADE) Gui.ControlCenter.OnConnectionStatus.Adding: provider=Tda status=Disconnecting priceStatus=Connected
    2019-12-22 20:18:59:088 NinjaTrader.Gui.ControlCenter.OnConnectionStatus: foundPriceLoss=False foundTradeLoss=False foundConnectingStatus=False foundConnected=True
    2019-12-22 20:18:59:088 NinjaTrader.Gui.ControlCenter.OnConnectionStatus: Status=Connected
    2019-12-22 20:18:59:360 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback.Close1
    2019-12-22 20:18:59:360 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback: PriceStatus=Connected, force .Disconnecting
    2019-12-22 20:18:59:360 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback: status=Disconnecting priceStatus=Disconnecting previousStatus=Disconnecting previousPriceStatus=Connected errorCode=NoError nativeError=''
    2019-12-22 20:18:59:363 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback.Close3
    2019-12-22 20:18:59:369 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback.Close4
    2019-12-22 20:18:59:369 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback.Close5
    2019-12-22 20:18:59:369 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback.Close6a
    2019-12-22 20:18:59:369 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback.Close7
    2019-12-22 20:18:59:369 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback.Close8
    2019-12-22 20:18:59:434 *************** unhandled exception trapped ***************
    2019-12-22 20:18:59:434 The CancellationTokenSource has been disposed.
    2019-12-22 20:18:59:434 System.ObjectDisposedException: The CancellationTokenSource has been disposed.
    at System.Threading.CancellationTokenSource.ThrowObje ctDisposedException()
    at NinjaTrader.Tda.Adapter.<Disconnect>d__105.MoveNex t()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatch Info.Throw()
    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)
    at System.Windows.Threading.DispatcherOperation.Invok eImpl()
    at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
    at MS.Internal.CulturePreservingExecutionContext.Run( CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Windows.Threading.DispatcherOperation.Invok e()
    at System.Windows.Threading.Dispatcher.ProcessQueue()
    at System.Windows.Threading.Dispatcher.WndProcHook(In tPtr 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)
    at System.Windows.Threading.Dispatcher.LegacyInvokeIm pl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
    at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
    at System.Windows.Threading.Dispatcher.PushFrameImpl( DispatcherFrame frame)
    at NinjaTrader.Cbi.Connection.<>c__DisplayClass16_2.< Connect>b__5()
    at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()

    #2

    Hello JustinCross,

    Thank you for your post.

    I'd like to take a look at your log and trace files for this issue. These files contain diagnostic information related to what is occurring on your platform that will help us resolve this issue in a timely manner.

    Please follow the steps below to manually attach your log and trace files to an email to platformsupport[AT]ninjatrader[DOT]com with "2370920 ATTN Marco G" in the subject line and a link to this forum post in the message body so I may investigate this matter further.

    Open your NinjaTrader folder under Documents.
    Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
    Send the 2 compressed folders as attachments to this email.
    Once you have emailed these to us, you may delete these compressed folders.


    Thanks in advance; I look forward to resolving this item for you.
    Marco G.NinjaTrader Customer Service

    Comment


      #3
      Hello, my NT has also been crashing. I had no idea why till I was able to see the brief message and googled it. Which brought me to this thread.

      Error message is shown with a popup dialog box for only a few seconds. I would have reported the issue sooner except that the dialog box goes away after just a few seconds. So the only way for anyone to know what happened is if they were on the desktop the exact moment it occurs.

      The dialog box said something about cancellationTokenSource being disposed.

      I am using TD Ameritrade API.

      To replicate the issue, just login to TD, setup a few stocks in the market analyzer, open up a few charts on the same feed and then wait 2-3 days.
      Last edited by ktrader1000; 01-01-2020, 09:58 PM.

      Comment


        #4
        2020-01-01 22:47:43:086 (My TD AMERITRADE) Tda.Adapter.RefreshMessageKeyAsync0: url='https://apis.tdameritrade.com/apps/100/MessageKey;jsessionid=xxx?source=NT' messageKeyResponse='<?xml version="1.0"?>

        <amtd>
        <result>FAIL</result>
        <error>Invalid Session</error>
        </amtd>'
        2020-01-01 22:47:43:086 (My TD AMERITRADE) Tda.Adapter.RefreshMessageKeyAsync1: ParseMessageKeyError messageKeyResponse='<?xml version="1.0"?>

        <amtd>
        <result>FAIL</result>
        <error>Invalid Session</error>
        </amtd>'
        2020-01-01 22:47:43:087 (My TD AMERITRADE) Tda.Adapter.RefreshStreamingTokenAsync0: url='https://apis.tdameritrade.com/apps/100/StreamerInfo;jsessionid=xxx?source=NT' streamerInfoResponse='<?xml version="1.0"?>

        <amtd>
        <result>FAIL</result>
        <error>Invalid Session</error>
        </amtd>'
        2020-01-01 22:47:43:088 ERROR: Could not refresh MessageKey for monitoring account activity. Error message: Invalid Session
        2020-01-01 22:47:43:092 ERROR: There was a problem refreshing the streaming data token: (null)
        2020-01-01 22:47:43:225 (My TD AMERITRADE) Tda.Adapter.StreamingDataParser: Exception='System.ArgumentNullException: Value cannot be null.
        at System.Threading.SemaphoreSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
        at System.Collections.Concurrent.BlockingCollection`1 .TryTakeWithNoTimeValidation(T& item, Int32 millisecondsTimeout, CancellationToken cancellationToken, CancellationTokenSource combinedTokenSource)
        at System.Collections.Concurrent.BlockingCollection`1 .TryTake(T& item, Int32 millisecondsTimeout, CancellationToken cancellationToken)
        at System.Collections.Concurrent.BlockingCollection`1 .Take()
        at NinjaTrader.Tda.Adapter.StreamingDataParser()'
        2020-01-01 22:47:43:277 (My TD AMERITRADE) Tda.Adapter.Disconnect: response='<?xml version="1.0"?><amtd><result>LoggedOut</result></amtd>'
        2020-01-01 22:47:43:278 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback: Status=Connected, force .Disconnecting
        2020-01-01 22:47:43:278 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback: status=Disconnecting priceStatus=Connected previousStatus=Connected previousPriceStatus=Connected errorCode=NoError nativeError=''
        2020-01-01 22:47:43:314 (My TD AMERITRADE) NinjaTrader.Gui.ControlCenter.OnConnectionStatus: Tda status=Disconnecting priceStatus=Connected previousStatus=Connected previousPriceStatus=Connected errorCode=NoError nativeError=''
        2020-01-01 22:47:43:314 (My TD AMERITRADE) NinjaTrader.Gui.ControlCenter.OnConnectionStatus.D ispatcherInvoke: Tda status=Disconnecting priceStatus=Connected previousStatus=Connected previousPriceStatus=Connected errorCode=NoError nativeError=''
        2020-01-01 22:47:43:314 (Coinbase) Gui.ControlCenter.OnConnectionStatus.Adding: provider=Provider25 status=Connected priceStatus=Connected
        2020-01-01 22:47:43:314 (My TD AMERITRADE) Gui.ControlCenter.OnConnectionStatus.Adding: provider=Tda status=Disconnecting priceStatus=Connected
        2020-01-01 22:47:43:314 NinjaTrader.Gui.ControlCenter.OnConnectionStatus: foundPriceLoss=False foundTradeLoss=False foundConnectingStatus=False foundConnected=True
        2020-01-01 22:47:43:314 NinjaTrader.Gui.ControlCenter.OnConnectionStatus: Status=Connected
        2020-01-01 22:47:43:317 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback.Close1
        2020-01-01 22:47:43:317 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback: PriceStatus=Connected, force .Disconnecting
        2020-01-01 22:47:43:317 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback: status=Disconnecting priceStatus=Disconnecting previousStatus=Disconnecting previousPriceStatus=Connected errorCode=NoError nativeError=''
        2020-01-01 22:47:43:352 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback.Close3
        2020-01-01 22:47:43:352 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback.Close4
        2020-01-01 22:47:43:352 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback.Close5
        2020-01-01 22:47:43:352 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback.Close6a
        2020-01-01 22:47:43:353 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback.Close7
        2020-01-01 22:47:43:353 (My TD AMERITRADE) Cbi.Connection.ConnectionStatusCallback.Close8
        2020-01-01 22:47:43:367 *************** unhandled exception trapped ***************
        2020-01-01 22:47:43:367 The CancellationTokenSource has been disposed.
        2020-01-01 22:47:43:367 System.ObjectDisposedException: The CancellationTokenSource has been disposed.
        at System.Threading.CancellationTokenSource.ThrowObje ctDisposedException()
        at NinjaTrader.Tda.Adapter.<Disconnect>d__105.MoveNex t()

        Comment


          #5
          Hello ktrader1000,


          Thank you for your post.

          I'd like to take a look at your log and trace files for this issue. These files contain diagnostic information related to what is occurring on your platform that will help us resolve this issue in a timely manner.

          Please follow the steps below to manually attach your log and trace files to an email to platformsupport[AT]ninjatrader[DOT]com with "2370920 ATTN Marco G" in the subject line and a link to this forum post in the message body so I may investigate this matter further.

          Open your NinjaTrader folder under Documents.
          Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
          Send the 2 compressed folders as attachments to this email.
          Once you have emailed these to us, you may delete these compressed folders.


          Thanks in advance; I look forward to resolving this item for you.
          Marco G.NinjaTrader Customer Service

          Comment


            #6
            Has there been any resolution on this? I'm experiencing the same behavior after updating to version 8.0.20.0

            Comment


              #7
              It doesn't look like we received an email from ktrader1000 . First, I'd recommend updating to the slightly newer version of NinjaTrader 8 (8.0.21.1). To update NinjaTrader, please follow the steps below:
              • First, copy your license key from NinjaTrader under Help> License Key then exit NinjaTrader
              • Click on the link: http://ninjatrader.com/PlatformDirect
              • Enter your license key and press Submit
              • Select 'NinjaTrader 8'
              • Select 'Download'
              • Critical: Before running the installer, ensure NinjaTrader is closed.

              If the symptom persists, persists, follow the steps in post #5 to send us your files for analysis.

              Comment


                #8
                I didnt email the log because I posted it in this discussion thread. It has the error and why it occurred.

                Looks like the key/session timed out. Which makes sense since it takes a few days to occur.

                Comment


                  #9
                  We've made changes in 8.0.20.1 to specifically address the expiring session issue. I'd recommend updating if you haven't already done so.
                  Last edited by NinjaTrader_PatrickG; 01-09-2020, 02:59 PM.

                  Comment


                    #10
                    Originally posted by NinjaTrader_PatrickG View Post
                    We've made changes in 8.0.21.1 to specifically address the expiring session issue. I'd recommend updating if you haven't already done so.
                    The NT8 download area says 8.0.20.1 is available to download.....not 8.0.21.1....whats the scoop on this...??

                    Comment


                      #11
                      Apologies - that was a typo. The current version as of this post is 8.0.20.1

                      Comment


                        #12
                        Downloading the update now.. will test it and if I don't post back, then you know it worked =)

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Karado58, 11-26-2012, 02:57 PM
                        8 responses
                        14,828 views
                        0 likes
                        Last Post Option Whisperer  
                        Started by Option Whisperer, Today, 09:05 AM
                        0 responses
                        1 view
                        0 likes
                        Last Post Option Whisperer  
                        Started by cre8able, Yesterday, 01:16 PM
                        3 responses
                        11 views
                        0 likes
                        Last Post cre8able  
                        Started by Harry, 05-02-2018, 01:54 PM
                        10 responses
                        3,204 views
                        0 likes
                        Last Post tharton3  
                        Started by ChartTourist, Today, 08:22 AM
                        0 responses
                        6 views
                        0 likes
                        Last Post ChartTourist  
                        Working...
                        X