17

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.

Phil Bolduc
  • 1,586
  • 1
  • 11
  • 19
  • It looks like this might be something deeper as apparently there have been instances of application insights being a possible instigator. https://social.msdn.microsoft.com/Forums/vstudio/en-US/f99be030-a2d9-4013-92f9-075bff0b318a/debugger-output-says-an-event-was-called-with-wrong-number-of-arguments-cant-find-source?forum=vsdebug Well, we see these same messages in our debuggers as well. We didn't associate it with Prefix as it was just a message and not an exception of some sort. – danatcofo Feb 15 '17 at 20:43
  • My guess is its related to a setting being applied by both us (and also app insights) that allows us to actually do the profiling work itself. – danatcofo Feb 15 '17 at 20:45
  • Looks like this happens to others in entirely unrelated territory as well. https://github.com/rebus-org/Rebus/issues/566 – danatcofo Feb 15 '17 at 23:07
  • I noticed the mis-spelling (Paramenters with an extra n) and found this spelling in a resw file associated with Application Insights. So this is possibly the component that detects the issue - don't know if it causes it. I also have Prefix running. The ref to the resw is long and horrible in github.... Microsoft/ApplicationInsights-Home. see: [link](https://github.com/Microsoft/ApplicationInsights-Home/blob/master/Samples/Windows%208.1%20Universal/BlogPostSample/BlogPostSample.Windows/obj/Debug/Microsoft.Diagnostics.Tracing.EventSource/en-US/Microsoft.Diagnostics.Tracing.Messages.resw) – Rob Von Nesselrode Feb 28 '17 at 05:26
  • 1
    Given that AppInsights now ships pretty much pre-installed with VS 2015/2017 I'm leaning towards that being the culprit of the message very heavily. – danatcofo Mar 15 '17 at 20:58
  • 4
    The spelling has to be fixed. as in yesterday! – jokab Mar 23 '17 at 01:57
  • Added a issue on the .NET Forums https://social.msdn.microsoft.com/Forums/en-US/ceffc4ed-11a0-497c-bf80-217c8f5af801/some-tpletwprovider-methods-have-too-many-parameters-causes-excessive-debug-output?forum=clr – Phil Bolduc May 04 '17 at 04:35
  • I have also opened a Microsoft Connect ticket: https://connect.microsoft.com/VisualStudio/feedback/details/3133569/some-system-threading-tasks-tpleventsource-methods-have-too-many-method-parameters-cause-debug-warnings – Phil Bolduc May 04 '17 at 22:10
  • 2
    how does one fix this issue? – TWilly Oct 07 '18 at 13:17
  • 1
    @TWilly you as a user of the .NET Framework can not fix this error. The error is in the .NET Framework source code. – Phil Bolduc Nov 09 '18 at 19:10

1 Answers1

3

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)

kiwiant
  • 41
  • 3