Note that there are some explanatory texts on larger screens.

plurals
  1. POHow is this stack trace possible in .Net?
    primarykey
    data
    text
    <p>My problem is some code that is getting called in a reentrant way which is causing it to crash and trying to debug how it can possibly be called by 2 threads or reentrant with the same thread. I added a log that gives the Environment.StackTrace and this is what it got at the end of this message.</p> <p>My confusion is after the line:</p> <pre><code>at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() </code></pre> <p>Those seem like the top or beginning of any stack. But notice that the stack trace actually begins before those lines. In fact, line previous to those above is this:</p> <pre><code>at TickZoom.MBTFIX.MBTFIXSimulator.OnTick(Message quoteMessage, SymbolInfo symbol, Tick tick) in C:\Local\TickZoom\Project\Public\Providers\MBTFIX\MBTFIXProvider\MBTFIX\MBTFIXSimulator.cs:line 481 </code></pre> <p>Here's the line 481:</p> <pre><code>if( trace) log.Trace("Sending tick: " + tick); </code></pre> <p>But that line is just a log message and can't in any possible way call System.Threading.ThreadHelper.ThreadStart(). So how does this crazy stack trace exist?</p> <pre><code>at TickZoom.MBTFIX.MBTFIXSimulator.OnTick(Message quoteMessage, SymbolInfo symbol, Tick tick) in C:\Local\TickZoom\Project\Public\Providers\MBTFIX\MBTFIXProvider\MBTFIX\MBTFIXSimulator.cs:line 479 at TickZoom.FIX.FIXServerSymbolHandler.ProcessOnTickCallBack() in C:\Local\TickZoom\Project\Public\Providers\Common\ProviderUtil\FIX\FIXServerSymbolHandler.cs:line 301 at TickZoom.Threading.TaskLoop.Run() in C:\Local\TickZoom\Project\Engine\Parallel\TaskBase.cs:line 669 at TickZoom.Threading.TaskBase.Execute(ThreadInfo thread) in C:\Local\TickZoom\Project\Engine\Parallel\TaskBase.cs:line 213 at TickZoom.Threading.ParallelManager.ExecuteTasks(ThreadInfo thread) in C:\Local\TickZoom\Project\Engine\Parallel\ParallelManager.cs:line 685 at TickZoom.Threading.ParallelManager.Run() in C:\Local\TickZoom\Project\Engine\Parallel\ParallelManager.cs:line 632 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() at TickZoom.MBTFIX.MBTFIXSimulator.OnTick(Message quoteMessage, SymbolInfo symbol, Tick tick) in C:\Local\TickZoom\Project\Public\Providers\MBTFIX\MBTFIXProvider\MBTFIX\MBTFIXSimulator.cs:line 481 at TickZoom.FIX.FIXServerSymbolHandler.ProcessOnTickCallBack() in C:\Local\TickZoom\Project\Public\Providers\Common\ProviderUtil\FIX\FIXServerSymbolHandler.cs:line 301 at TickZoom.Threading.TaskLoop.Run() in C:\Local\TickZoom\Project\Engine\Parallel\TaskBase.cs:line 669 at TickZoom.Threading.TaskBase.Execute(ThreadInfo thread) in C:\Local\TickZoom\Project\Engine\Parallel\TaskBase.cs:line 213 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload