Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exception has been thrown by the target of an invocation.

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

    Exception has been thrown by the target of an invocation.

    Hi,
    I have been struggling with this error for awhile, It seems there is a casting error my assumption would be there is int and it should be bigint
    The temporary solution I am using right now I delete the SQL DB and report again but this issue keeps happen every like 4-6 hours which is annoying
    Based on my experience the cause of the issue as explained one of the number which suppose to be int grow and become big int which can't be casted anymore

    I hope this info help your team




    2024-02-03 00:30:07:996 Exception has been thrown by the target of an invocation.
    2024-02-03 00:30:07:997 Specified cast is not valid.
    2024-02-03 00:30:07:998 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Specified cast is not valid.
    at System.Data.SQLite.SQLiteDataReader.VerifyType(Int 32 i, DbType typ)
    at System.Data.SQLite.SQLiteDataReader.GetDouble(Int3 2 i)
    at NinjaTrader.Cbi.Execution.DbGetExecutions1(IDbComm and cmd)
    at NinjaTrader.Cbi.Execution.DbGet(Account account, Instrument instrument, DateTime minTime, DateTime maxTime)
    at NinjaTrader.Gui.Chart.ChartBars.LoadExecutionsByAc count(ChartBars chartBars, Account account, ChartControl chartControl)
    at NinjaTrader.Gui.Chart.ChartBars.CollectExecutions( ChartControl chartControl)
    at NinjaTrader.Gui.Chart.ChartControl.<>c__DisplayCla ss438_0.<OnGetBarsCallback>b__0(Bars bars, ChartControl chartControl, ChartBars chartBars2, Int32 generation)
    --- End of inner exception stack trace ---
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
    at System.Reflection.RuntimeMethodInfo.UnsafeInvokeIn ternal(Object obj, Object[] parameters, Object[] arguments)
    at System.Delegate.DynamicInvokeImpl(Object[] args)
    at System.Windows.Threading.ExceptionWrapper.Internal RealCall(Delegate callback, Object args, Int32 numArgs)
    at System.Windows.Threading.ExceptionWrapper.TryCatch When(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)


    #2
    Hello khaled_cs,

    Thank you for posting.

    So I may look into this further please go to Help->Email Support and be sure to include Attn: Chris Jameson in the Subject line, a link to this thread in the body and a check in the box for "Log and trace files".

    Thanks in advance.
    Last edited by NinjaTrader_ChristopherJ; 02-05-2024, 10:06 AM.
    Christopher J.NinjaTrader Customer Service

    Comment


      #3
      Hi,
      I sent you the email, please let me know if you need anything else!

      Looking forward for the update from you.

      Regards,
      Khaled Dehia

      Comment


        #4
        NinjaTrader_ChristopherJ Can you update the end users on the status of this issue? Seems it's showing up more and more across the Desktop Platform... The solution is to replace the database... But that is not advised or practical since all historic data is lost along with any automated strategies that have been added...

        Comment


          #5
          This is scheduled to be resolved in the next release of NinjaTrader however I do not currently have a specific date available at this time of when this will be available to the general public.
          Christopher J.NinjaTrader Customer Service

          Comment


            #6
            NinjaTrader_ChristopherJ So what would you suggest to customers who need their historic data out of the old database? Particularly trade performance information...

            Comment


              #7
              @NinjaTrader_ChristopherJ​ Is there an update on this? Is there workaround? This is affecting my trading as the charts don't load up, indicators can't be added etc. Is there an older version free from this bug that I can go back to?

              Comment


                #8
                To resolve the issue mentioned in this thread a new database was created using the following steps:
                • Shutdown NinjaTrader and Go to the Start Menu
                • Select My Documents--> NinjaTrader 8--> db--> "NinjaTrader.sqlite" file (may only say 'NinjaTrader' depending on your Windows File Explorer settings)
                • Right click on NinjaTrader.sqlite and select "Rename"
                • Name it "OLDNinjaTrader.sqlite"
                • Then restart the software and NinjaTrader will create a fresh database file to use
                Unfortunately the following items stored in the old database will be lost - Trading Hours templates, Instrument Lists / Custom Instruments, historical trade execution data, saved Strategy Analyzer backtest results
                Christopher J.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by cre8able, Yesterday, 01:16 PM
                3 responses
                11 views
                0 likes
                Last Post cre8able  
                Started by ChartTourist, Today, 08:22 AM
                0 responses
                5 views
                0 likes
                Last Post ChartTourist  
                Started by LiamTwine, Today, 08:10 AM
                0 responses
                2 views
                0 likes
                Last Post LiamTwine  
                Started by Balage0922, Today, 07:38 AM
                0 responses
                5 views
                0 likes
                Last Post Balage0922  
                Started by JoMoon2024, Today, 06:56 AM
                0 responses
                6 views
                0 likes
                Last Post JoMoon2024  
                Working...
                X