Frogging-Family / wine-tkg-git

The wine-tkg build systems, to create custom Wine and Proton builds
856 stars 155 forks source link

Ubisoft Connect doesn't start #1105

Open Freeman310 opened 8 months ago

Freeman310 commented 8 months ago

When trying to launch Ubisoft Connect, it crashes with an error.

wineserver: using server-side synchronization. 002c:fixme:winediag:loader_init Wine TkG (staging) 9.0-rc1 is a testing version containing experimental patches. 002c:fixme:winediag:loader_init Please don't report bugs about it on winehq.org and use https://github.com/Frogging-Family/wine-tkg-git/issues instead. 0080:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 0080:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 0080:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 0080:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 0034:fixme:ver:GetCurrentPackageId (000000000021FEB0 0000000000000000): stub 002c:fixme:ver:GetCurrentPackageId (000000000021FEB0 0000000000000000): stub 011c:err:module:hacks_init HACK: Simulating sched quantum in fsync. 010c:fixme:ver:GetCurrentPackageId (000000000021FEB0 0000000000000000): stub ~ ❯ 011c:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 011c:fixme:winsock:WSAEnumNameSpaceProvidersW (0592A268 0593DF44) Stub! 0058:fixme:ndis:query_global_stats Unsupported OID 10202 0058:fixme:ndis:query_global_stats Unsupported OID 10202 0058:fixme:ndis:query_global_stats Unsupported OID 10202 0124:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFA, 01AFFEB8 012c:fixme:shell:ShellItem2_GetPropertyStore Stub: 01FE5790 (2, {886d8eeb-8cf2-4446-8d02-cdba1dbdcf99} (unknown), 01AFFBA8) 012c:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFA, 01AFFEB8 011c:fixme:shcore:SetCurrentProcessExplicitAppUserModelID L"Ubisoft.UPC.MainProcess": stub 011c:fixme:shcore:SetCurrentProcessExplicitAppUserModelID L"Ubisoft.UPC.MainProcess": stub 011c:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 011c:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 496A0568, 16) stub 015c:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 09A9FD70, 00000000 09A9FD6C 015c:fixme:nls:get_dummy_preferred_ui_language (0x38 0x419 09A9FD70 00000000 09A9FD6C) returning a dummy value (current locale) 015c:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 09A9FD70, 49645C70 09A9FD6C 015c:fixme:nls:get_dummy_preferred_ui_language (0x38 0x419 09A9FD70 49645C70 09A9FD6C) returning a dummy value (current locale) regsvr32: 'DllUnregisterServer' not implemented in DLL 'npuplaypc.dll' 0134:fixme:ver:GetCurrentPackageId (0081FECC 00000000): stub 015c:fixme:win:RegisterSuspendResumeNotification 0007005E, 0: stub. 015c:fixme:process:GetProcessMitigationPolicy (FFFFFFFF, 4, 09A9FBE8, 4): stub regsvr32: 'DllUnregisterServer' not implemented in DLL 'npuplaypchub.dll' 013c:fixme:ver:GetCurrentPackageId (0081FECC 00000000): stub 015c:fixme:winsock:WSALookupServiceBeginW (09A9F99C 0xff0 09A9F9D8) Stub! 015c:fixme:userenv:RegisterGPNotification 00000310 0 015c:fixme:userenv:RegisterGPNotification 00000314 1 015c:fixme:shcore:IsOS (OS_DOMAINMEMBER) What should we return here? 0180:fixme:wtsapi:WTSRegisterSessionNotification Stub 0003006E 0x00000000 018c:fixme:process:CreateProcessInternalW HACK: appending L" --use-gl=swiftshader" to command line L"\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/UplayWebCore.exe\" --type=gpu-process --no-sandbox --locales-dir-path=\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/locales/1\" --log-severity=disable --user-agent-product=ConnectPC --lang=en-US --user-data-dir=\"C:\\users\\f".... 015c:fixme:win:GetPointerDevices (09A9F6C8 00000000): partial stub 015c:fixme:system:NtUserQueryDisplayConfig flags 0x2, paths_count 0x9a9f734, paths 0x346a68f0, modes_count 0x9a9f6c8, modes 0x346ccd20, topology_id (nil) semi-stub 015c:fixme:system:NtUserDisplayConfigGetDeviceInfo Unimplemented packet type 11. 015c:fixme:combase:RoActivateInstance (0ACBF550, 09A9F658): semi-stub 015c:fixme:combase:RoGetActivationFactory (L"Windows.UI.ViewManagement.UISettings", {00000035-0000-0000-c000-000000000046}, 09A9F574): semi-stub 015c:fixme:ui:uisettings2_add_TextScaleFactorChanged iface 0AD4EACC, handler 3464F6A8, cookie 7AD0A758 stub! 015c:fixme:ui:uisettings2_get_TextScaleFactor iface 0AD4EACC, value 09A9F658 stub! 0184:fixme:wpc:WindowsParentalControls_GetUserSettings ((null) 0C09FB84) 0168:fixme:netapi32:NetGetJoinInformation Semi-stub (null) 0A39FB80 0A39FB5C 015c:fixme:win:GetPointerDevices (09A9F534 00000000): partial stub 015c:fixme:system:NtUserQueryDisplayConfig flags 0x2, paths_count 0x9a9f5a0, paths 0x346a7bb0, modes_count 0x9a9f534, modes 0x346ce260, topology_id (nil) semi-stub 015c:fixme:system:NtUserDisplayConfigGetDeviceInfo Unimplemented packet type 11. 015c:fixme:ui:uisettings2_get_TextScaleFactor iface 0AD4EACC, value 09A9F4C8 stub! 018c:fixme:process:CreateProcessInternalW HACK: appending L" --use-gl=swiftshader" to command line L"\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/UplayWebCore.exe\" --type=utility --utility-sub-type=storage.mojom.StorageService --lang=en-US --service-sandbox-type=service --no-sandbox --locales-dir-path=\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/locales/1\" --log-sev".... 018c:fixme:sync:NtSetInformationJobObject stub: 0x4b0 4 0xc69f7dc 4 018c:fixme:process:CreateProcessInternalW HACK: appending L" --use-gl=swiftshader" to command line L"\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/UplayWebCore.exe\" --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --locales-dir-path=\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/locales/1\" --log-severi".... 0188:fixme:file:ReplaceFileW Ignoring flags 2 0188:fixme:file:NtLockFile I/O completion on lock not implemented yet 018c:fixme:process:CreateProcessInternalW HACK: appending L" --use-gl=swiftshader" to command line L"\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/UplayWebCore.exe\" --type=renderer --locales-dir-path=\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/locales/1\" --log-severity=disable --user-agent-product=ConnectPC --disable-spell-checking --user-data-dir=\"C:\\users\\freem".... 0198:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 0198:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 558A01A8, 16) stub 0198:fixme:process:GetProcessMitigationPolicy (FFFFFFFF, 4, 0095FBB4, 4): stub 018c:fixme:process:CreateProcessInternalW HACK: appending L" --use-gl=swiftshader" to command line L"\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/UplayWebCore.exe\" --type=renderer --locales-dir-path=\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/locales/1\" --log-severity=disable --user-agent-product=ConnectPC --disable-spell-checking --user-data-dir=\"C:\\users\\freem".... 0164:fixme:crypt:CRYPT_SysRegOpenStoreW CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE, L"ROOT": stub 0164:fixme:crypt:CRYPT_SysRegOpenStoreW CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE, L"CA": stub 0164:fixme:crypt:CRYPT_SysRegOpenStoreW CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE, L"TrustedPeople": stub 0164:fixme:crypt:CRYPT_SysRegOpenStoreW CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE, L"Disallowed": stub 0164:fixme:crypt:CRYPT_RegControl CERT_STORE_CTRL_AUTO_RESYNC: stub 0164:fixme:crypt:CRYPT_RegControl CERT_STORE_CTRL_AUTO_RESYNC: stub 0164:fixme:crypt:CRYPT_RegControl CERT_STORE_CTRL_AUTO_RESYNC: stub 0164:fixme:crypt:CRYPT_RegControl CERT_STORE_CTRL_AUTO_RESYNC: stub 0164:fixme:crypt:CRYPT_RegControl CERT_STORE_CTRL_AUTO_RESYNC: stub 0164:fixme:crypt:CRYPT_RegControl CERT_STORE_CTRL_AUTO_RESYNC: stub 01c8:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 01c8:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 274A01A8, 16) stub 01c8:fixme:process:GetProcessMitigationPolicy (FFFFFFFF, 4, 0095FBB4, 4): stub 0198:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 01d8:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 01d8:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 3B4A01A8, 16) stub 01d8:fixme:process:GetProcessMitigationPolicy (FFFFFFFF, 4, 0095FBB4, 4): stub 01e8:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 01e8:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 492A01A8, 16) stub 01e8:fixme:process:GetProcessMitigationPolicy (FFFFFFFF, 4, 0095FBB4, 4): stub 01e8:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 01f0:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 01f0:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 5BAA01A8, 16) stub 01f0:fixme:process:GetProcessMitigationPolicy (FFFFFFFF, 4, 0095FBB4, 4): stub 01f0:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 0264:fixme:thread:QueryThreadCycleTime (0000010C,0331FE50): stub! 021c:fixme:winsock:WSALookupServiceBeginW (03B8F04C 0xff0 03B8F088) Stub! 015c:fixme:process:NtQueryInformationProcess ProcessCycleTime (0x344,0x9a9f7c8,0x00000010,(nil)) stub 018c:fixme:process:CreateProcessInternalW HACK: appending L" --use-gl=swiftshader" to command line L"\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/UplayWebCore.exe\" --type=gpu-process --no-sandbox --locales-dir-path=\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/locales/1\" --log-severity=disable --user-agent-product=ConnectPC --lang=en-US --user-data-dir=\"C:\\users\\f".... 021c:fixme:wlanapi:WlanEnumInterfaces (00000001, 00000000, 03B8EAB0) semi-stub 021c:fixme:wlanapi:WlanEnumInterfaces (00000001, 00000000, 03B8EAB0) semi-stub 0218:fixme:file:ReplaceFileW Ignoring flags 2 01c8:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 0164:fixme:file:ReplaceFileW Ignoring flags 2 021c:fixme:winsock:setsockopt Ignoring SO_RANDOMIZE_PORT 0214:fixme:file:NtLockFile I/O completion on lock not implemented yet 0214:fixme:virtual:prefetch_memory (process=0xffffffff,flags=0) NtSetInformationVirtualMemory(VmPrefetchInformation) partial stub 018c:fixme:process:CreateProcessInternalW HACK: appending L" --use-gl=swiftshader" to command line L"\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/UplayWebCore.exe\" --type=renderer --locales-dir-path=\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/locales/1\" --log-severity=disable --user-agent-product=ConnectPC --disable-spell-checking --user-data-dir=\"C:\\users\\freem".... 015c:fixme:win:GetPointerDevices (09A9E6F4 00000000): partial stub 015c:fixme:system:NtUserQueryDisplayConfig flags 0x2, paths_count 0x9a9e760, paths 0x3490a870, modes_count 0x9a9e6f4, modes 0x346d1fa0, topology_id (nil) semi-stub 015c:fixme:system:NtUserDisplayConfigGetDeviceInfo Unimplemented packet type 11. 015c:fixme:ui:uisettings2_get_TextScaleFactor iface 0AD4EACC, value 09A9E688 stub! 02b4:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 02b4:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 366A01A8, 16) stub 02b4:fixme:process:GetProcessMitigationPolicy (FFFFFFFF, 4, 0095FBB4, 4): stub 02d0:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 02d0:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 370B01A8, 16) stub 02d0:fixme:process:GetProcessMitigationPolicy (FFFFFFFF, 4, 0095FBB4, 4): stub 02d0:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 02d0:fixme:thread:QueryThreadCycleTime (FFFFFFFE,0095F608): stub! 02b4:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 0318:fixme:thread:QueryThreadCycleTime (0000010C,0331FE50): stub! 015c:fixme:process:NtQueryInformationProcess ProcessCycleTime (0x340,0x9a9f7c8,0x00000010,(nil)) stub 018c:fixme:process:CreateProcessInternalW HACK: appending L" --use-gl=swiftshader" to command line L"\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/UplayWebCore.exe\" --type=gpu-process --no-sandbox --locales-dir-path=\"C:/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/locales/1\" --log-severity=disable --user-agent-product=ConnectPC --lang=en-US --user-data-dir=\"C:\\users\\f".... 0164:fixme:file:ReplaceFileW Ignoring flags 2 01e8:fixme:thread:QueryThreadCycleTime (FFFFFFFE,0095F608): stub! 01f0:fixme:thread:QueryThreadCycleTime (FFFFFFFE,0095F608): stub! 0344:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 0344:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 3FAA01A8, 16) stub 0344:fixme:process:GetProcessMitigationPolicy (FFFFFFFF, 4, 0095FBB4, 4): stub 01e8:fixme:dwrite:dwritefontface5_HasVariations 00E7A0D0: stub 0344:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 0354:fixme:thread:QueryThreadCycleTime (0000010C,0331FE50): stub! ^C ~ ❯ 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 021c:fixme:winsock:setsockopt Ignoring SO_RANDOMIZE_PORT 0380:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c8:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFA, 0095FEB8 003c:fixme:ver:GetCurrentPackageId (000000000021FEB0 0000000000000000): stub

I tried to change static const WCHAR opt = L" --use-gl=swiftshader" to static const WCHAR opt = L" --use-angle=vulkan" in dlls/kernelbase/process.c.

As a result, Ubisoft Connect tries to start but crashes and it loops.

Tk-Glitch commented 8 months ago

It broke at some point upstream but should work on Valve trees. Can't remember exactly what it was, but the fix we shipped eventually broke as well down the line.

Freeman310 commented 8 months ago

Proton works. But I would like it to work in new Wine versions as well. I've been trying to solve it for a week now, but no luck.

It broke at some point upstream but should work on Valve trees. Can't remember exactly what it was, but the fix we shipped eventually broke as well down the line.

Tk-Glitch commented 7 months ago

Apparently the fix we ship from proton still works. It's enabled by _protonify="true" in your config. Or you can add it by hand through userpatches:

From 98bce52ddf46c0c8c6be57c27d4aa9c48303798b Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Tue, 14 Mar 2023 21:12:22 -0600
Subject: [PATCH] ntdll: HACK: Add WINE_SIMULATE_WRITECOPY option.

CW-Bug-Id: #22034

Edit: Enable for UplayWebCore.exe
---
 dlls/ntdll/unix/loader.c       |  5 +++++
 dlls/ntdll/unix/unix_private.h |  1 +
 dlls/ntdll/unix/virtual.c      | 13 +++++++++++--
 3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 9f00e45..67d071a 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -1346,6 +1346,7 @@ const unixlib_entry_t unix_call_wow64_funcs[] =

 BOOL ac_odyssey;
 BOOL fsync_simulate_sched_quantum;
+BOOL simulate_writecopy;

 static void hacks_init(void)
 {
@@ -1367,6 +1368,10 @@ static void hacks_init(void)
     if (fsync_simulate_sched_quantum)
         ERR("HACK: Simulating sched quantum in fsync.\n");

+    env_str = getenv("WINE_SIMULATE_WRITECOPY");
+    if (env_str) simulate_writecopy = atoi(env_str);
+    else if (main_argc > 1 && strstr(main_argv[1], "UplayWebCore.exe")) simulate_writecopy = TRUE;
+
     env_str = getenv("SteamGameId");
     if (env_str && !strcmp(env_str, "50130"))
         setenv("WINESTEAMNOEXEC", "1", 0);
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index 2bf8975..8a5baf3 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -175,6 +175,7 @@ extern struct ldt_copy __wine_ldt_copy;

 extern BOOL ac_odyssey;
 extern BOOL fsync_simulate_sched_quantum;
+extern BOOL simulate_writecopy;

 extern void init_environment( int argc, char *argv[], char *envp[] );
 extern void init_startup_info(void);
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 59c0e6d..9a7af20 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -1107,7 +1107,8 @@ static const char *get_prot_str( BYTE prot )
     buffer[0] = (prot & VPROT_COMMITTED) ? 'c' : '-';
     buffer[1] = (prot & VPROT_GUARD) ? 'g' : ((prot & VPROT_WRITEWATCH) ? 'H' : '-');
     buffer[2] = (prot & VPROT_READ) ? 'r' : '-';
-    buffer[3] = (prot & VPROT_WRITECOPY) ? 'W' : ((prot & VPROT_WRITE) ? 'w' : '-');
+    buffer[3] = (prot & VPROT_WRITECOPY) ? (prot & VPROT_WRITTEN ? 'w' : 'W')
+        : ((prot & VPROT_WRITE) ? 'w' : '-');
     buffer[4] = (prot & VPROT_EXEC) ? 'x' : '-';
     buffer[5] = 0;
     return buffer;
@@ -4730,6 +4731,33 @@ NTSTATUS WINAPI NtProtectVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T
         {
             old = get_win32_prot( vprot, view->protect );
             status = set_protection( view, base, size, new_prot );
+
+            if (simulate_writecopy && status == STATUS_SUCCESS
+                && ((old == PAGE_WRITECOPY || old == PAGE_EXECUTE_WRITECOPY)))
+            {
+                TRACE("Setting VPROT_WRITTEN.\n");
+
+                set_page_vprot_bits(base, size, VPROT_WRITTEN, 0);
+                vprot |= VPROT_WRITTEN;
+                old = get_win32_prot( vprot, view->protect );
+            }
+            else if (status == STATUS_SUCCESS && (view->protect & SEC_IMAGE) &&
+                    base == (void*)NtCurrentTeb()->Peb->ImageBaseAddress)
+            {
+                /* GTA5 HACK: Mark first page as copied. */
+                const WCHAR gta5W[] = { 'g','t','a','5','.','e','x','e',0 };
+                WCHAR *name, *p;
+
+                name = NtCurrentTeb()->Peb->ProcessParameters->ImagePathName.Buffer;
+                p = wcsrchr(name, '\\');
+                p = p ? p+1 : name;
+
+                if(!wcsicmp(p, gta5W))
+                {
+                    FIXME("HACK: changing GTA5.exe vprot\n");
+                    set_page_vprot_bits(base, page_size, VPROT_WRITTEN, 0);
+                }
+            }
         }
         else status = STATUS_NOT_COMMITTED;
     }
Freeman310 commented 5 months ago

I apologize for the long silence. I will try your patch soon. I hope it helps.

Arastais commented 4 months ago

@Tk-Glitch @Freeman310 I just tried this against wine master staging 9.6.r1.g164a792c.

With vanilla upstream wine, ubisoft connect won't launch at all. The wine debug terminal just opens really quick, then closes, repeating in an infinite loop.

With _protonify="true", ubisoft connect technically launches, but (shortly after it opens) shows a dialog box with "Ubisoft Connect has detected an unrecoverable error and must shut down." then closes when you hit OK.

The actual Add WINE_SIMULATE_WRITECOPY option. patch that you wrote out fails to apply, regardless of the _protonify setting.