Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ERROR: Chart rendering failed

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

    ERROR: Chart rendering failed

    2016-09-09 08:30:33:948 ERROR: Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990015], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_RESOURCE_DOMAIN/WrongResourceDomain], Message: Unknown'
    2016-09-09 08:30:33:987 ERROR: A direct X error has occured while rendering the chart: HRESULT: [0x88990015], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_RESOURCE_DOMAIN/WrongResourceDomain], Message: Unknown
    2016-09-09 08:30:33:987 ERROR: Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990015], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_RESOURCE_DOMAIN/WrongResourceDomain], Message: Unknown'
    2016-09-09 08:30:34:015 ERROR: A direct X error has occured while rendering the chart: HRESULT: [0x88990015], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_RESOURCE_DOMAIN/WrongResourceDomain], Message: Unknown
    2016-09-09 08:30:34:015 ERROR: Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990015], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_RESOURCE_DOMAIN/WrongResourceDomain], Message: Unknown'
    2016-09-09 08:30:34:052 ERROR: A direct X error has occured while rendering the chart: HRESULT: [0x88990015], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_RESOURCE_DOMAIN/WrongResourceDomain], Message: Unknown
    2016-09-09 08:30:34:052 ERROR: Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990015], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_RESOURCE_DOMAIN/WrongResourceDomain], Message: Unknown'
    2016-09-09 08:30:34:081 ERROR: A direct X error has occured while rendering the chart: HRESULT: [0x88990015], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_RESOURCE_DOMAIN/WrongResourceDomain], Message: Unknown
    2016-09-09 08:30:34:081 ERROR: Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990015], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_RESOURCE_DOMAIN/WrongResourceDomain], Message: Unknown'

    ??
    Attached Files

    #2
    Hello db.mobile,

    Thank you for writing in.

    To investigate further, can you please clarify if this is occurring with a specific indicator or drawing object that you are using on your chart?
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Hi,

      I am not able to answer your question - I have no idea what is causing this error, whether that may be an indicator, a drawing object or something else.
      I just happen to check the trace file and found this error so I send it for investigation.

      I do have another issue posted at: http://ninjatrader.com/support/forum...277#post474277 .
      I guess it may be a way to verify if this error occurs independent to the other error but I don't know how to do that. The full log and trace files are included in that post.

      Please advise.
      thank you

      Comment


        #4
        To contribute my 10c to this thread. I receive the same error consistently. I tried to pinpoint what causes this and I failed to do so. Some obvious things to mention: I do have custom indicators; in runtime there are no null values for "this" when calling drawing methods; I do not at any time override OnRender(); and I am confident that indicator coding in itself is otherwise fine.

        I was in touch, among other things, about this issue with Bertrand previously, but we did not get anywhere.

        Would be great if NT team made tracing the source for this error message easier.

        Comment


          #5
          Originally posted by db.mobile View Post
          2016-09-09 08:30:33:948 ERROR: Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990015], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_RESOURCE_DOMAIN/WrongResourceDomain], Message: Unknown'

          ??
          Here is what MS says.
          https://msdn.microsoft.com/en-us/lib...or=-2147217396

          D2DERR_WRONG_RESOURCE_DOMAIN
          0x88990015
          The resource used was created by a render target in a different resource domain.

          Comment


            #6
            The error occurs for about 120 milliseconds within 2 hours time. After about 7 minutes. If this is a minor bug related to a very specific plotting or button activity .. I would gladly ignore it.

            I am only concerned if this potentially can branch into new issues or is linked to the other problem I mentioned - which is a major problem and makes NinjaTrader unusable (executions considerably out of the plotted candlestick).

            Comment


              #7
              Thanks for the MS info link: the issue re this error is that I do not have any user code that could possibly draw on a wrong render target (other than as a result of an internal NT bug).

              I do not know how to trace this further because:
              (i) it is not an exception so I do not have easy access to call history; and
              (ii) for me it is difficult to conclude what triggers the error: seems that certain user actions which result in a state change call or a call to re-process data / re-render the chart cause this. Typically, when the error occurs, chart(s) fail(s) to render some of the indicators (but not consistently as to which ones) and stop further processing these indicators. Charts render fine if I re-load NTscript (until the error occurs again).

              So in my case, yes, hitting f5 temporarily resolves the rendering issue, but it is still not a great solution for real-time environment. Probably reason enough for me to stick to NT7. Also, my NT8 crashes in other circumstances and it is unclear if that is related to this DirectX error.

              As far as my thoughts go, something in NT's internal workings is off for specific machine configs. For example, NT's Pivots code obviously uses OnRender() and it might well be that something fails there or through it.

              All in, I would appreciate any advice on how to see what exactly is going on here / what causes the error.

              Regards,
              Roman

              Comment


                #8
                Hey Guys,

                If you hit this error then you likely need to make code changes to your indicators (or advise third party developer of this post for him to make the needed changes).

                https://ninjatrader.com/support/help...getchanged.htm

                Here's the deal:
                • NinjaTrader has multiple render targets, e.g. hit detection when clicking on a chart
                • Each render target in DirectX requires its own resources
                • The resource we primarily are talking about here is SharpDX brushes.
                • If you create the brush and each OnRender for rendering then you will have no problem. However its also not the most efficient since your creating brushes each render pass.If the rendering if fairly light weight perhaps no problem (don't optimize prematurely).
                • If you create some brushes and cache them then you need to rip through the brushes you cache and generate new brushes for the new render target in the OnRenderTargetChanged() method as shown in the documentation.


                We are working on updating documentation on the OnRender() page to point to this so that you don't get caught off guard plus make sure our samples show the process.

                -Brett
                BrettNinjaTrader Product Management

                Comment


                  #9
                  Brett,

                  Many thanks for the great answer. I will need to go though my code to be sure; but in the meantime, please could you let me know if any of the following in itself will constitute offending code:
                  (i) in State.Configure, a plot is added with a custom stroke and a system brush, eg { ... AddPlot (new Stroke(Brushes.White, ....) } or { .. myStroke = new Stroke (...); AddPlot (myStroke, ...) ...}
                  (ii) in OBU, BarBrush is set to a brush with a custom color, eg {BarBrush = new SolidColorBrush(barColor); }, where barColor was generated through ColorFromRgb()

                  To be clear, the context is that the remaining code does not update render targets and does not freeze or re-create brushes when rendertarget changes.

                  I assume that (i) should be fine but I am less confident as to (ii).

                  Thanks.
                  Last edited by roman_ch; 09-12-2016, 08:55 AM.

                  Comment


                    #10
                    All that should be fine. Since NT will manage all the complexity for you so long as you don't override OnRender and work with OnRender brushes. As soon as you do that you now needed to handle the OnRenderTargetChanged case where you would hold on to a brush outside of OnRender.

                    Freezing brushes is another topic however with different error dealing with multi-threading and is something to do even if you are not doing custom rendering. Which is discussed in this help guide document: http://ninjatrader.com/support/helpG...s/?drawing.htm

                    In principle you should always freeze your brush after creation as a best practice.

                    -Brett
                    BrettNinjaTrader Product Management

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by jjanguda, Today, 10:15 PM
                    0 responses
                    7 views
                    0 likes
                    Last Post jjanguda  
                    Started by ScorpioTravis, Today, 09:41 PM
                    0 responses
                    6 views
                    0 likes
                    Last Post ScorpioTravis  
                    Started by DTSSTS, Today, 09:41 PM
                    0 responses
                    8 views
                    0 likes
                    Last Post DTSSTS
                    by DTSSTS
                     
                    Started by Segwin, Today, 06:33 PM
                    1 response
                    26 views
                    0 likes
                    Last Post NinjaTrader_ShawnB  
                    Started by bmaltz, Today, 08:14 PM
                    1 response
                    20 views
                    0 likes
                    Last Post NinjaTrader_ShawnB  
                    Working...
                    X