RoPieee / roon-on-wine

Running Roon with Wine on Linux
MIT License
85 stars 20 forks source link

Looks like Wine 8.18 mediacontrol changes broke Roon #39

Closed roband7 closed 9 months ago

roband7 commented 10 months ago

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"

Younday commented 10 months ago

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"
roband7 commented 10 months ago

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.

Younday commented 10 months ago

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
roband7 commented 10 months ago

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.

IcedEagle commented 10 months ago

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!

fiddlesticks commented 10 months ago

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

chetwisniewski commented 10 months ago

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

IcedEagle commented 10 months ago

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

ThatDonna commented 10 months ago

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

Running Linux Mint 21.2

Bananas-Are-Yellow commented 10 months ago

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.

orsib78 commented 10 months ago

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

ThatDonna commented 10 months ago

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

What I observe:

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

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

IcedEagle commented 10 months ago

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

IcedEagle commented 9 months ago

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

Bananas-Are-Yellow commented 9 months ago

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

ThatDonna commented 9 months ago

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

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

spockfish commented 9 months ago

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

Thanks @IcedEagle !

ThatDonna commented 8 months ago

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.

IcedEagle commented 8 months ago

@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?

ThatDonna commented 8 months ago

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

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