Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart rendering failed... OnRender method. D2D error

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

    Chart rendering failed... OnRender method. D2D error

    I have been getting the following error off and on for over a year:

    Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'An item with the same key has already been added.'
    I have also seen many other forum posts where others have gotten the same error but did not see any resolution.

    Well, I have FINALLY been able to reproduce the error consistently using just one standard drawing tool object and one standard indicator.

    To reproduce the error, do the following:

    1) Copy the attached workspace file to the Workspace folder. It just has 2 chart windows, one with a single data series and one with 3 data series (All ES).

    2) Startup NinjaTrader with a clean workspace, only the Control Center, no other charts or windows open. Also make sure no other workspaces are open. Open the Chart Freeze workspace.

    3) Next draw an object using any standard drawing tool on the chart with a single data series. Open the properties of the object you drew and attach it to all charts if it is not already set that way.

    4) Next Add the TrendLine indicator that comes with NinjaTrader to the chart with 3 data series. The chart with 3 data series should freeze.

    I am guessing any indicator that uses one of the draw methods will produce the same results.

    Thanks, Greg​
    Attached Files
    The Trading Mantis
    NinjaTrader Ecosystem Vendor - The Trading Mantis

    #2
    Hello Greg,

    I'm able to reproduce the issue on my end. I will create a bug report for Development. Thank you for reporting and for providing these steps.
    JasonNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jason View Post
      Hello Greg,

      I'm able to reproduce the issue on my end. I will create a bug report for Development. Thank you for reporting and for providing these steps.
      Any resolution / follow up on this issue? I am seeing it with the latest NT8 release.

      Comment


        #4
        Hello LeonK,

        Unfortunately not, Development is still looking into it.
        JasonNinjaTrader Customer Service

        Comment


          #5
          Hi Jason,
          Please count my vote to fix it. Global objects are a mess.
          Thanks

          Comment


            #6

            TheTradingMantis. Thanks for this information. I have wasted countless hours debugging my own code thinking that it was the source of the problem. Thank you for this.
            Some comments in the post below indicate this bug was introduced in v26
            Today I triad change the fib ratios in the fib retracement tool and I am getting constant errors in the log. My chart freezes up and the error keeps repeating itself until I close the program. The same error occurs if I then try to edit the drawing object again after reopening the program. I also tried deleting the drawing







            Comment


              #7
              To NT: This definitely needs to be fixed. There are a variety of scenarios in which I encounter this error.

              Comment


                #8
                What is the software id on this fix ?

                Comment


                  #9
                  We provide tracking numbers for feature requests, not for bug reports.
                  JasonNinjaTrader Customer Service

                  Comment


                    #10
                    Has this been fixed in the 8.1.x ??

                    Comment


                      #11
                      Originally posted by Bidder View Post
                      Has this been fixed in the 8.1.x ??
                      No, it is still just as broken in 8.1.1.6.
                      Bruce DeVault
                      QuantKey Trading Vendor Services
                      NinjaTrader Ecosystem Vendor - QuantKey

                      Comment


                        #12
                        I think it is worth noting that this is not a bug in the inbuilt Trend lines indicator - this appears to be a bug in drawing object handling. The reason we can say that with some confidence is that the Trend lines indicator has an empty OnRender that looks like this:

                        Code:
                        protected override void OnRender(ChartControl chartControl, ChartScale chartScale) { /* Don't Render Plots */ }
                        ​
                        Because the error given is a DirectX error, and because @Trendlines.cs does not use DirectX at all, it seems reasonable to conclude that the problem is not in @Trendlines.cs.
                        Bruce DeVault
                        QuantKey Trading Vendor Services
                        NinjaTrader Ecosystem Vendor - QuantKey

                        Comment


                          #13
                          Also, the problem is not that the override of OnRender is empty. If you make a copy of @Trendlines.cs and remove the OnRender override compeletely to even further isolate that it is not @Trendlines.cs at fault, it still has the same failure.
                          Attached Files
                          Bruce DeVault
                          QuantKey Trading Vendor Services
                          NinjaTrader Ecosystem Vendor - QuantKey

                          Comment


                            #14
                            NinjaTrader_ChelseaB Could you help make sure this bug gets to the right person so it can be addressed please? There is a completely solid reproduce scenario that crashes charting on 8.1.1.6.
                            Bruce DeVault
                            QuantKey Trading Vendor Services
                            NinjaTrader Ecosystem Vendor - QuantKey

                            Comment


                              #15
                              See also: https://forum.ninjatrader.com/forum/...or#post1252166

                              And, you can make this same message happen using drawing tools attached to all charts and with the Duplicate Window function. There is a bug in this area.
                              Bruce DeVault
                              QuantKey Trading Vendor Services
                              NinjaTrader Ecosystem Vendor - QuantKey

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by ageeholdings, Today, 07:43 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post ageeholdings  
                              Started by pibrew, Today, 06:37 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post pibrew
                              by pibrew
                               
                              Started by rbeckmann05, Yesterday, 06:48 PM
                              1 response
                              14 views
                              0 likes
                              Last Post bltdavid  
                              Started by llanqui, Today, 03:53 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post llanqui
                              by llanqui
                               
                              Started by burtoninlondon, Today, 12:38 AM
                              0 responses
                              12 views
                              0 likes
                              Last Post burtoninlondon  
                              Working...
                              X