Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 B11: Platform crashes with the same error

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

    #31
    Hello Patrick, hello Karlo,

    I am just writing to let you know that I am experiencing exactly the same crash as Karlo does. I am using 8.0.0.13 64-bit (Standard) - Release Candidate 1.

    In the trace file, I am getting:

    2016-09-19 16:41:21:506 Gui.Chart.ChartPanel.OnRender: System.IndexOutOfRangeException: Index was outside the bounds of the array.
    at NinjaTrader.NinjaScript.NinjaScriptBase.get_Bars()
    at NinjaTrader.Gui.NinjaScript.StrategyRenderBase.Cal culateMinMax()
    at NinjaTrader.Gui.Chart.ChartScale.CalculateMinMax()
    at NinjaTrader.Gui.Chart.ChartPanel.CalculateMinMax()
    at NinjaTrader.Gui.Chart.Direct2DForm.RenderInit()

    At the same time, the strategy invokes OnStateChange with State.Terminated and then whole NT crashes.

    Some interesting notes:

    1. I do not overwrite OnRender.
    2. I have opened just a single chart with a single strategy, which is using a couple of invisible indicators
    3. The crash occurs between two OnBarUpdate events. In the mentioned case, there was one OnBarUpdate at 16:37 and then there would be another OnBarUpdate at 16:57. Yet, the crash happend at 16:41, i.e. when the strategy is idle. Even the indicators are actually idle, becase I do not use the OnEachTick or OnPriceChange mode.
    4. I have experienced this crash both during Playback and during real time.

    Kind regards,
    Vaclav

    Comment


      #32
      Let me guess... You're using a secondary data series that you initialize in OnStateChange...

      Comment


        #33
        Originally posted by traderpards View Post
        Let me guess... You're using a secondary data series that you initialize in OnStateChange...
        I do indeed. I use two data series to store some indicator values and other two data series for output values. As you can se in the example attached.

        I think this is a standard pattern lots of NT user use same as me. Or have I something odd in my code?
        Attached Files

        Comment


          #34
          Originally posted by vaclav View Post
          I do indeed. I use two data series to store some indicator values and other two data series for output values. As you can se in the example attached.

          I think this is a standard pattern lots of NT user use same as me. Or have I something odd in my code?
          No, I meant a secondary bar series... Something like this:
          Code:
          			else if (State == State.Configure)
          			{
          //				int seconds = 20;
          //				AddDataSeries( Data.BarsPeriodType.Second, seconds );
          			}
          But I see you aren't using that so... that's interesting.

          Comment


            #35
            Originally posted by traderpards View Post
            No, I meant a secondary bar series... Something like this:
            Code:
            			else if (State == State.Configure)
            			{
            //				int seconds = 20;
            //				AddDataSeries( Data.BarsPeriodType.Second, seconds );
            			}
            But I see you aren't using that so... that's interesting.
            No, nothing like that. I use a single chart, single strategy, single instrument, and single timeframe.

            I still do one unusual thing in my strategy: I have got my custom indicator. Its calculation takes a longer time - about 10 ms. Since the indicator's OnBarUpdate thread is not reliably synchronized with the strategy's OnBarUpdate thread, I sometimes have to manually wait for the indicator thread to finish, so that I can use the indicator result in my strategy. But this happens only sometimes, and it did not happened shortly before the NT crash. ... Hence I think it was not the cause of the crash.

            Kind Regards,
            Vaclav

            Comment


              #36
              As an update, I was able to isolate a scenario in our development environment which triggers this stack track 100% of the time (instead of waiting for it to occur randomly, which makes it difficult to test).
              Code:
              2016-09-20 08:20:18:258 Gui.Chart.ChartPanel.OnRender: System.IndexOutOfRangeException: Index was outside the bounds of the array.
              at NinjaTrader.NinjaScript.NinjaScriptBase.get_Bars()
              at NinjaTrader.Gui.NinjaScript.IndicatorRenderBase.CalculateMinMax()
              at NinjaTrader.Gui.Chart.ChartScale.CalculateMinMax()
              at NinjaTrader.Gui.Chart.ChartPanel.CalculateMinMax()
              at NinjaTrader.Gui.Chart.Direct2DForm.RenderInit()
              I am reporting to this item to development and it will be tracked using ID # NTEIGHT-10403

              Thanks for your persistence, guys!
              MatthewNinjaTrader Product Management

              Comment


                #37
                Originally posted by NinjaTrader_Matthew View Post
                As an update, I was able to isolate a scenario in our development environment which triggers this stack track 100% of the time (instead of waiting for it to occur randomly, which makes it difficult to test).
                Code:
                2016-09-20 08:20:18:258 Gui.Chart.ChartPanel.OnRender: System.IndexOutOfRangeException: Index was outside the bounds of the array.
                at NinjaTrader.NinjaScript.NinjaScriptBase.get_Bars()
                at NinjaTrader.Gui.NinjaScript.IndicatorRenderBase.CalculateMinMax()
                at NinjaTrader.Gui.Chart.ChartScale.CalculateMinMax()
                at NinjaTrader.Gui.Chart.ChartPanel.CalculateMinMax()
                at NinjaTrader.Gui.Chart.Direct2DForm.RenderInit()
                I am reporting to this item to development and it will be tracked using ID # NTEIGHT-10403

                Thanks for your persistence, guys!
                Would you care to provide any insight as to what you're doing to trigger this or what you're seeing? Maybe we're doing the same thing and could maybe not do that...

                For example, I'm using a secondary series in a strategy so I can halt trading and maybe exit trades at a certain time. This strategy runs on a chart that uses a rather large intraday bar type and size, that may never close before the session. That's why I use a secondary bar series - so I can close that position at the time I want. Well, if I comment all that code, I won't crash. But then I have to pay attention and manually halt trading at the appropriate time, which is a pain.

                Maybe what you're seeing is easier to deal with than all the hoops I'm currently jumping through. So would you care to share it with us?

                Note: My strategy is a conversion from NT7, which I completed like, last November. So the secondary bar series stuff I described was working, until something in the Beta 11 code broke it. It would sure be nice if I could have that back again, even if it's through a different work around until this is really fixed.

                Comment


                  #38
                  I am using the same indicator provided in post #19.

                  The key to getting this to trigger was rapidly playing with the x and y-axis to cause the CharScale and ChartPanel CalcualteMinMax() logic to trigger.

                  The exact connection configuration is not available to end users and is something we use for internal testing to generate bars rapidly. You might be able to do the same by using the Playback connection, rather than needing to wait for bars to be produced organically/live.
                  MatthewNinjaTrader Product Management

                  Comment


                    #39
                    Hi Matthew. Apologies for the very late reply but many thanks for looking into this bug and I'm glad you were able to isolate the cause. Thank you also for the other people who contributed to this thread. I appreciate your efforts in resolving this issue.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by rufat, Yesterday, 09:24 PM
                    1 response
                    16 views
                    0 likes
                    Last Post NinjaTrader_Jason  
                    Started by TRADEONECLIC, Yesterday, 10:05 PM
                    0 responses
                    25 views
                    0 likes
                    Last Post TRADEONECLIC  
                    Started by BrennanSalibrici, 12-17-2020, 11:55 PM
                    3 responses
                    46 views
                    0 likes
                    Last Post StealthM93  
                    Started by coopgrafik, Yesterday, 07:56 PM
                    0 responses
                    11 views
                    0 likes
                    Last Post coopgrafik  
                    Started by MisterGee, Yesterday, 07:55 PM
                    0 responses
                    12 views
                    0 likes
                    Last Post MisterGee  
                    Working...
                    X