Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

B12 Race Condition - Connect on Startup to Data Provider

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

    #16
    Originally posted by strategesis View Post
    I have some workspaces which show the problem with some reliability. However, they do reference my code. I'd have to also provide you with protected DLLs for my indicators. Or, if you really need to see the source code (debugging,) I'd require that you sign an NDA.
    I was having this problem. However I dispose of my objects straight after usage within OnRender. Hope that helps..........

    I'd require that you sign an NDA.[/
    LOL.... that means nothing in this industry

    Comment


      #17
      This scenario still an issue in RC2, but narrower in scope

      OK, a "connect on startup" race still present in RC2, and i've isolated it to one specific case. I have an indicator that loads 5 1-minute bar series in State.Configure

      AddDataSeries({SOME INSTRUMENT}, Data.BarsPeriodType.Minute, 1, Data.MarketDataType.Last);

      Having this indicator on a chart that gets loaded from a workspace while connecting to my data provider yields this stack trace every time:


      2016-10-11 14:33:16:616 *************** unhandled exception trapped ***************
      2016-10-11 14:33:16:616 Exception has been thrown by the target of an invocation.
      2016-10-11 14:33:16:617 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
      Parameter name: index
      at System.ThrowHelper.ThrowArgumentOutOfRangeExceptio n(ExceptionArgument argument, ExceptionResource resource)
      at System.Collections.Generic.List`1.get_Item(Int32 index)
      at NinjaTrader.Gui.Chart.ChartControl.ApplyNinjaScrip ts()
      at System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout)
      at System.Windows.Threading.Dispatcher.Invoke(Action callback)
      at NinjaTrader.Gui.Chart.ChartControl.OnBarsToLoadCol lectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
      at System.Collections.ObjectModel.ObservableCollectio n`1.OnCollectionChanged(NotifyCollectionChangedEve ntArgs e)
      at System.Collections.ObjectModel.ObservableCollectio n`1.RemoveItem(Int32 index)
      at System.Collections.ObjectModel.Collection`1.Remove (T item)
      at NinjaTrader.Gui.Chart.ChartControl.<>c__DisplayCla ss479_1.<OnGetBarsCallback>b__0(Bars bars, ChartControl chartControl, ChartBars chartBars2)
      --- 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)

      EDIT -

      Getting this one as well, about 50% of the time:

      2016-10-11 15:15:37:955 ERROR: Data.Bars.ClearCache: System.IO.IOException: The process cannot access the file 'C:\Users\Lab4\Documents\NinjaTrader 8\db\cache\CME US Index Futures ETH.Pacific Standard Time\MINUTE\ES ##-##\Minute_1_4_Last_Close_Tick_Minute_1.20161005150 0.209912010000.LastSR.ntt' because it is being used by another process.
      at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
      at System.IO.File.InternalDelete(String path, Boolean checkHost)
      at NinjaTrader.Data.BarsSeries.ClearCache(Instrument instrument, DateTime firstData2Clear, Boolean clearReplayCache)
      Last edited by RanchoDinero; 10-11-2016, 04:17 PM.

      Comment


        #18
        Bump. Were you guys able to repro?

        Comment


          #19
          On the original thread we were able to reproduce rendertarget unavailability during OnRender(). We have made code changes in next release to prevent this from happening during an OnRender() call. Were still working on some related cases which was brought up from this report so I don't have much else to update with.

          As to Rancho Dinero's case reported, we tried many variations and were unable to reproduce. We believe it to be a separate issue that needs to be looked into.. Rancho, would you be willing to work with me one on one and potentially test an advanced release next few days and work together on that if you had time? Please contact me at platformsupport at ninjatrader dot com ATTN: Product Management and reference this thread. I'll likely supply you a custom build + potentially try to grab a strategy to reproduce.

          Note: On your edit attached issue on file access, we had been working on this as well from a seperate report. Likely is resolved already in next build but again would work with you to isolate further if you had time.

          -Brett

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by TraderBCL, Today, 04:38 AM
          2 responses
          7 views
          0 likes
          Last Post TraderBCL  
          Started by martin70, 03-24-2023, 04:58 AM
          14 responses
          105 views
          0 likes
          Last Post martin70  
          Started by Radano, 06-10-2021, 01:40 AM
          19 responses
          606 views
          0 likes
          Last Post Radano
          by Radano
           
          Started by KenneGaray, Today, 03:48 AM
          0 responses
          4 views
          0 likes
          Last Post KenneGaray  
          Started by thanajo, 05-04-2021, 02:11 AM
          4 responses
          471 views
          0 likes
          Last Post tradingnasdaqprueba  
          Working...
          X