﻿<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/css' href='https://stocksharp.com/css/style.css'?>
<?xml-stylesheet type='text/css' href='https://stocksharp.com/css/bbeditor.css'?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html">[3.0.6] NRE during xml strategy report generating</title>
  <id>~/topic/1389/3_0_6-nre-during-xml-strategy-report-generating/</id>
  <rights type="text">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  <updated>2026-06-15T03:08:50Z</updated>
  <logo>https://stocksharp.com/images/logo.png</logo>
  <link href="https://stocksharp.com/handlers/atom.ashx?category=topic&amp;id=1389" rel="self" type="application/rss+xml" />
  <entry>
    <id>https://stocksharp.com/posts/m/6186/</id>
    <title type="text">Да, ошибка возникла в связи с отсутствием информации в Security.BestPair. Причина - теперь информаци...</title>
    <published>2011-02-22T22:11:05Z</published>
    <updated>2011-02-22T22:11:05Z</updated>
    <author>
      <name>Mikhail Sukhov</name>
      <uri>https://stocksharp.com/users/201/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;p&gt;Да, ошибка возникла в связи с отсутствием информации в Security.BestPair. Причина - теперь информация по инструментам урезана. Буду чинить.&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/6185/</id>
    <title type="text">У меня подобная же ошибка возникла. Сообщение и стек: SysTrend1.vshost.exe Error: 0 : 02/22/2011 00:...</title>
    <published>2011-02-22T21:26:30Z</published>
    <updated>2011-02-22T21:26:30Z</updated>
    <author>
      <name>aerv</name>
      <uri>https://stocksharp.com/users/28151/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;p&gt;У меня подобная же ошибка возникла. Сообщение и стек:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;SysTrend1.vshost.exe Error: 0 : 02/22/2011 00:10:46 AppDomain.CurrentDomain.UnhandledException:
System.NullReferenceException: В экземпляре объекта не задана ссылка на объект.
в Ecng.Trading.Algo.TraderHelper.GetMarketPrice(MarketDepthPair bestPair, OrderDirections direction, Unit priceDelta, MarketPriceTypes priceType)
в Ecng.Trading.Algo.TraderHelper.GetMarketPrice(Security security, OrderDirections direction, Unit priceDelta, MarketPriceTypes priceType)
в Ecng.Trading.Algo.TraderHelper.GetPnL(Security security, Int32 position)
в Ecng.Trading.Algo.PnL.BasePnLManager.#=q4z7hGLQmC4To4MUYrKCPoQ==(KeyValuePair&lt;code&gt;2 #=q3aUBUrNM4J6zJu1AEiAHyw==) в System.Linq.Enumerable.WhereSelectEnumerableIterator&lt;/code&gt;2.MoveNext()
в System.Linq.Enumerable.Sum(IEnumerable&lt;code&gt;1 source) в System.Linq.Enumerable.Sum[TSource](IEnumerable&lt;/code&gt;1 source, Func&lt;code&gt;2 selector) в Ecng.Trading.Algo.PnL.BasePnLManager.#=qOb0I0vMPf2cJ1_Ce6$PaKA==(SynchronizedDictionary&lt;/code&gt;2 #=q8Q18He3vjGIQifyaBiyMTg==)
в Ecng.Collections.CollectionHelper.SyncGet[TCollection,TResult](TCollection collection, Func`2 func)
в Ecng.Trading.Algo.PnL.BasePnLManager.get_PnL()
в SysTrend1.MainWindow.&lt;OnStrategyPropertyChanged&gt;b__a() в ...\MainWindow.xaml.cs:строка 277
...&lt;/p&gt;
&lt;/blockquote&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/6176/</id>
    <title type="text">Во время генерации отчёта получаю NRE: System.NullReferenceException was unhandled Message=Object re...</title>
    <published>2011-02-22T16:21:51Z</published>
    <updated>2011-02-22T16:22:24Z</updated>
    <author>
      <name>Alexander</name>
      <uri>https://stocksharp.com/users/2826/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;p&gt;Во время генерации отчёта получаю NRE:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;System.NullReferenceException was unhandled
Message=Object reference not set to an instance of an object.
Source=Ecng.Trading.Algo
StackTrace:
at Ecng.Trading.Algo.TraderHelper.GetMarketPrice(MarketDepthPair bestPair, OrderDirections direction, Unit priceDelta, MarketPriceTypes priceType)
at Ecng.Trading.Algo.TraderHelper.GetMarketPrice(Security security, OrderDirections direction, Unit priceDelta, MarketPriceTypes priceType)
at Ecng.Trading.Algo.TraderHelper.GetPnL(Security security, Int64 position)
at Ecng.Trading.Algo.PnL.BasePnLManager.#=qz1Pkad79BLeG2zoFC7yZRg==(KeyValuePair&lt;code&gt;2 #=qHo8yqiDKe24tIIMpwIwDzQ==) at System.Linq.Enumerable.WhereSelectEnumerableIterator&lt;/code&gt;2.MoveNext()
at System.Linq.Enumerable.Sum(IEnumerable&lt;code&gt;1 source) at Ecng.Trading.Algo.PnL.BasePnLManager.#=qpKurmy48WsO2SD4_Xp_sKw==(SynchronizedDictionary&lt;/code&gt;2 #=qUPvW0wVJA2FikCQK_objkg==)
at Ecng.Collections.CollectionHelper.SyncGet[TCollection,TResult](TCollection collection, Func`2 func)
at Ecng.Trading.Algo.PnL.BasePnLManager.get_PnL()
at Ecng.Trading.Algo.Reporting.XmlStrategyReport.Generate()
at Robots.MainWindow.MainWindow.GenerateStrategyReports(Strategy strategy) in c:\Users\Alexander\Documents\Visual Studio 2010\Projects\Robots\Robots\MainWindow\MainWindow.xaml.cs:line 71
at Robots.MainWindow.MainWindow.OnClosing(CancelEventArgs e) in c:\Users\Alexander\Documents\Visual Studio 2010\Projects\Robots\Robots\MainWindow\MainWindow.xaml.cs:line 136
at System.Windows.Window.WmClose()
at System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)
at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; 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)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG&amp;amp; msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at Robots.App.Main() in c:\Users\Alexander\Documents\Visual Studio 2010\Projects\Robots\Robots\obj\x86\Debug\App.g.cs:line 0
InnerException:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;На предыдущих версиях такой ошибки не было.&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
</feed>