Ошибка Object reference not set to an instance of an object.
Следующая последовательность действий:
Выбрал для плазы все инструменты. Запустил ее-все ок. Остановил. Захотел посмотреть все сделки. Выбрал единственную строчку-AllPlaza, нажал кнопку сделки и получил ошибку:
System.NullReferenceException was unhandled by user code
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=Hydra
StackTrace:
at StockSharp.Hydra.TradesWindow.GetStorage() in C:\Users\Administrator\Documents\Visual Studio 2010\Projects\StockSharp\Connectors\trunk\Hydra\Hydra\TradesWindow.xaml.cs:line 57
at StockSharp.Hydra.TradesWindow.GetTrades() in C:\Users\Administrator\Documents\Visual Studio 2010\Projects\StockSharp\Connectors\trunk\Hydra\Hydra\TradesWindow.xaml.cs:line 52
at StockSharp.Hydra.TradesWindow.FindClick(Object sender, RoutedEventArgs e) in C:\Users\Administrator\Documents\Visual Studio 2010\Projects\StockSharp\Connectors\trunk\Hydra\Hydra\TradesWindow.xaml.cs:line 65
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(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.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
InnerException:
Произошла она вот в этой строчке:
private IMarketDataStorage<Trade> GetStorage()
{
return StorageRegistry.GetTradeStorage(Security, SourcePath.SelectedDrive);
}
в TradesWindow.xaml
По какой причине понятно-я же не конкретный инструмент выбрал, а по идее AllPlaza. Но как при этом посмотреть по конкретному инструменту?