[Bug 49641] New: Beneath a Steel Sky's Steam version crashes due to incomplete sapi implementation

WineHQ Bugzilla wine-bugs at winehq.org
Thu Jul 30 19:36:12 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=49641

            Bug ID: 49641
           Summary: Beneath a Steel Sky's Steam version crashes due to
                    incomplete sapi implementation
           Product: Wine
           Version: 5.12
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: sapi
          Assignee: wine-bugs at winehq.org
          Reporter: qsniyg at mail.com
      Distribution: ---

Currently it uses ScummVM 2.1.2. The next version of ScummVM should in theory
fix this crash due to
https://github.com/scummvm/scummvm/commit/9a3e420bd20533e310e80058bcc63adebbfc0dfa

It currently crashes on:
https://github.com/scummvm/scummvm/blob/branch-2-1-2/backends/text-to-speech/windows/windows-text-to-speech.cpp#L467

--- snip ---
    if (SUCCEEDED(hr)) {
        hr = cpEnum->GetCount(&ulCount);
    }
    _voice->SetVolume(0); // <-- here
    while (SUCCEEDED(hr) && ulCount--) {
--- snip ---

This is due to _voice not being initialized. It is supposed to be initialized
here:
https://github.com/scummvm/scummvm/blob/branch-2-1-2/backends/text-to-speech/windows/windows-text-to-speech.cpp#L96

--- snip ---
    // init voice
    hr = CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void
**)&_voice); // <-- here
    if (FAILED(hr)) {
        warning("Could not initialize TTS voice");
        return;
    }
--- snip ---

However, it fails earlier in the function:
https://github.com/scummvm/scummvm/blob/branch-2-1-2/backends/text-to-speech/windows/windows-text-to-speech.cpp#L73

--- snip ---
    HRESULT hr = CoCreateInstance(CLSID_SpObjectTokenCategory, NULL,
CLSCTX_ALL, IID_ISpObjectTokenCategory, (void **)&pTokenCategory);
    if (SUCCEEDED(hr)) {
        hr = pTokenCategory->SetId(SPCAT_AUDIOOUT, TRUE); // <-- here
        if (SUCCEEDED(hr)) {
            WCHAR *tokenId;
            hr = pTokenCategory->GetDefaultTokenId(&tokenId);
            if (SUCCEEDED(hr)) {
--- snip ---

It fails because it's unable to find the
HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioOutput registry key. If
speechsdk is installed through winetricks (and the game is run), the registry
key will be populated, allowing it to step further, but it will then crash
right after on GetDefaultTokenId, as it returns E_NOTIMPL.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list