You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the WriteEvent is called with one or more parameter has the null value the debug log contains EventSource Error: EventSourceException while processing event "TestEvent": Null passed as a event argument and the event is not passed to ETW.
This does work when we use .net 6 (uses a method with different signature) or when it has less then 4 parameters (uses a different overload) of when all parameters contain a non-null value.
Reproduction Steps
Open perfview.exe and listen to MyEventSource events. Then run the following program.
In the debug output of the console application we see:
EventSource Error: EventSourceException while processing event "TestEvent": Null passed as a event argument.
If we use .net 6 of if we use EtwSelfDescribingEventFormat or if we use less then 3 parameters this error is not logged and the event is properly traced. Because usually the parameters are filled or not filled at runtime it is very hard to spot the problem and tracing may apprear unrelayable.
Expected behavior
Event is captured in ETW (perfview)
Actual behavior
Event is not captured in ETW (perfview)
Regression?
No response
Known Workarounds
Use EventSourceSettings.EtwSelfDescribingEventFormat
Configuration
.NET 8 on x64
Other information
No response
The text was updated successfully, but these errors were encountered:
Description
When raising EventSource events and an ETW listener is attached and the event contains more than 4 string parameters it uses this overload:
When the WriteEvent is called with one or more parameter has the null value the debug log contains
EventSource Error: EventSourceException while processing event "TestEvent": Null
passed as a event argument and the event is not passed to ETW.This does work when we use .net 6 (uses a method with different signature) or when it has less then 4 parameters (uses a different overload) of when all parameters contain a non-null value.
Reproduction Steps
Open perfview.exe and listen to MyEventSource events. Then run the following program.
In the debug output of the console application we see:
EventSource Error: EventSourceException while processing event "TestEvent": Null passed as a event argument.
If we use .net 6 of if we use EtwSelfDescribingEventFormat or if we use less then 3 parameters this error is not logged and the event is properly traced. Because usually the parameters are filled or not filled at runtime it is very hard to spot the problem and tracing may apprear unrelayable.
Expected behavior
Event is captured in ETW (perfview)
Actual behavior
Event is not captured in ETW (perfview)
Regression?
No response
Known Workarounds
Use EventSourceSettings.EtwSelfDescribingEventFormat
Configuration
.NET 8 on x64
Other information
No response
The text was updated successfully, but these errors were encountered: