Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

System.NullReferenceException NinjaTrader.NinjaScript.FillType.SetState(State state)

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

    System.NullReferenceException NinjaTrader.NinjaScript.FillType.SetState(State state)

    Hello,

    I'm playing with some AddOns and few other unsupported GUI stuff and I'm getting this kind of errors after having excluded all my custom Indicators/AddOns/Strategies (and having restarted Ninja, of course).
    What's weird is if I launch the 32 bits version after having the error with the 64 bit version I don't have the exception anymore.
    I I then relaunch the 64 bit version the error is back...

    015-07-21 22:04:17:744 Cbi.Instrument.RequestBars (to Provider): instrument='ES 09-15' from='07/21/2015 00:00:00' to='07/21/2015 00:00:00' period='1 Minute'
    2015-07-21 22:04:21:623 *************** unhandled exception trapped ***************
    2015-07-21 22:04:21:623 Object reference not set to an instance of an object.
    2015-07-21 22:04:21:629 System.NullReferenceException: Object reference not set to an instance of an object.
    at NinjaTrader.NinjaScript.FillType.SetState(State state)
    at NinjaTrader.NinjaScript.StrategyBase.OnAfterSetSta te()
    at NinjaTrader.NinjaScript.NinjaScriptBase.SetState(S tate state)
    at NinjaTrader.Gui.NinjaScript.StrategyRenderBase.Set State(State state)
    at NinjaTrader.NinjaScript.StrategyBase.CreateNewGene ration(Nullable`1 forcePlotsMaximumBarsLookBackInfinite, Nullable`1 includeTradeHistoryInBacktest)
    at NinjaTrader.Gui.Chart.ChartControl.StrategyEnable( StrategyRenderBase strategy, ChartBars cb, Boolean isAdded)
    at NinjaTrader.Gui.Chart.ChartControl.ApplyStrategy(S trategyRenderBase originalStrategy, StrategyRenderBase strategy, ChartBars cb, Boolean isAdded)
    at NinjaTrader.Gui.Chart.ChartControl.HandleStrategie s(List`1 strategiesChanged, IEnumerable`1 strategyBases, List`1 strategiesToApply)
    at NinjaTrader.Gui.Chart.ChartControl.<>c__DisplayCla ss4d.<OnStrategiesHotKey>b__48()
    at NinjaTrader.Gui.Chart.ChartControl.OnStrategiesHot Key(Object sender, KeyEventArgs e)
    at NinjaTrader.Gui.Chart.ChartCommands.StrategiesExec uted(Object sender, ExecutedRoutedEventArgs e)
    at System.Windows.Input.CommandBinding.OnExecuted(Obj ect sender, ExecutedRoutedEventArgs e)
    at System.Windows.Input.CommandManager.ExecuteCommand Binding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
    at System.Windows.Input.CommandManager.FindCommandBin ding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
    at System.Windows.Input.CommandManager.FindCommandBin ding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
    at System.Windows.Input.CommandManager.OnExecuted(Obj ect sender, ExecutedRoutedEventArgs e)
    at System.Windows.RoutedEventArgs.InvokeHandler(Deleg ate handler, Object target)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandle r(Object target, RoutedEventArgs routedEventArgs)
    at System.Windows.EventRoute.InvokeHandlersImpl(Objec t source, RoutedEventArgs args, Boolean reRaised)
    at System.Windows.UIElement.RaiseEventImpl(Dependency Object sender, RoutedEventArgs args)
    at System.Windows.Input.RoutedCommand.ExecuteImpl(Obj ect parameter, IInputElement target, Boolean userInitiated)
    at System.Windows.Input.CommandManager.TransferEvent( IInputElement newSource, ExecutedRoutedEventArgs e)
    at System.Windows.Input.CommandManager.OnExecuted(Obj ect sender, ExecutedRoutedEventArgs e)
    at System.Windows.RoutedEventArgs.InvokeHandler(Deleg ate handler, Object target)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandle r(Object target, RoutedEventArgs routedEventArgs)
    at System.Windows.EventRoute.InvokeHandlersImpl(Objec t source, RoutedEventArgs args, Boolean reRaised)
    at System.Windows.UIElement.RaiseEventImpl(Dependency Object sender, RoutedEventArgs args)
    at System.Windows.Input.RoutedCommand.ExecuteImpl(Obj ect parameter, IInputElement target, Boolean userInitiated)
    at System.Windows.Controls.Primitives.ButtonBase.OnCl ick()
    at System.Windows.Controls.Button.OnClick()
    at System.Windows.Controls.Primitives.ButtonBase.OnMo useLeftButtonUp(MouseButtonEventArgs e)
    at System.Windows.RoutedEventArgs.InvokeHandler(Deleg ate handler, Object target)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandle r(Object target, RoutedEventArgs routedEventArgs)
    at System.Windows.EventRoute.InvokeHandlersImpl(Objec t source, RoutedEventArgs args, Boolean reRaised)
    at System.Windows.UIElement.ReRaiseEventAs(Dependency Object sender, RoutedEventArgs args, RoutedEvent newEvent)
    at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
    at System.Windows.RoutedEventArgs.InvokeHandler(Deleg ate handler, Object target)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandle r(Object target, RoutedEventArgs routedEventArgs)
    at System.Windows.EventRoute.InvokeHandlersImpl(Objec t source, RoutedEventArgs args, Boolean reRaised)
    at System.Windows.UIElement.RaiseEventImpl(Dependency Object sender, RoutedEventArgs args)
    at System.Windows.UIElement.RaiseTrustedEvent(RoutedE ventArgs args)
    at System.Windows.Input.InputManager.ProcessStagingAr ea()
    at System.Windows.Input.InputManager.ProcessInput(Inp utEventArgs input)
    at System.Windows.Input.InputProviderSite.ReportInput (InputReport inputReport)
    at System.Windows.Interop.HwndMouseInputProvider.Repo rtInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
    at System.Windows.Interop.HwndMouseInputProvider.Filt erMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at System.Windows.Interop.HwndSource.InputFilterMessa ge(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndSubclass.DispatcherCallbackOperation( Object o)
    at System.Windows.Threading.ExceptionWrapper.Internal RealCall(Delegate callback, Object args, Int32 numArgs)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCat chWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

    #2
    Sam,

    What TimeZone was this computer? I have seen this issue and think it is related to historical data. I can no long debug ninjascript on my computer after 8PM EST as I get these and sometime other errors. Then in the morning rerun the same failing script and it works fine. I will try the 32 bit version as well to see if the historical data load is an issue.

    What I am guessing is there is a data request up to Midnight for historical data, but midnight might be GMT as I am cut off right at 8PM.

    Last edited by NJA_MC; 07-21-2015, 07:50 PM.

    Comment


      #3
      Hmm, it doesn't seems to be related, I tried with two machines in two different time zones (Europe Paris/Berlin and Pacific time).

      Sam

      Comment


        #4
        Hello sam028,

        Thank you for bringing this to our attention.

        Would you mind sending over your Log and Trace files for when this occurs in 64 bit to platformsupport[at]ninjatrader[dot]com with this thread as reference?

        You will find the files under (My) Documents\NinjaTrader 8\Log and Trace. We will need the files for the date this exception occurred.

        Reference thread: http://ninjatrader.com/support/forum...ad.php?t=76407

        Comment


          #5
          me too

          I'm getting this too. Fairly often. I captured this from the Trace file. I had just clicked the Save button in an editor window (I've been doing that regularly to not lose too much work when there is a crash.)

          2015-10-08 09:57:29:951 in OnUnhandledApplicationException
          2015-10-08 09:57:29:953 *************** unhandled exception trapped ***************
          2015-10-08 09:57:29:953 Object reference not set to an instance of an object.
          2015-10-08 09:57:29:953 System.NullReferenceException: Object reference not set to an instance of an object.
          at NinjaTrader.Data.HotKeyMessageFilter.PreFilterMess age(Message& m)
          at System.Windows.Forms.Application.ThreadContext.Pro cessFilters(MSG& msg, Boolean& modified)
          at System.Windows.Forms.Application.ThreadContext.Pre TranslateMessage(MSG& msg)
          at System.Windows.Forms.Application.ThreadContext.Sys tem.Windows.Forms.UnsafeNativeMethods.IMsoComponen t.FPreTranslateMessage(MSG& msg)
          at System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
          at System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason, ApplicationContext context)
          at System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason, ApplicationContext context)
          at System.Windows.Forms.Application.Run()
          at NinjaTrader.NTMain.Main()

          Comment


            #6
            and again, half hour later

            I'm running in Parallels on a mac, if that makes any difference (it shouldn't)
            saltminer


            2015-10-08 10:35:46:986 in OnUnhandledApplicationException
            2015-10-08 10:35:46:988 *************** unhandled exception trapped ***************
            2015-10-08 10:35:46:988 Object reference not set to an instance of an object.
            2015-10-08 10:35:46:988 System.NullReferenceException: Object reference not set to an instance of an object.
            at NinjaTrader.Data.HotKeyMessageFilter.PreFilterMess age(Message& m)
            at System.Windows.Forms.Application.ThreadContext.Pro cessFilters(MSG& msg, Boolean& modified)
            at System.Windows.Forms.Application.ThreadContext.Pre TranslateMessage(MSG& msg)
            at System.Windows.Forms.Application.ThreadContext.Sys tem.Windows.Forms.UnsafeNativeMethods.IMsoComponen t.FPreTranslateMessage(MSG& msg)
            at System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
            at System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason, ApplicationContext context)
            at System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason, ApplicationContext context)
            at System.Windows.Forms.Application.Run()
            at NinjaTrader.NTMain.Main()

            Comment


              #7
              Hi saltminer,

              Can I have you send in your log and trace files as well to platformsupport [at] ninjatrader [dot] com?

              You will find your log files within:

              (My) Documents\NinjaTrader 8\log\

              Please send me all files marked with today's date.

              log.20151014.*****.txt

              You will find your trace files within:

              (My) Documents\NinjaTrader 8\trace\

              Please also send me all trace files marked with today's date.

              trace.20151014.*****.txt
              Chelsea B.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Kaledus, Today, 01:29 PM
              0 responses
              3 views
              0 likes
              Last Post Kaledus
              by Kaledus
               
              Started by PaulMohn, Today, 12:36 PM
              1 response
              16 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by yertle, Yesterday, 08:38 AM
              8 responses
              37 views
              0 likes
              Last Post ryjoga
              by ryjoga
               
              Started by rdtdale, Today, 01:02 PM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by alifarahani, Today, 09:40 AM
              3 responses
              19 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X