Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TPL ETW events have extra parameters that cause excessive debugger output

Tags:

.net

Update: this is not related to Prefix

I had an earlier version of Prefix installed. I upgraded by running the new installer. After upgrading in VS.NET 2015 Update 3, I see these messages in the Debug output window when the Prefix module is loaded. These messages do not appear when Prefix modules are not loaded.

Event 10 was called with 5 argument(s) , but it is defined with 6 paramenter(s).
Event 7 was called with 5 argument(s) , but it is defined with 6 paramenter(s).

Is this a problem with Prefix or some other mismatch of components? Any idea how to fix this? I get hundreds of these messages while debugging.

May 3, 2017 Update: I have been able to determine where these messages are coming from. They are originating in the .NET Framework internal class System.Threading.Tasks.TPLETWProvider The two events in question are:

Event 7: TaskScheduled event method has an extra 6th parameter int appDomain that is not used.

Event 10: TaskWaitBegin which also has an extra unused int appDomain parameter.

When each of these methods eventually call EventSource.WriteToAllListeners the parameters on the method are checked against number of data elements passed in. When there is a mismatch, the message appear in the output window in Visual Studio.

The linked sources are are for .NET Framework 4.7. In my local version, I am running .NET 4.6.1 (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)

I am really surprised more people haven't run into this issue.

like image 288
Phil Bolduc Avatar asked Feb 08 '17 20:02

Phil Bolduc


1 Answers

Just stumbled across this in my own attempts to discover the cause.

Although Stackify Prefix was disabled via the Tray icon, I was still getting these program output messages in the Output window.

The solution was to comment out the following line in web.config:

<add name="StackifyModule_Net40" type="StackifyHttpTracer.StackifyHttpModule,StackifyHttpTracer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=93c44ce23f2048dd" preCondition="managedHandler,runtimeVersionv4.0"/>

Environment: Visual Studio 2019 16.5.1, Stackify Prefix 3.0.28.0 (from stackify.ini)

like image 91
kiwiant Avatar answered Oct 21 '22 17:10

kiwiant