Runtime Flow blog (Understanding a control flow in a running .NET application)

September 11, 2011

Call stack depth limits

Filed under: Uncategorized — Sergey Vlasov @ 10:47 am

When viewing deep function calls in the Runtime Flow window you may hit a WPF layout recursion limit. To illustrate this problem I created a very simple application:

    class Program
    {
        static void Main(string[] args)
        {
            f(1);
        }

        static void f(int i)
        {
            if (i < 500)
                f(i + 1);
        }
    }

In Runtime Flow portable you can open maximum 58 recursive calls:

Maximum supported stack depth in Runtime Flow .NET 3.5

Maximum supported stack depth in Runtime Flow .NET 3.5


If you try to see more calls you get the following error:
Layout recursion limit reached WPF error

Layout recursion limit reached WPF error

The same problem exists when you view monitoring results in Visual Studio 2008/2005. In .NET 4.0 the layout recursion limit is increased from 255 to 4096. So in Visual Studio 2010 you can view much deeper stacks (though not 1024 deep due to other limitations).

I’ve created an additional Runtime Flow portable binary built for .NET 4.0 to enable more deep stack investigations:

Runtime Flow portable binaries for .NET 3.5 and .NET 4.0

Runtime Flow portable binaries for .NET 3.5 and .NET 4.0

If you have .NET 4.0 installed on the machine, it is now recommended to use RuntimeFlowPortable.NET40.exe instead of RuntimeFlowPortable.NET35.exe. It supports stacks up to 285 function calls:

Maximum supported stack depth in Runtime Flow .NET 4.0

Maximum supported stack depth in Runtime Flow .NET 4.0

Download link: Runtime Flow portable edition v1.3.1.

September 7, 2011

Pause and resume monitoring

Filed under: Uncategorized — Sergey Vlasov @ 4:09 pm

I’ve added the ability to pause and resume monitoring. After you’ve started monitoring (with Run or Customized Run) and have executed a use case, you can press the Pause button on the Runtime Flow toolbar:

The Pause button on the Runtime Flow toolbar

The Pause button on the Runtime Flow toolbar

Pause stops all updates to the Runtime Flow and Runtime Summary windows and eliminates most of monitoring overhead (speeding up the monitored application and limiting memory consumption). In this mode you can browse collected events and execute tasks in your application not required monitoring.

When you are ready to run a next use case, press the Resume button:

The Resume button on the Runtime Flow toolbar

The Resume button on the Runtime Flow toolbar

Resume clears the Runtime Flow and Runtime Summary windows and resumes normal monitoring events processing.

The most common case to not collect monitoring data is to skip application startup. For convenience, I’ve added the Monitor application startup option:

Monitor application startup option

Monitor application startup option

With Monitor application startup unchecked, no flow data is collected until you click the Resume button. This is useful when monitoring complex apps with very big initialization routines that you are not interested in.

Download links for Runtime Flow v1.3.0: Visual Studio edition, Portable edition.

April 29, 2011

New host

Filed under: Uncategorized — Sergey Vlasov @ 2:04 pm

Runtime Flow home page is now a part of Sergey Vlasov Studio website. This blog address was changed, Runtime Flow binaries were updated.

February 22, 2011

Runtime Flow v1.2.6 released

Filed under: Uncategorized — Sergey Vlasov @ 4:46 am

Runtime Flow v1.2.6 released – fixed inability to start monitoring for projects with the trailing slash at the end of the working directory path.

Download links: Visual Studio edition, Portable edition.

January 13, 2011

Runtime Flow v1.2.5 released

Filed under: Uncategorized — Sergey Vlasov @ 3:32 am

Runtime Flow v1.2.5 released – fixed inability to find a startup project inside a solution folder.

September 25, 2010

Runtime Flow v1.2.2 released

Filed under: Uncategorized — Sergey Vlasov @ 3:14 pm

Runtime Flow v1.2.2 released – fixed an unhandled exception for solutions with unloaded projects.

September 12, 2010

Runtime Flow v1.2.1 released

Filed under: Uncategorized — Sergey Vlasov @ 7:13 am

Runtime Flow v1.2.1 released – added the portable edition, added browse buttons to the Customized run dialog, added the E-mail support button to the toolbar.

Portable Edition

Filed under: Uncategorized — Sergey Vlasov @ 7:08 am

I’ve created the portable Runtime Flow edition that can work without Visual Studio and almost without installation. It should be perfect for troubleshooting problems after deployment. The main window contains the toolbar that performs exactly the same functions as the toolbar integrated with Visual Studio:

Runtime Flow portable edition

Runtime Flow portable edition

You can download the portable edition as a zip archive containing following files:

Runtime Flow portable files

Runtime Flow portable files

The only installation step required is profiler COM class registration. If you don’t have admin rights and you only need to monitor applications under the current account, run “Register profiler for the current user.cmd”. If you have admin rights, it is recommended to run “Register profiler for the local machine.cmd”. When no longer needed, you can unregister the profiler with the appropriate “Unregister…” script.

Runtime Flow portable requires .NET 3.5 SP1 to be installed (or .NET 3.0 plus VS 2008 C++ runtime) when running on Windows XP and Vista. On Windows 7 no additional components required.

Download link: Runtime Flow portable v1.2.1.

September 4, 2010

Runtime Flow v1.2.0 released

Filed under: Uncategorized — Sergey Vlasov @ 4:56 pm

Runtime Flow v1.2.0 released:

  • added persistence for monitoring options and customized run settings,
  • added the Copy as text command to the Flow and Summary windows,
  • added target window opening if it was hidden on the locate in other window command,
  • added function return type for tail calls,
  • changed parenthesis around object data to curly braces,
  • disabled filter buttons when empty class name is selected in the Summary window,
  • fixed filter expression for functions with empty class name,
  • fixed not visible tooltips for floating windows.

August 26, 2010

Troubleshooting Visual Studio LightSwitch IDE extension installation using Runtime Flow

Filed under: Uncategorized — Sergey Vlasov @ 7:21 am

With the Visual Studio LightSwitch Beta 1 release this week, I wanted to verify that Text Sharp – Visual Studio 2010 text clarity tuner is compatible with the standalone LightSwitch installation:

Visual Studio LightSwitch Beta standalone IDE startup

Visual Studio LightSwitch Beta standalone IDE startup

Unfortunately, running the TextSharp_12.vsix installer gave me the “This extension is not installable on any currently installed products” error:

Visual Studio Extension Installer error

Visual Studio Extension Installer error

.vsixmanifest for Text Sharp contained the following list of supported products:

    <SupportedProducts>
      <VisualStudio Version="10.0">
        <Edition>Pro</Edition>
      </VisualStudio>
    </SupportedProducts>

I looked for documentation specifying what needs to be added for LightSwitch, bug found absolutely nothing. Then I decided to look inside the vsix installer using Runtime Flow.

With the error message box on the screen, using Process Explorer I found the path to the vsix installer and that its command line contained just path to TextSharp_12.vsix. I installed Runtime Flow on the same machine for LightSwitch IDE (no problems this time) and set up customized monitoring run:

Runtime Flow customized run settings for VSIX installer monitoring

Runtime Flow customized run settings for VSIX installer monitoring

I received the same installation error under Runtime Flow monitoring and tried to find the call to show message box (that should be close to the place when the error occurs). I thought it would be the last call in the Runtime Flow tree, but after opening several levels of calls I didn’t feel that I was going in the right direction:

Going to the last call in the Runtime Flow tree

Going to the last call in the Runtime Flow tree

Then I opened the Runtime Summary window and for VSIXInstaller.exe several SupportedSKU classes immediately caught my attention:

Classes and functions called in the VSIX installer

Classes and functions called in the VSIX installer

I selected get_SupportedSKUsList, clicked Locate in flow and appeared at the beginning of a very interesting sequence of calls:

Supported editions check in the VSIX installer

Supported editions check in the VSIX installer

It was clearly visible that the supported edition strings were compared with VSLS and returned false. Indeed adding the VSLS edition to .vsixmanifest in Text Sharp solved the original problem:

    <SupportedProducts>
      <VisualStudio Version="10.0">
        <Edition>Pro</Edition>
        <Edition>VSLS</Edition>
      </VisualStudio>
    </SupportedProducts>

Successful start of the Text Sharp installer

Successful start of the Text Sharp installer


Successful Text Sharp installation

Successful Text Sharp installation

« Newer PostsOlder Posts »

Blog at WordPress.com.