RoPieee/roon-on-wine

Looks like Wine 8.18 mediacontrol changes broke Roon

Closed this issue · 20 comments

Crashes as soon as an audio zone is selected.

011c:err:eventlog:ReportEventW L"Application: Roon.exe\n"
011c:err:eventlog:ReportEventW L"CoreCLR Version: 6.0.2123.36311\n"
011c:err:eventlog:ReportEventW L".NET Version: 6.0.21\n"
011c:err:eventlog:ReportEventW L"Description: The process was terminated due to an internal error in the .NET Runtime at IP 00006FFFFDE32699 (00006FFFFDC60000) with exit code c0000005.\n"

I've gotten a crash on startup after installing Wine 8.18. I've tried reverting to 8.17, but no luck so far.

0144:err:eventlog:ReportEventW L"Application: Roon.exe\n"
0144:err:eventlog:ReportEventW L"CoreCLR Version: 6.0.2123.36311\n"
0144:err:eventlog:ReportEventW L".NET Version: 6.0.21\n"
0144:err:eventlog:ReportEventW L"Description: The process was terminated due to an internal error in the .NET Runtime at IP 00007FFFFF8D2699 (00007FFFFF700000) with exit code c0000005.\n"

I upgraded straight from 8.16 to 8.18. So the regresssion may actually be in either 8.17 or 8.18.

I just assumed the problem was 8.18 since the crash is in mediacontrol and that area got changed a lot in 8.18.

But I haven't done any deeper analysis.

I've had a working version until version 8.17 of Wine on Kubuntu 23.04. After upgrading to 8.18, I received the error I posted in my previous message, so I assumed something broke in version 8.18 specifically. Reverting actually seems to be working fine, but it required reinstalling Roon using the install.sh script.

The following command should work in (K)ubuntu 23.04 to install version 8.17:

sudo apt install winehq-staging=8.17~lunar-1 wine-staging=8.17~lunar-1 wine-staging-amd64=8.17~lunar-1 wine-staging-i386=8.17~lunar-1

Afterward, I deleted my start_my_roon_instance.sh file and reran install.sh and Roon seems to be working fine again. In case you want to avoid accidentally upgrading to version 8.18 again during apt upgrade, you can use the following command to pin it to the current version:

sudo apt-mark hold winehq-staging wine-staging wine-staging-amd64 wine-staging-i386

Thanks, that confirms my suspicion the 8.18 changes break Roon.

So we need to stay at 8.17 or earlier for now.

Unless someone can figure out a workaround and update the roon-on-wine script.

https://gitlab.winehq.org/wine/wine/-/blob/wine-8.18/dlls/windows.media.mediacontrol/main.c#L218

Not certain, but from reading the wine debug, it appears like media_control_get_DisplayUpdater is a stub and not implemented in Wine in 8.18, and this seems to be causing the crash in .NET. As stated above, media_control is new to 8.18, so for now you need to stick with 8.17.

However, it looks like this is already implemented in the master branch: https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/windows.media.mediacontrol/main.c#L604

Hopefully that means it will be in the next release, and we can go back to using latest Wine!

Thanks! The command you suggested (with a small variant, see below) fixed it for me on Linux Mint 21.2
sudo apt install winehq-staging=8.17~jammy-1 wine-staging=8.17~jammy-1 wine-staging-amd64=8.17~jammy-1 wine-staging-i386=8.17~jammy-1

I downloaded and compiled 8.19 which was released this morning for Arch Linux. It fixes the initial error in the .NET runtime, but if you select a Zone that is playing music it now throws another error:

wine: Call from 00006FFFFFC53C07 to unimplemented function shcore.dll.CreateRandomAccessStreamOverStream, aborting

Well that's unfortunate. I don't see that function implemented in main branch. There were changes made a month ago, so maybe someone is working on it... but if so, it doesn't seem imminent.

https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/shcore/main.c

Wine staging 8.19 was just released. Tested it here and it looks like Roon works fine again.

Running Linux Mint 21.2

Wine staging 8.19 was just released. Tested it here and it looks like Roon works fine again.

Running Linux Mint 21.2

$ wine --version
wine-8.19 (Staging)

It is not working for me on Pop!_OS 22.04 LTS. If no audio zone has been selected it comes up, but as soon as you select an audio zone it crashes. Then it crashes each time you start it.

Wine staging 8.19 doesn't work on Ubuntu 23.10 either. Even when I tried to reinstall ROW from scratch.

@Bananas-Are-Yellow, @orsib78
I confirmed a similar issue on my instance.

What I observe:

  • Reinstall the instance (via install.sh)
  • Connect to Core
  • The first run, no Audio Zone is selected. I am able to select an initial Audio Zone with no issue.
  • If I choose to select a different Audio Zone from the first one, or play a song, I get the following error:

wine: Call from 00006FFFFF443A67 to unimplemented function shcore.dll.CreateRandomAccessStreamOverStream, aborting

  • At that point, Roon crashes. And, similarly, it crashes each time I start it with the above error.

Sigh. Spoke too soon. But at least now it's consistent with @chetwisniewski

I filed a Wine bug for tracking: https://bugs.winehq.org/show_bug.cgi?id=55867

I got a workaround! We can use DLL Overrides to disable the windows.media.mediacontrol library for Roon, which doesn't load that DLL which later triggers the unimplemented function.

  1. Open ~/start_my_roon_instance.sh in a text editor
  2. Just after the WINEDEBUG section and before the word "wine" add this (see screenshot)
    WINEDLLOVERRIDES="windows.media.mediacontrol="
  3. Save and run!

image

If someone wants to put a PR in for this to help those out in the future, it can get added here: https://github.com/RoPieee/roon-on-wine/blob/7f8a31a69d1d4a24e0f683cadfcda39ad171a55f/install.sh#L149C44-L149C48

It works!
Well done @IcedEagle.
And many thanks.

Wine 8.20 was released and I tested it on my Linux Mint instance -- same error as above:

  • Reinstall the instance (via install.sh)
  • Connect to Core
  • The first run, no Audio Zone is selected. I am able to select an initial Audio Zone with no issue.
  • I'm able to select between different Audio Zones
  • When I play a song:
    wine: Call from 00006FFFFF443A67 to unimplemented function shcore.dll.CreateRandomAccessStreamOverStream, aborting
  • At that point, Roon crashes. And, similarly, it crashes each time I start it with the above error.

I'm staying with @fiddlesticks' reversion to wine 8.17.

I've added the change proposed by @IcedEagle , so let's close this ticket for now.

Thanks @IcedEagle !

Hi all --

I just checked the script with the new wine-9.0-rc1, per @IcedEagle's submitted wine bug (https://bugs.winehq.org/show_bug.cgi?id=55867).

I get a slightly different error now.

  • Reinstall the instance (via install.sh without the work around)
  • Connect to Core
  • On the first run, no Audio Zone is selected
  • I select an Audio Zone and get the following error, then Roon crashes
    0114:err:combase:RoGetActivationFactory Failed to find library for L"Windows.Storage.Streams.RandomAccessStreamReference"
  • Roon crashes when I restart it with the same error

@ThatDonna Thanks for checking! I was curious if it was going to be fixed or not.

If you wouldn't mind, could you file a bug with Wine for the new behavior being seen please?

@IcedEagle Added! I just re-checked given RC3, same issue.

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