TPL ETW事件具有额外的参数,这些参数会导致调试器输出过多 [英] TPL ETW events have extra parameters that cause excessive debugger output

查看:61
本文介绍了TPL ETW事件具有额外的参数,这些参数会导致调试器输出过多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新:这与Prefix相关



我安装了较早版本的Prefix。我通过运行新的安装程序进行了升级。在VS.NET 2015 Update 3中升级后,加载前缀模块时,我在调试输出窗口中看到这些消息。当未加载Prefix模块时,这些消息不会出现。

 事件10被调用时有5个参数,但它是用6个参数定义。 
事件7用5个参数调用,但它定义了6个参数。

前缀是否存在问题或其他一些组件不匹配?任何想法如何解决这个问题?在调试时会收到数百条这些消息。



2017年5月3日更新:我已经能够确定这些消息的来源。它们源自.NET Framework内部类 System.Threading.Tasks。 TPLETWProvider 有问题的两个事件是:



事件7: TaskScheduled 事件方法有一个未使用的第6个额外参数 int appDomain



事件10: TaskWaitBegin 还有一个未使用的 int appDomain 参数。



当这些方法中的每一个最终调用EventSource.WriteToAllListeners时,这些参数将根据传入的数据元素的数量检查该方法。不匹配时,消息将显示在t中。在Visual Studio中输出窗口。



链接的源适用于.NET Framework 4.7。在我的本地版本中,我正在运行.NET 4.6.1(mscorlib,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089)



我真的很惊讶人们还没有遇到这个问题。

解决方案

在我自己试图找到原因的过程中,偶然发现了这个问题。

>

尽管已通过任务栏图标禁用了 Stackify前缀,但我仍在 Output 窗口中获得这些程序输出消息。 / p>

解决方案是在web.config中注释掉以下行:

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

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


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.

解决方案

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)

这篇关于TPL ETW事件具有额外的参数,这些参数会导致调试器输出过多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆