Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

getting lots of render errors ---

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

    getting lots of render errors ---

    how to fix? do I need to uninstall Ninja and reinstall?

    ------------------------------

    (getting a lot of these..)

    2023-12-06 12:14:01:969 ERROR: Failed to call OnRender() for chart object 'ArrowUp': 'Object reference not set to an instance of an object.'
    2023-12-06 12:14:02:358 ChartObject.Render.ERROR: Render exception on non finalized chart object 'NinjaTrader.NinjaScript.DrawingTools.ArrowUp' System.NullReferenceException: Object reference not set to an instance of an object.
    at SharpDX.Direct2D1.RenderTarget.SetAntialiasMode(An tialiasMode antialiasMode)
    at NinjaTrader.NinjaScript.DrawingTools.ArrowMarkerBa se.OnRender(ChartControl chartControl, ChartScale chartScale)
    at NinjaTrader.Gui.Chart.ChartObject.Render(RenderTar get renderTarget, ChartControl chartControl, ChartScale chartScale)
    2023-12-06 12:14:02:359 ERROR: Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'Object reference not set to an instance of an object.'​



    ---------------------------------------------------------------------


    2023-12-06 12:14:02:358 ChartObject.Render.ERROR: Render exception on non finalized chart object 'NinjaTrader.NinjaScript.DrawingTools.ArrowUp' System.NullReferenceException: Object reference not set to an instance of an object.
    at SharpDX.Direct2D1.RenderTarget.SetAntialiasMode(An tialiasMode antialiasMode)
    at NinjaTrader.NinjaScript.DrawingTools.ArrowMarkerBa se.OnRender(ChartControl chartControl, ChartScale chartScale)
    at NinjaTrader.Gui.Chart.ChartObject.Render(RenderTar get renderTarget, ChartControl chartControl, ChartScale chartScale)



    ---------------------------------------------------------------------

    what about this??

    2023-12-06 06:30:14:701 (4073debcb34c4a31befcc721e8338054) Cbi.NinjaTraderProxy.OnStreamReadCompleted.Deseria lize.Exception: code = Constraint (19), message = System.Data.SQLite.SQLiteException (0x800027AF): constraint failed
    UNIQUE constraint failed: Instruments.Id
    at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
    at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
    at System.Data.SQLite.SQLiteDataReader.NextResult()
    at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCo mmand cmd, CommandBehavior behave)
    at System.Data.SQLite.SQLiteCommand.ExecuteReader(Com mandBehavior behavior)
    at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(C ommandBehavior behavior)
    at NinjaTrader.Cbi.Instrument.DbAdd(Boolean persist)
    at NinjaTrader.Server.HdsClient.ProcessStartupInfo(St artupInfo startupInfo, StartupInfoType startupInfoType, Object[]& startupInfoError, OnDemandUpdateOptions onDemandUpdateOptions, Func`3 syncStartupInfoCallback, Action`2 messageCallback)
    at NinjaTrader.Core.Deserializer.Deserialize(Boolean verifyEntitlement)
    at NinjaTrader.Core.Deserializer.Deserialize(Byte[] bytes, Int32 offset, Int32 length)
    at NinjaTrader.Cbi.NinjaTraderProxy.OnStreamReadCompl eted(IAsyncResult asyncResult)

    #2
    I am not overriding OnRender....

    Comment


      #3
      Hello llanqui,

      Many items in the platform use Onrender so this could be caused by something you are using or doing. Are you drawing arrows from your script or is anything you are using drawing arrows?

      The third error I don't have any details on, do you have a specific use case where that is observed?
      JesseNinjaTrader Customer Service

      Comment


        #4
        yes, I have a couple of indicators that draw arrows...am also drawing the large arrows that were provided by the forum...don't remember where...

        Comment


          #5
          the other one, the sql error seems to be very common...I have an SQLAnywhere database that I access with ODBC...but the error is for SQLite, which Ninja uses for its DB

          Comment


            #6
            I only draw the arrows with the standard Draw method, don't do any custom drawing

            Comment


              #7
              Hello llanqui,

              For the draw arrow errors I would suggest removing any scripts that currently draw arrows and then apply them one at a time and try to reproduce the error. That will let you isolate which script is having a problem so you can further diagnose that situation. If invalid values are passed to a drawing object that would be one reason why it may have OnRender errors, all drawing objects use OnRender.

              For the database error we would need to get specifics on what actions are being done when you see that. You can get database errors for items like trying to use a strategy that was enabled on a realtime account in playback or also the opposite. The error mentions instrument ID which may indicate a invalid instrument, you could try resetting the instruments to see if that is related.

              JesseNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Segwin, 05-07-2018, 02:15 PM
              14 responses
              1,789 views
              0 likes
              Last Post aligator  
              Started by Jimmyk, 01-26-2018, 05:19 AM
              6 responses
              837 views
              0 likes
              Last Post emuns
              by emuns
               
              Started by jxs_xrj, 01-12-2020, 09:49 AM
              6 responses
              3,293 views
              1 like
              Last Post jgualdronc  
              Started by Touch-Ups, Today, 10:36 AM
              0 responses
              13 views
              0 likes
              Last Post Touch-Ups  
              Started by geddyisodin, 04-25-2024, 05:20 AM
              11 responses
              63 views
              0 likes
              Last Post halgo_boulder  
              Working...
              X