Skip to content

[windows][mono] Test failure: Microsoft.Win32.SystemEventsTests.InvokeOnEventsThreadTests.RegisterFromSTAThreadThatGoesAway_MessageStillDelivered #53863

Closed

Description

@MaximLipnin

https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-50510-merge-61b0571fefe94470ad/Microsoft.Win32.SystemEvents.Tests/console.03a3007e.log?sv=2019-07-07&se=2021-06-28T08%3A23%3A38Z&sr=c&sp=rl&sig=AlmDroaP5I7kmtou2yVWqB%2BQ2Lp9JyTfuez%2BFMXHiNs%3D

Unhandled Exception:
System.PlatformNotSupportedException: COM Interop is not supported on this platform.

   at System.Threading.Thread.SetApartmentStateUnchecked(ApartmentState state, Boolean throwOnError) in /_/src/mono/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs:line 275

   at System.Threading.Thread.SetApartmentState(ApartmentState state, Boolean throwOnError) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs:line 507

   at System.Threading.Thread.SetApartmentState(ApartmentState state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs:line 486

   at Microsoft.Win32.SystemEventsTests.InvokeOnEventsThreadTests.<RegisterFromSTAThreadThatGoesAway_MessageStillDelivered>b__2_0() in /_/src/libraries/Microsoft.Win32.SystemEvents/tests/SystemEvents.InvokeOnEventsThread.cs:line 69

   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in /_/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs:line 378

--- End of stack trace from previous location ---

   at Microsoft.DotNet.RemoteExecutor.Program.Main(String[] args) in /_/src/Microsoft.DotNet.RemoteExecutor/src/Program.cs:line 94
[ERROR] FATAL UNHANDLED EXCEPTION: System.PlatformNotSupportedException: COM Interop is not supported on this platform.

   at System.Threading.Thread.SetApartmentStateUnchecked(ApartmentState state, Boolean throwOnError) in /_/src/mono/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs:line 275

   at System.Threading.Thread.SetApartmentState(ApartmentState state, Boolean throwOnError) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs:line 507

   at System.Threading.Thread.SetApartmentState(ApartmentState state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs:line 486

   at Microsoft.Win32.SystemEventsTests.InvokeOnEventsThreadTests.<RegisterFromSTAThreadThatGoesAway_MessageStillDelivered>b__2_0() in /_/src/libraries/Microsoft.Win32.SystemEvents/tests/SystemEvents.InvokeOnEventsThread.cs:line 69

   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in /_/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs:line 378

--- End of stack trace from previous location ---

   at Microsoft.DotNet.RemoteExecutor.Program.Main(String[] args) in /_/src/Microsoft.DotNet.RemoteExecutor/src/Program.cs:line 94
    Microsoft.Win32.SystemEventsTests.InvokeOnEventsThreadTests.RegisterFromSTAThreadThatGoesAway_MessageStillDelivered [FAIL]
      Microsoft.DotNet.RemoteExecutor.RemoteExecutionException : Remote process failed with an unhandled exception.
      Stack Trace:
        
        Child exception:
          System.PlatformNotSupportedException: COM Interop is not supported on this platform.
        /_/src/mono/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs(275,0): at System.Threading.Thread.SetApartmentStateUnchecked(ApartmentState state, Boolean throwOnError)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs(507,0): at System.Threading.Thread.SetApartmentState(ApartmentState state, Boolean throwOnError)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs(486,0): at System.Threading.Thread.SetApartmentState(ApartmentState state)
        /_/src/libraries/Microsoft.Win32.SystemEvents/tests/SystemEvents.InvokeOnEventsThread.cs(69,0): at Microsoft.Win32.SystemEventsTests.InvokeOnEventsThreadTests.<RegisterFromSTAThreadThatGoesAway_MessageStillDelivered>b__2_0()
        /_/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs(378,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
        
        Child process:
          Microsoft.Win32.SystemEvents.Tests, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 Microsoft.Win32.SystemEventsTests.InvokeOnEventsThreadTests Void <RegisterFromSTAThreadThatGoesAway_MessageStillDelivered>b__2_0()
        
        
  Finished:    Microsoft.Win32.SystemEvents.Tests
=== TEST EXECUTION SUMMARY ===
   Microsoft.Win32.SystemEvents.Tests  Total: 208, Errors: 0, Failed: 1, Skipped: 0, Time: 0.335s
----- end Tue 06/08/2021  8:34:33.40 ----- exit code 1 ----------------------------------------------------------

The Microsoft.Win32.SystemEventsTests.InvokeOnEventsThreadTests.RegisterFromSTAThreadThatGoesAway_MessageStillDelivered test was added in #53467

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Jun 8, 2021
  2. changed the title [-][windows] Test failure: Microsoft.Win32.SystemEventsTests.InvokeOnEventsThreadTests.RegisterFromSTAThreadThatGoesAway_MessageStillDelivered[/-] [+][windows][mono] Test failure: Microsoft.Win32.SystemEventsTests.InvokeOnEventsThreadTests.RegisterFromSTAThreadThatGoesAway_MessageStillDelivered[/+] on Jun 8, 2021
  3. MaximLipnin commented on Jun 9, 2021

    @MaximLipnin
    ContributorAuthor

    The test is disabled in #53893

  4. added this to the 6.0.0 milestone on Jun 14, 2021
  5. removed
    untriagedNew issue has not been triaged by the area owner
    on Jun 24, 2021
  6. SamMonoRT commented on Jun 24, 2021

    @SamMonoRT
    Member

    @marek-safar - do we know if we need to add COM Interop support for Windows for 6.0 ?

  7. modified the milestones: 6.0.0, Future on Jun 25, 2021
  8. marek-safar commented on Jun 25, 2021

    @marek-safar
    Contributor

    Move any COM features to Future

  9. dotnet-policy-service commented on Dec 25, 2025

    @dotnet-policy-service
    Contributor

    Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

    This process is part of our issue cleanup automation.

  10. dotnet-policy-service commented on Jan 8, 2026

    @dotnet-policy-service
    Contributor

    This issue will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.

  11. removed this from the Future milestone on Jan 8, 2026
  12. locked and limited conversation to collaborators on Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions