Roon Controller On Wine crash with active OpenVPN connection

Interesting observation and probably minor finding that might help someone scratching their heads…

System details:

  • Dell Latitude 7300 (i7/32GB/1TB NVME) laptop
  • Ubuntu 18.04
  • Wine 5.0.1

I run the core and endpoint natively on linux and run the controller on wine.

Found that the controller app crashes during startup if you have VPN connections active. I use openVPN and can reproduce every time. Looks like a bug in wine. To ger over this, Turn off VPN, start the app and then reconnect. App works fine after that. Core is native and is not affected by this.

Symptoms:

  1. App will not start and exit
  2. App will hang in the background with:
    Process is terminated due to StackOverflowException. (You'll also see a lot of: 002e:err:ntdll:RtlpWaitForCriticalSection section 0x110060 "heap.c: main process heap section" wait timed out in thread 002e, blocked by 0009, retrying (60 sec)
  3. App will crash with:
    0042:err:eventlog:ReportEventW L"Application: Roon.exe\nFramework Version: v4.0.30319\nDescription: The process was terminated due to an internal error in the .NET Runtime at IP 00883AFE (00860000) with exit code 80131506.\n"
  4. Youll get an error:
    System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at **System.Net.NetworkInformation.UnsafeNetInfoNativeMethods.GetAdaptersAddresses(AddressFamily family, UInt32 flags, IntPtr pReserved, SafeLocalFree adapterAddresses, UInt32& outBufLen)** at System.Net.NetworkInformation.SystemNetworkInterface.GetNetworkInterfaces() at System.Net.NetworkInformation.SystemNetworkInterface.InternalGetIsNetworkAvailable() at System.Net.NetworkInformation.NetworkChange.AvailabilityChangeListener.Start(NetworkAvailabilityChangedEventHandler caller) at Sooloos.NetworkReachability.<.ctor>b__3_0(Object <p0>) at ThreadUtil._DoWorkItem(_WorkItem item) at ThreadUtil._WorkerThread() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()

System.Net.NetworkInformation.SystemNetworkInterface.GetNetworkInterfaces() triggered the thought that VPN was the issue.

This will happen almost 100% of the time if you’re on multiple VPN. Sometimes, if you are on a single one