There are 2 factors that cause the problem, i.e. the problem does not occur if these 2 conditions are not fullfilled.
(1) I am using a simple default chart template that is set to session template 24/7. This is important as the lower (default chart) session template is in contradiction with the upper session template <instrument settings> shown when opening a new chart (see screenshot below, lower and upper refers to the position within the window!)
(2) I am connected to IB (IB is an amplifier here, but not the cause).
Now when opening a new chart (5 min , 65 days lookback), the chart actually loads in a 2-step process, if upper and lower session templates are not identical:
First data loading : upper session template = < instrument settings> -> Chart will now be displayed according to upper template.
Pause (courtesy of IB).
Second data loading : lower session template <24/7> -> Chart will now be displayed according to lower template (sometimes with data missing or double session break lines, see other threads)
Again, if the two session templates are identical, the 2-step-process becomes a 1-step-process, and there is no problem.
The little "Loading ..." text in the upper left corner is next to invisible, so I changed the time interval from 5 min to 15 min, while the second step of the loading process was still underway. This caused a complete crash of NT (reproducible).
I understand that the problem is amplified by IB's pacing restriction, but it may as well happen with other data suppliers.
Two suggestions here:
Replace the 2-step-process for contradicting templates by a 1- step-process of loading data. Only the lower session template is required as it is supposed to override the settings above!
In case a short sighted user (not seeing the little loading text) tries to change chart settings during the loading this should not crash NT.
This is the trace file section that shows an unhandled application exception.
2009-12-15 23:01:20:765 (Interactive Brokers) IB.HistoricalDataRequest.Send: request='ES;FUT;201003;0;;;GLOBEX;;USD;;;1 min;5 D;0;TRADES'
2009-12-15 23:01:20:765 (Interactive Brokers) IB.HistoricalDataRequest.Send: waiting 11,1 seconds
2009-12-15 23:01:20:781 UI (re)load complete, took 6,1 secs, 37,6 secs after app start
2009-12-15 23:01:33:187 (Interactive Brokers) IB.HistoricalDataRequest.Process: itemCount=5549 instrument='ES 03-10' from='2009-12-15' to='2009-12-15' period=1 Min splitAdjusted=False dividendAdjusted=False bars=0
2009-12-15 23:01:33:562 in OnUnhandledApplicationException
2009-12-15 23:01:33:671 ********* exception trapped *********
2009-12-15 23:01:33:671 Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
2009-12-15 23:01:33:671 System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei System.Windows.Forms.Control.MarshaledInvoke(Contr ol caller, Delegate method, Object[] args, Boolean synchronous)
bei System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
bei NinjaTrader.Cbi.SynchronizeInvoke.Invoke(Delegate method, Object[] args)
bei NinjaTrader.Gui.Chart.ChartControl.OnIntervalSelec tInWorkerThread(Object state)
bei System.Threading._ThreadPoolWaitCallback.WaitCallb ack_Context(Object state)
bei System.Threading.ExecutionContext.runTryCode(Objec t userData)
bei System.Runtime.CompilerServices.RuntimeHelpers.Exe cuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
bei System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
bei System.Threading._ThreadPoolWaitCallback.PerformWa itCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
bei System.Threading._ThreadPoolWaitCallback.PerformWa itCallback(Object state)
Comment