Skip to content

Reproduction of issue with string arrays in EventSource.Write

Notifications You must be signed in to change notification settings

Observito/StringArrayTraceRepro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reproduction of issue with string arrays in EventSource.Write

This issue is reported here: https://github.com/dotnet/corefx/issues/36149.

With NuGet package Microsoft.NETCore.UniversalWindowsPlatform version 6.2.8, we get the following exception:

    System.NotSupportedException: Arrays of null-terminated string are not supported

when we run this code:

    var log = new EventSource("Observito-Test-Tack");
    log.Write("Msg", new EventSourceOptions() { Level = EventLevel.Informational, Opcode = EventOpcode.Info },
        new
        {
            Strings = new[]
                {
                    "Foo",
                    "Bar"
                }
        });

With NuGet package Microsoft.NETCore.UniversalWindowsPlatform version 6.1.9 we did not get this exception.

The problem also only appears when someone is listening for events of this EventSource.

Steps to reproduce

  1. Set breakpoint in exception block of ArrayRepro.Reproduce
  2. Run App1 (Local Machine)
  3. Observe that no exception is thrown
  4. Run the following from a command-line as administrator (The Guid corresponding to Observito-Test-Tack is {53487b38-863e-5b17-bdce-7b706a2e81a6}): logman start test_trace -p {53487b38-863e-5b17-bdce-7b706a2e81a6} -ets
  5. Run App1 again
  6. Notice that an exception is thrown
  7. Downgrade NuGet package Microsoft.NETCore.UniversalWindowsPlatform to version 6.1.9
  8. Restart computer
  9. Repeat the test above
  10. Notice that now no exception is thrown

About

Reproduction of issue with string arrays in EventSource.Write

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages