Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bug - Critical Failure overwrites saved workspaces?

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

    Bug - Critical Failure overwrites saved workspaces?

    I've noticed now - at least several times - that a critical NT shutdown (the kind that causes all strategies to disappear from the strategy screen) will overwrite any saved NT workspaces on shutdown.

    I recently had this happen after running a series of strategies all day. Interestingly enough I had been having problems with a Silver chart (one chart out of 12 being displayed). After the critical failure, I shut down without saving anything (chose not to save).

    On re-load, my workspace had been saved over - I checked the file and saw that it had been last saved during my restart, even though I hadn't manually saved the workspace in hours. The new workspace actually loaded one chart - the SILVER chart, which had apparently caused this issue - and no other charts.

    No other settings were saved (grid positions, etc).

    If you write me privately I'll re-send log and trace files.

    #2
    Hello cgeorgan,

    Thank you for your post.

    Please send a note to Support [AT] NinjaTrader [DOT] com with "ATTN: Chris" in the subject line.

    In the message, please include the following:
    1.) A link to this forum thread.
    2.) Your most current trace and log files.

    You will find the file here: My Documents > NinjaTrader 7 > Trace > trace.YYYYMMDD.txt

    Log file will be located by going to Documents->NinjaTrader 7->Log->log.YYYYMMDD.txt
    Christopher J.NinjaTrader Customer Service

    Comment


      #3
      I can confirm this that very often a failure will result in the workspace being saved and often in a corrupted form. This has happened many times, including the latest Beta. Typical scenario is that you are trying to add a chart or change an instrument or the time-frame and NT gets an internal error requiring a shut-down. But the partially changed workspace is overwritten. Sometimes I end up with workspaces just a few KBs in size.

      These are one of those hard to reproduce cases, which however can be fixed easily with a code review. This is a control-flow issue inside the code.

      Working around these quirks takes a LOT of time. It would be great if NT could automatically create a backup copy of the workspaces and other files it tries to save on exit during the load process. This is not a regular feature but it is needed to workaround NT's occasional instability. Do it automatically in the background. Saving XML files in a backup should be very quick and not add any noticeable time to the start-up process.

      Comment


        #4
        I do not argue that it can take up time to recreate your workspaces, but ultimately the idea is not to workaround the issue but rather to address the cause to prevent the crash to begin with.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Yes

          Originally posted by aviat72 View Post
          I can confirm this that very often a failure will result in the workspace being saved and often in a corrupted form. This has happened many times, including the latest Beta. Typical scenario is that you are trying to add a chart or change an instrument or the time-frame and NT gets an internal error requiring a shut-down. But the partially changed workspace is overwritten. Sometimes I end up with workspaces just a few KBs in size.
          Yes; this is exactly the sequence of events that causes this bug. And as aviat72 stated, it is not infrequent. I cannot comment on prior revisions of NT as I just started using the latest beta.

          Comment


            #6
            Originally posted by NinjaTrader_Josh View Post
            I do not argue that it can take up time to recreate your workspaces, but ultimately the idea is not to workaround the issue but rather to address the cause to prevent the crash to begin with.
            That might be true from the engineering perspective, but certainly not from the end-user perspective. In an ideal world your workspace would never get corrupted; but there are still instabilities with NT

            When you get a flat tire, the first thing you do is put on the spare and go on your way. You do not try to figure out where and why the nail got in. This is especially true of real time trading. Downtime can cost you a lot, especially if your workspace is corrupted.

            The debug process will obviously take time. Most users can live with the issues, as long as they have confidence that the downtime is limited. So provide something that gets the traders back up and running with the minimum amount of downtime.

            This issue of corrupted workspaces or charts not loading is not something new or undocumented. I have posted screenshots, exchanged a lot of emails, volunteered to work with binaries with higher verbosity error reporting levels to isolate the problem.

            Things have definitely become better. But invariably I do not through a 24 hour period without stuck with empty charts. The way I deal with it is to periodically save my current workspace with another name. I often lose my changes but I have to live with it.

            However, these issues will become a lot more tolerable if NT had some basic built in fault recovery mechanisms. Maintaining a backup cache of starting states of files, is trivial to implement, but takes care of most needs.

            Fault recovery is not the coolest thing to program. In the real world it is perhaps one of the most important aspects of the program; however it is ignored much too often.
            Last edited by aviat72; 06-27-2010, 12:05 PM.

            Comment


              #7
              I can confirm aviats72 reports.

              As you know we all develop happily ind and strategies and there are cases when your developped code has bugs. I had one recently with a too early initialisation of a static System.Windows.Form.

              NT crashes , but you still get the option to save-not save-.. the workspace.
              Offcourse not save,
              but at the next open a reduced workspace is opened. So something has happened with the workspace.

              A good cure would be to delete the NinjaTrader.Custom.dll , and modify the offending code in the .cs file in an external editor. (you can look at the trace file)
              On the next startup NT will recompile NinjaTrader.Custom.dll but with your modified code.

              No need to overwrite the workspace , which is the current situation.

              To test I would create such an offending .cs file that causes an NT crash and run this through the Visual studio debugger.

              regards
              Andreas

              Comment


                #8
                There are lots of things I love about NT7 but this is an area that I think needs attention.

                When I installed NT7- B17, my "current" workspace with 20 charts (the one I use every day) was somehow "saved over" with only one chart. I had to rebuild it from chart templates which luckily were not damaged.

                It does seems like this is a process issue within the ninjascript workflow. I'm not a programmer so I can't speak to the best solution but I am a process person and it seems like the process error here tends to get swept under the rug everytime it gets brought up.

                As a workaround, I've just starting saving a copy of my everyday "current" workspace to my desktop in case it somehow gets saved over within NT but that is not the ideal solution.

                Todd
                Last edited by toddaclark; 06-27-2010, 10:52 AM.

                Comment


                  #9
                  In this thread


                  I have posted a bat which makes a copy of the workspaces in a folder and then starts NT. You can edit the file to chose the destination folder.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Philippe56140, Yesterday, 02:35 PM
                  2 responses
                  20 views
                  0 likes
                  Last Post bltdavid  
                  Started by AaronKTradingForum, Today, 02:37 PM
                  3 responses
                  24 views
                  0 likes
                  Last Post bltdavid  
                  Started by port119, Yesterday, 02:43 PM
                  1 response
                  18 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by 00nevest, Yesterday, 02:27 PM
                  2 responses
                  23 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by Jonker, Yesterday, 01:19 PM
                  1 response
                  13 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Working...
                  X