• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT 8.0.14.1 not working and unstable

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

    NT 8.0.14.1 not working and unstable

    Huge issues with NinjaTrader 8.0.14.1.

    (1) Synchronization problems: OnRenderTargetChanged() called prior to State.Configure()

    (2) Access problems due to different threads: DX brushes can no longer be accessed via OnRenderTargetChanged() and OnRender().

    (3) Crashes and freezes.

    We need to inform all our customers NOT to install NT 8.0.14.1, as it breaks the code that we have produced for NinjaTrader 8.

    Worst release ever since NT 8 BETA.

    A sample indicator (open source) that shows the problems is attached. All indicators perfectly worked with NT 8.0.13.1, but stopped working with NT 8.0.14.1. The problem affects 50 + of our indicators which would all have to be adapted.
    Attached Files
    Last edited by Harry; 06-09-2018, 04:54 PM.

    #2
    Major problem identified

    The main problem with NinjaTrader 8.0.14.1 is that OnRenderTargetChanged() and OnRender() may be called prior to StateConfigure().

    This results in objects being called that have not been properly initialized.

    As a result NinjaTrader may freeze and crash and needs to be removed with the task manager.

    Please downgrade to NinjaTrader 8.0.13.1 which is stable and will call State.Configure() prior to OnRenderTargetChanged() and OnRender(), as did all prior releases.

    Comment


      #3
      Synchronization problem clearly identified

      Here is the problem identified. You just need to insert Print instructions for checking it.

      With NinjaTrader 8.0.13.1 and all prior releases the order in which State.Configure(), OnRenderTargetChanged() and OnRender() were called, was always

      1. State.Configure()
      2. OnRenderTargetChanged()
      3. OnRender()

      With NinjaTrader 8.0.14.1 OnRenderTargetChanged() is often called prior to State.Configure(). This is what is at the origin of all freezes and crashes, as State.Configure is used for initialization of brushes and other parameters.

      OnRenderTargetChanged() 16:16:23.733
      State.Configure() 16:16:23.736
      OnRender() 16:16:23.803

      The times show the start times (Print instruction inserted on top) and you will notice that OnRenderTargetChanged() was triggered prior to State.Configure().

      This lack of synchronization causes major disasters and freezing of NT 8.0.14.1. Please guys fix it as soon as possible!

      Comment


        #4
        Thanks Harry. This has been escalated to the appropriate individuals for further analysis.
        RayNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Ray View Post
          Thanks Harry. This has been escalated to the appropriate individuals for further analysis.
          Thank you for your feedback. This is the first response I have had.

          All isues we have had could be finally traced back to OnRenderTargetChanged() being called prior to State.Configure().

          Comment


            #6
            Originally posted by Harry View Post
            Thank you for your feedback. This is the first response I have had.

            All isues we have had could be finally traced back to OnRenderTargetChanged() being called prior to State.Configure().
            Thanks Harry,

            A question please:

            Is there a real advantage to using OnRender() and DX brushes and is there really an appreciable increase in performance.

            Programming indicators with DX brushes is more involved and tedious if one is plotting and drawing many objects, let alone a library of over 100 indicators. But I have not noticed a big difference compared to using non-DX brushes or OnRender() methods.

            Other than being a novelty (or for an actual limitation for which only DX would work) is it really worth the efforts?

            Comment


              #7
              Originally posted by aligator View Post
              Thanks Harry,

              A question please:

              Is there a real advantage to using OnRender() and DX brushes and is there really an appreciable increase in performance.

              Programming indicators with DX brushes is more involved and tedious if one is plotting and drawing many objects, let alone a library of over 100 indicators. But I have not noticed a big difference compared to using non-DX brushes or OnRender() methods.

              Other than being a novelty (or for an actual limitation for which only DX would work) is it really worth the efforts?
              All brushes are finally being converted to DX Brushes, as NinjaTrader 8 uses SharpDX as a .Net wrapper of the DirectX API.

              I am only coding indicators with custom DX brushes, if there is a reason. The NinjaScript methods Draw.Text, Draw.Region etc. sometimes imply loading times for an indicator of several minutes, which can be reduced to less than a second with a custom plot.

              Also there are cases where the desired outcome cannot be produced with a standard plot or the inbuilt Draw methods. In these cases a custom plot is needed.

              A good example is the Ichimoku indicator. When you use Draw.Region, the line crosses will not be correctly filled, and also it is not easy to plot anything forward outside of the price area, if you use standard plots.
              Attached Files

              Comment


                #8
                Hi Harry,

                I already flagged these issues more than a week ago. I was told that the proper way to initialize brushes was in State.Defaults even though I did it in State.Configure in all the previous versions of NT. You have amazing influence- the NT CEO responded to you.

                I have been trying to get something else, relatively simple, done as well but somehow it isn't happening even though NT said they would do it. Wish I had your amazing powers.

                Comment


                  #9
                  It is best practice to put as little code as possible into State.SetDefaults() to avoid compiling unnecessary stuff all the time.

                  Therefore I have always set and frozen brushes in State.Configure. This was also recommended by NinjaTrader support at innumerable occasions.

                  Problem here is that with NT 8.0.14.1 State.Configure() is delayed and sometimes called after OnRenderTargetChanged(). In that case brushes are not set and cannot be used.
                  When the DX brushes are null, OnRender() crashes and no more new charts may be opened.

                  Comment


                    #10
                    SharpDX has null check for brushes and throws HRESULT: [0x80070057], Module: [General], ApiCode: [E_INVALIDARG/Invalid Arguments] exception in this case.
                    This can't crash Ninja, but indicator only.


                    Sample has very strange try-catch code...
                    It's a bad design IMO

                    try
                    {
                    pivotRangeBrushDX = pivotRangeBrush.ToDxBrush(RenderTarget);
                    centralRangeBrushDX = centralRangeBrush.ToDxBrush(RenderTarget);
                    jacksonZonesBrushDX = jacksonZonesBrush.ToDxBrush(RenderTarget);
                    transparentBrushDX = new SharpDX.Direct2D1.SolidColorBrush(RenderTarget, SharpDX.Color.Transparent);
                    for (int seriesCount = 0; seriesCount < Values.Length; seriesCount++)
                    brushesDX[seriesCount] = Plots[seriesCount].BrushDX;
                    }
                    catch (Exception e) { }

                    I think the issue is here
                    NinjaTrader.Gui.NinjaScript.IndicatorRenderBase.se t_RenderTarget(RenderTarget value)

                    Stack from 14.1:
                    2018-06-08 04:58:21:534 ERROR: Indicator '': Error on calling 'OnRenderTargetChanged' method: System.NullReferenceException: Object reference not set to an instance of an object. at VolumeProfile.VolumeProfile.a8jf0RgHNL3hFa2ovZy(Ob ject ) at VolumeProfile.VolumeProfile.OnRenderTargetChanged( ) at NinjaTrader.Gui.NinjaScript.IndicatorRenderBase.se t_RenderTarget(RenderTarget value)
                    Last edited by ren37; 06-11-2018, 03:21 AM.

                    Comment


                      #11
                      Hi Harry,

                      I completely agree. The brushes should be configured in State.Configure and NOT in State.defaults. I have had to recode a number of indicators already. My solution to the current problems with NT has been to create a media collection and initialize it via an initialization method which I call from State.Defaults. This is what works with the current version of NT. Once NT is corrected so that initialization can be done in State.Configure, I will simply move the initialization calls to State.Configure. But, I agree; this is a major pain.

                      Comment


                        #12
                        more QA on releases

                        Since SharpDX issues were the crux of so many problems until early this year lets hope this gets full attention and is resolved and we dont regress ; please QA at ninja spend more time on these builds before releasing ; and consider how much effort and waste of time and resources it impacts your customer base ; we are coming out of feeling weary from the debacle of last year please do not send us back there !

                        Comment


                          #13
                          An update:

                          * We've been in communication with Harry to resolve the issue.
                          * Harry's indicators depend on the order of operations between state management and OnRenderTargetChanged.
                          * We did not document or expect internally that this order of operations is guaranteed.
                          * We fixed a bug in R14 which caused the sequence of operations to change. Which we did not believe to be an error condition due to the point prior.
                          * That bug fix is valid and should be maintained.


                          As a result, release 14.2 will add a concept to NinjaTrader whereby guaranteeing order of operations on indicators and strategies in regards to State.Configure being prior to the first OnRenderTargetChanged, which should resolve the issue posted here. We will also add documentation noting that this sequence is now guaranteed.

                          Thanks everyone for reporting the issue and sorry for the inconvenience.
                          BrettNinjaTrader Product Management

                          Comment


                            #14
                            when do you expect 14.2 to be available?

                            Comment


                              #15
                              At the earliest, Wednesday afternoon but likely Thursday. I'll update this thread when posted.
                              BrettNinjaTrader Product Management

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Trader_Kim, Yesterday, 03:41 PM
                              1 response
                              9 views
                              0 likes
                              Last Post NinjaTrader_ChristopherD  
                              Started by MarthaClines, Yesterday, 06:23 PM
                              1 response
                              3 views
                              0 likes
                              Last Post NinjaTrader_PaulH  
                              Started by DrDave, Today, 06:42 AM
                              1 response
                              2 views
                              0 likes
                              Last Post NinjaTrader_PatrickG  
                              Started by kevinenergy, Today, 06:16 AM
                              1 response
                              4 views
                              0 likes
                              Last Post NinjaTrader_PatrickG  
                              Started by zhiga, Today, 12:54 AM
                              1 response
                              15 views
                              0 likes
                              Last Post NinjaTrader_PaulH  
                              Working...
                              X