Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Fix for "Object reference not set to an instance of an object" when starting up NT

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

    Fix for "Object reference not set to an instance of an object" when starting up NT

    Hey everyone, I just wanted to let you all know that I was able to figure out how to fix the dreaded "Unhandled Exception: Object reference not set to an instance of an object." error when starting up NinjaTrader. For our purposes, this is an issue with a Workspace (others encounter it in other scenarios) coupled with the database that NinjaTrader uses (there is a database file on our computers that NinjaTrader creates and uses). If you want this fix to work for you in the future, you NEED to start taking daily NinjaTrader backups religiously. Here's what I did:

    1) Before the issue crops up, take a NinjaTrader backup everyday. It's really easy:
    a) Disconnect all "Connections"
    b) Click "Tools->Export->Backup File..."
    c) Make sure "Configuration files", "Database", "NinjaScript files", "Templates", and "Workspaces" are checked
    d) Click "Export"
    e) Give the file a name and what folder it should be saved in
    f) Click "Save"
    2) Now that you've encountered the error when NinjaTrader starts, shut down NinjaTrader
    3) Navigate to your folder where your NinjaTrader backups are kept
    4) Make sure that file name extensions are visible:
    a) In your folder Explorer window, click the "View" menu
    b) Make sure "File name extensions" is checked
    5) Make a copy of the most recent backup file
    6) Rename the the copied file from "<yourfilename>.nt8bk" to "<youfilename>.zip"
    7) Double-click on the Zip file and within the file now double click on the "db" folder
    8) Right-click the "Ninjatrader.sqlite" file and select "Copy"
    9) Open up another file Explorer window and navigate to this folder: "C:\Users\<Windows user>\Documents\NinjaTrader 8\db"
    10) Right-click the "Ninjatrader.sqlite" file and rename it to "Ninjatrader.old"
    11) Right-click in the folder and select "Paste" to paste in the new "Ninjatrader.sqlite" file
    12) Open up NinjaTrader and the issue should be fixed! If it is not (which happened to me), you'll need to do this same process on your next most recent NinjaTrader backup file

    NOTE that using this backup database will fix the issue, however your most recent trade performance results will not be part of the database any longer. A trade-off, but worth it to get this annoying issue fixed.

    Cheers!​

    #2
    Originally posted by hardworkinguy View Post
    NOTE that using this backup database will fix the issue.
    Welcome to the forums!

    Many things could be causing that error message.

    Following those steps to fix the issue you're having is coincidental.

    Even by your own admission, those steps do not really 'fix' the error,
    because you've had to do these procedures more than once, and
    you're still seeing the problem occur again.

    My point is:
    Something else is going on, and you should continue to pursue this
    error message with NT Support.

    -=o=-

    Which version of NT are you using?
    When the error occurs, have you sent your log/trace files to Support?

    Just my 2˘.


    Comment


      #3
      Hello hardworkinguy,

      Thank you very much for your post and welcome to the NinjaTrader forums!

      If these errors occur, it would usually indicate an issue with the workspace or an indicator directly.

      While these steps can resolve specific issues, we would also be happy to take a closer look at what might be causing this error to recur.

      As mentioned by bltdavid, please don't hesitate to reach out to us via the Help > Email Support menu if you would like us to investigate this further.

      We look forward to your email!
      Manfred F.NinjaTrader Customer Service

      Comment


        #4
        I'm having this issue constantly when I press the "shift" key. It's really weird, doesn't happen every single time, but most of the time. I use the hotkey shift + F3 to change my workspace, as I use two, and change between them regularly. And it's being very annoying lately, as this error is raised with no apparent reason. I recreated my workspaces from zero, changed some charts and stuff to try to get rid of the problem but it persists

        Any help?

        Comment


          #5
          Hello DonMiguelo ,

          Thank you very much for your post.

          Could you send us your log & trace files? We can then take a closer look at any reported errors or issues.

          You can do this by going to the Control Center -> Help -> Email Support

          Please select "Platform Technical Support" as the recipient and enter a brief note in the message referring to this post.

          Thank you in advance, I look forward to your email!​
          Manfred F.NinjaTrader Customer Service

          Comment


            #6
            Hi NinjaTrader_Manfred,

            I just sent the email, the subject is: Requested Log & Trace Files for post: post1294054

            Thanks for your support! I'll be happy to help if there are any further inquiries.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by fx.practic, 10-15-2013, 12:53 AM
            5 responses
            5,404 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by Shai Samuel, 07-02-2022, 02:46 PM
            4 responses
            95 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by DJ888, Yesterday, 10:57 PM
            0 responses
            8 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by MacDad, 02-25-2024, 11:48 PM
            7 responses
            159 views
            0 likes
            Last Post loganjarosz123  
            Started by Belfortbucks, Yesterday, 09:29 PM
            0 responses
            8 views
            0 likes
            Last Post Belfortbucks  
            Working...
            X