Skip to content

[Windows] WasapiAudioDriver - CoInitializeEx fails with RPC_E_CHANGED_MODE #32430

@krasko78

Description

@krasko78

Issue type

Other type of issue

Description with steps to reproduce

  1. Start MuseScore Studio under Windows. :)

Actual result: In the logs we see:
ERROR | main_thread | WasapiAudioDriver::init | failed CoInitializeEx, error: Unknown error: -2147417850

-2147417850 is RPC_E_CHANGED_MODE. From the docs: "Multiple calls to CoInitializeEx by the same thread are allowed as long as they pass the same concurrency flag, but subsequent valid calls return S_FALSE. If the concurrency flag does not match, then the call fails and returns RPC_E_CHANGED_MODE."

Debugger screenshot:
Image

Since the thread had already called CoInitializeEx, the above error does not prevent the audio driver from working, but the desired MULTITHREADED concurrency mode is not achieved because it does not coincide with that of the earlier call.

Since PR31082
@igorkorsukov FYI.

Supporting files, videos and screenshots

n/a

In which versions of MuseScore Studio is this issue present?

master/nightly

Regression

Yes, this used to work in a previous version of MuseScore 4.x

Operating system

Windows 10 (and only Windows)

Additional context

No response

Checklist

  • This report follows the guidelines for reporting bugs and issues
  • I have verified that this issue has not been logged before, by searching the issue tracker for similar issues
  • I have attached all requested files and information to this report
  • I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions