jonwagner / EventSourceProxy

EventSourceProxy (ESP) is the easiest way to add scalable Event Tracing for Windows (ETW) logging to your .NET program
Other
97 stars 20 forks source link

EventSourceException: Null passed as a event argument. #56

Closed mjeanrichard closed 3 years ago

mjeanrichard commented 8 years ago

It looks like it is illegal to pass a null Argument to the WriteEvent-Method. The Exception only seems to happen if I have an out-of-process Listener (eg. PerfView).

If I activate ThrowOnEventWriteErrors I get the Exception, otherwise instead of the real event I get this in the log:

Level:      Always                    Provider Name: test
Time:       12-06-2016 09:56:03.03    Event Name:    EventSourceMessage (0)
Process Id:  (15812)                  Op Code:
Keywords:   FFFFFFFFFFFFFFFF

message :  EventSourceException while processing event "Temp3": Null passed as a event argument. 

I think it would be a good solution to just check all strings for null and convert them to an empty string (as it is shown in the "EventSource Users Guide").

Because the Problem is only visible with an external Listener I could not get the Unit-Test to work.

gsteinbacher commented 8 years ago

How can I download this fix? I could really use it to fix a problem I am only having in production.

daviburg commented 4 years ago

How can I download this fix? I could really use it to fix a problem I am only having in production.

It needs mjeanrichard's fix but there appear to be no active reviewer for this project.

mjeanrichard commented 4 years ago

Yes, unfortuneatly this project seems to be abandoned. See also #59

jonwagner commented 3 years ago

Good news - the system libraries in net46/netstandard2.0 do this translation automatically. Added the test cases to the project.