Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ERROR: A direct X error has occured while rendering the chart: HRESULT: [0x88990001],

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

    ERROR: A direct X error has occured while rendering the chart: HRESULT: [0x88990001],

    I have an indicator which writes out all Level 1 and Level 2 market data events to a file for later use by indicators which need intra-bar Level 1 and/or Level 2 data for correct operation.

    The indicator defines 7 different plots, and updates them in the standard way. It does not implement the OnRender() method, nor does it inherit any implementation of that method except for the one implemented in the base class written by NinjaTrader. It also does not attempt to draw anything other than by setting the values of the data series for the seven plots.

    The indicator was ported from NinjaTrader 7, where it has been working without any errors for over two years of round-the-clock use on 6 different instruments.

    The indicator also passes every test of long term use on NinjaTrader 8--but only when used in MarketReplay mode.

    However, when used in NT8 on real time data (Kinetick; 6E, CL, ES, GC, NQ, TF, YM) the error in the title eventually occurs, usually after just a few minutes of operation, although we've seen it take over an hour.

    Here's the relevant text from the log file:

    2015-11-01 15:03:39:522|3|4|A direct X error has occured while rendering the chart: HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: The object was not in the correct state to process the method.
    2015-11-01 15:03:39:532|3|16|Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: The object was not in the correct state to process the method. '

    And here's the relevant text from the trace file:

    2015-11-01 15:03:39:529 ERROR: A direct X error has occured while rendering the chart: HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: The object was not in the correct state to process the method.
    2015-11-01 15:03:39:533 ERROR: Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: The object was not in the correct state to process the method. '

    Based on all the facts and evidence. it seems highly likely that the error is either a bug in the SharpDX code itself, or else is in the logic of the OnRender() method implemented by NinjaTrader.

    I have attached the log and trace files.
    Attached Files
    Last edited by strategesis; 11-01-2015, 06:01 PM.

    #2
    I have something with 2 plots that reads from a file also, and have never seen that.

    I have had some other errors (index issues) that don't happen in NT7... I find I need to complete the file for some reason in NT8...).

    Comment


      #3
      sledge,

      Interesting.

      However, my indicator never reads from any files, it only ever writes.

      Comment


        #4
        I have such a version too, the one that writes and plots at the same time in Live Market, but that is still stuck in NT7 for now...I'm not here to try NT8 live, so no reason to convert yet.

        Comment


          #5
          Hello strategesis,

          Based on the error, I couldn't really say what caused this specifically. Would you be able to provide a sample script that demonstrates this behavior?

          I can certainly run the sample on my end to confirm any error generated by leaving the script running and then report that to development. If you could provide any sort of sample on this that would be great.

          Otherwise, have you reduced the code to find the portion of code causing the error to occur?

          I look forward to being of further assistance.
          JesseNinjaTrader Customer Service

          Comment


            #6
            So we have been able to isolate the problem: The indicator uses a thread to blink the price marker every 100 milliseconds, and that a) doesn't really work very well in NT8 (although it works quite well in NT7,) and b) is what's causing NT8 to eventually crash or else causes the chart window to hang and become completely unresponsive.

            I have created and attached an indicator for NT8 which blinks the price marker whenever NT8 is connected to a market data feed. I have done the same for NT7 (although in NT7, there's no way to actually know that all connections have been disabled, after they have been established.)

            Connection status is not what we actually use the blinking to show. We use it to show that the data recorder is actively recording--which is extremely useful/important. But connection status seemed like a good idea for example code.

            P.S. It would be good if there were a good way to blink the price marker in NT8, since we have customers who have and use that feature. The method we ported from NT7 doesn't work nearly as well in NT8, as you will be able to see.
            Attached Files
            Last edited by strategesis; 11-02-2015, 01:46 PM.

            Comment


              #7
              Hello,

              Thank you for providing samples for both versions, that is very helpful.

              I will look into this further and see if there is anything already in place that may be a better option, otherwise I can certainly put in any feature requests where needed.

              Once I have reviewed this I will reply back with further information.

              I look forward to being of further assistance.
              JesseNinjaTrader Customer Service

              Comment


                #8
                Update: I tested the hypothesis that the problem was actually the call to ForceRefresh(). That proved to be a false hypothesis.

                Comment


                  #9
                  I also see this error quite a lot, and have reported it in another thread with no response.

                  015-11-10 17:35:40:830|3|4|A direct X error has occured while rendering the chart: HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: The object was not in the correct state to process the method.
                  2015-11-10 17:35:40:831|3|16|Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: The object was not in the correct state to process the method. '

                  It's almost certainly a race condition, I have an indicator in OnRender(), disconnected from my data provider, then connect to my provider which reloads the chart while still rendering. Error occurs.

                  Comment


                    #10
                    I have seen this in the past as well, I completely agree as it is intermittent it is likely a race condition.

                    Originally posted by RanchoDinero View Post
                    I also see this error quite a lot, and have reported it in another thread with no response.

                    015-11-10 17:35:40:830|3|4|A direct X error has occured while rendering the chart: HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: The object was not in the correct state to process the method.
                    2015-11-10 17:35:40:831|3|16|Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: The object was not in the correct state to process the method. '

                    It's almost certainly a race condition, I have an indicator in OnRender(), disconnected from my data provider, then connect to my provider which reloads the chart while still rendering. Error occurs.

                    Comment


                      #11
                      Just checking in to see if there is any progress on this issue as it is happening more frequently. Just based upon the current workspace and actions, my error might be caused with the following:
                      - Multiple Workspaces open
                      - Chart Trader Open
                      - DOM (Dynamic) Open
                      - Data Box Open
                      - Trade Entered/Exited (seems like last time chart trader, the PT didn't get removed from the chart, but the SL & Zero line did)

                      My general feeling is this intermittent error may be related to the price tags with the Chart Trader, just my thought due to the last "frozen" state.

                      Comment


                        #12
                        Anyone care to share which video cards they are using? Might be something in common with same class (780/980 etc) or totally unrelated and more of a DX issue if not (amd vs. Nvidia)?

                        Comment


                          #13
                          Originally posted by sledge View Post
                          Anyone care to share which video cards they are using? Might be something in common with same class (780/980 etc) or totally unrelated and more of a DX issue if not (amd vs. Nvidia)?
                          I am currently running with the onboard "Intel(R) HD Graphics 4600" integrated into the system. I was having crashing problems with my NVIDIA GeForce GTX 760 card and have disabled it, but still in the system and with its drivers.

                          I have 2 Monitors I am running off the 4600.

                          Comment


                            #14
                            My nvidia 780ti gave other dx errors I have mentioned. (Win7,dx11).

                            I'll try the posted code on the 780ti next week. I'll try it on my quadro mobile too from nvidia

                            Comment


                              #15
                              Originally posted by strategesis View Post
                              So we have been able to isolate the problem: The indicator uses a thread to blink the price marker every 100 milliseconds, and that a) doesn't really work very well in NT8 (although it works quite well in NT7,) and b) is what's causing NT8 to eventually crash or else causes the chart window to hang and become completely unresponsive.

                              I have created and attached an indicator for NT8 which blinks the price marker whenever NT8 is connected to a market data feed.
                              .
                              In NT8B6 Playback-Market Replay:

                              This BlinkingPriceMarker - crashes NT (2 times) and no error in LOGS/Traces with Nvidia Quadro M2000M. (day 2 & 3).

                              When I run with the integrated graphics processor (Intel HD P530), it gives the error after a while and continues processing normally. (day 8?)

                              I did a mix of speeds...

                              2015-11-25 21:39:40:501 (Playback Connection) Cbi.Account.AccountItemCallback: account='Playback101' accountItem=CashValue currency=UsDollar value=*****
                              2015-11-25 22:10:41:770 ERROR: Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'External component has thrown an exception.'
                              2015-11-25 22:10:42:800 ERROR: A direct X error has occured while rendering the chart: HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: The object was not in the correct state to process the method.
                              2015-11-25 22:10:42:801 ERROR: Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: The object was not in the correct state to process the method. '

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Kaledus, Today, 01:29 PM
                              4 responses
                              11 views
                              0 likes
                              Last Post Kaledus
                              by Kaledus
                               
                              Started by alifarahani, Today, 09:40 AM
                              4 responses
                              21 views
                              0 likes
                              Last Post alifarahani  
                              Started by gentlebenthebear, Today, 01:30 AM
                              3 responses
                              16 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by PhillT, Today, 02:16 PM
                              2 responses
                              7 views
                              0 likes
                              Last Post PhillT
                              by PhillT
                               
                              Started by frankthearm, Yesterday, 09:08 AM
                              14 responses
                              47 views
                              0 likes
                              Last Post NinjaTrader_Clayton  
                              Working...
                              X