Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 freezes - unhandled exception error

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

    NT8 freezes - unhandled exception error

    My futures daytrading systems are running all day long on my IB paper trading account because I want to see how they behave in real time.

    Once or twice a week ninjatrader freezes and I have to close it down using the windows task manager. When I do this, I get the following message:

    Unhandled exception. Nicht genügend Quoten verfügbar, um diesen Befehl zu verarbeiten.

    I have the German version of NT installed obviously. I didn't translate the error message to English because I thought that this might help you find the problem code more easily by using the message text as a search string.

    I'm using NT 8.0.9.0 64-bit on a windows 7 system, IB Trader Workstation Build 967.1f.

    #2
    Hello Cugel,

    Thank you for writing to the support team.

    The error you are getting is an out of memory exception. The supported build number for TWS is 960.2g, please uninstall the current version and install this earlier revision.

    A download link for TWS revision 960.2g can be found in the connection guide for Interactive Brokers:


    Please send us your log and trace files to platformsupport<at>ninjatrader<dot>com you can do this by going to Help>Email Support. Please reference the following in the body of the email "ATTN ChrisL <post the link to this forum post here>"

    I look forward to your reply.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hi Chris,

      thanks for the quick reply.

      Log and trace files are sent.

      Comment


        #4
        Hello Cugel,

        Thanks for sending in the files.

        Please try running your system with the aforemtioned version of TWS. If you still get an out of memory exception after this, please monitor and report the use of your computers resources while NinjaTrader is running and resend your log and trace files.

        I look forward to hearing of your results.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Hi Chris,

          ok, let's see what happens. I'll report back in case the issue can't be solved by using the recommended version of TWS.

          Comment


            #6
            Hello Chris,

            I have switched to TWS 960.2g, but this didn't help unfortunately. Yesterday between 10 and 11 pm (my local time) it happened again.

            I've sent you the log and trace files again together with some screenshots which show the use of my computer's resources.

            Comment


              #7
              Hello Cugel,

              Thanks for the reply.

              Please take the following steps to force NinjaTrader to start without your saved workspace. You will have the option to reopen these after our tests.
              1. Shut down NinjaTrader
              2. Navigate to (My) Documents\NinjaTrader 8\workspaces
              3. Delete the file named "_Workspaces.XML". DO NOT delete the 'workspaces' folder - only delete the '_Workspaces.XML' file within the 'workspaces' folder


              After deleting this file, restart NinjaTrader which should start up without any workspaces.

              Once NinjaTrader has started on just the control center, please open a new chart with no custom bar types/indicators/templates and test for issues.

              *Please note this will not delete your workspace however the new blank workspace will be named Untitled1. If you have a workspace already named "Untitled1," however, you will not want to save the workspace when exiting NinjaTrader, otherwise, it will overwrite it.
              If there are no issues on this new workspace, please try opening the previous workspace by going to File--> Workspaces--> Open workspace.

              If this reintroduces issues, I would suggest rebuilding your workspace, adding 1 indicator at a time. Please keep track of what indicators you add back in so that we can narrow down what indicator is causing the issue if the issue returns. I also suggest making a backup of your workspace so we can restore a backup if the issue returns.

              I have provided a link below to our Help Guide that goes over backing up and restoring.


              Please let us know if we may be of further assistance.
              Chris L.NinjaTrader Customer Service

              Comment


                #8
                Hello Chris,

                thank you for the detailed recommendations. Unfortunately in this case they are not of great help, because this error is a rare event that happens only once or twice a week. I would have to check every single indicator for at least a whole week to be sure that it is not the one posing the problem. Since there are indicators that rely on other indicators in my system, this alone could last several months. Then there are computations within the strategy, and then there are the trade executions ...

                I'd like to summarize how I see this issue, and please feel free to correct me if I'm wrong.

                An exception is a known type of error. An unhandled exception occurs when the application code does not properly handle exceptions.

                The fact that NT8 shows the error message I mentioned in my first post makes it clear that the NT8 software development team was aware that this exception could happen, but they forgot to (or decided not to) write the appropriate code to handle it. This is clearly a software bug.

                I for one would already be happy if I got an acoustic alert if this happens so that I could then restart NT8 immediately. Is this really asked too much? Do I have to take care of this myself by writing additional software?

                I'm planning to go live with my trading soon, so there is money involved ...

                Looking forward to your reply.
                Last edited by Cugel; 10-06-2017, 05:46 AM.

                Comment


                  #9
                  Insufficient quota? How much hard drive space left?
                  How much memory?

                  Do you have swap/page file space turned on in Windows?

                  Comment


                    #10
                    I've had the "unhandled exception" issue too. An NT support member analyzed my case and this was the final answer:

                    "Hello,
                    The exception being thrown is related to referencing an object which is null in OnPositionUpdate.

                    Please see the following link on checking for null references,
                    https://ninjatrader.com/support/forum/showpost.php?p=413759&postcount=2"

                    It's weird cause in that code I don't use OnPositionUpdate, however, this perhaps might give you some hints of possible causes.

                    Here the thread:

                    Comment


                      #11
                      Hi sledge,

                      307 GB free on my SSD.

                      3 GB of ram free according to task manager. 8 GB installed.

                      Paging file size is 200 MB. It was set to this value by choosing the max reliability settings in the Samsung Magician program that came with the SSD.

                      Can't be memory problems. Do you see any problems with the page file?

                      Comment


                        #12
                        Hi pstrusi,

                        thanks for your reply. I followed your links hoping to find a solution to my problem.

                        I'm using the so called "Managed Approach" for all order related code. So this unhandled exception can't be caused by this type of error. The strategy that runs when NT8 freezes completely has no oo code in it whatsoever.

                        In your case, when everything runs fine even though an exception is thrown, I wouldn't be too concerned. There are situations when it's appropriate to do nothing, ie. not handle the exception. Well, that's what I was told long ago when I was involved with programming.

                        Comment


                          #13
                          Hello Cugel,

                          Thank you for your patience on this.

                          The out of memory exception is not from your computer memory running out. The Windows operating system will allocate a certain amount of memory to the NinjaTrader process and if that quota is met, it will terminate the process.

                          I will discuss this item with my colleague on Monday who is out of the office at the time.

                          In the meantime please send me your new log and trace files to platformsupport<at>ninjatrader<dot>com you can do this by going to Help>Email Support. Please reference the following in the body of the email "ATTN ChrisL <post the link to this forum post here>"

                          We will continue through email and I will update this forum post once a resolution has been found.

                          I look forward to assisting further, thanks again for your patience and understanding.
                          Chris L.NinjaTrader Customer Service

                          Comment


                            #14
                            Originally posted by Cugel View Post
                            Hi sledge,

                            307 GB free on my SSD.

                            3 GB of ram free according to task manager. 8 GB installed.

                            Paging file size is 200 MB. It was set to this value by choosing the max reliability settings in the Samsung Magician program that came with the SSD.

                            Can't be memory problems. Do you see any problems with the page file?

                            Are you using Windows 7? In task manager - Free doesn't equate to free gb. What's available is the important one.

                            Is your pagefile set to automatic in Windows? With the advent of more memory - I've seen my systems no longer use it.

                            Well, it appears you have enough resources. I've hit filled harddrives more than a couple times and things get pretty funky trying to allocate resources and start to fail in NT.

                            Comment


                              #15
                              Hello ChrisL,

                              thanks for your ongoing support. I've sent the new log and trace files. NT8 froze again yesterday.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by benmarkal, Yesterday, 12:52 PM
                              3 responses
                              22 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by helpwanted, Today, 03:06 AM
                              1 response
                              17 views
                              0 likes
                              Last Post sarafuenonly123  
                              Started by Brevo, Today, 01:45 AM
                              0 responses
                              11 views
                              0 likes
                              Last Post Brevo
                              by Brevo
                               
                              Started by aussugardefender, Today, 01:07 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post aussugardefender  
                              Started by pvincent, 06-23-2022, 12:53 PM
                              14 responses
                              244 views
                              0 likes
                              Last Post Nyman
                              by Nyman
                               
                              Working...
                              X