https://bugs.winehq.org/show_bug.cgi?id=43914
Bug ID: 43914 Summary: RPCS3 emulator doesn't start (invalid address) Product: Wine Version: 2.19 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: t6zm3v62fkp7fe5@yandex.ru Distribution: ---
RPCS3 emulator doesn't start and says "wine: Invalid address". File link: https://ci.appveyor.com/api/buildjobs/t1f0ojsr8ri6ki5f/artifacts/rpcs3-v0.0....
https://bugs.winehq.org/show_bug.cgi?id=43914
Milo Rogers t6zm3v62fkp7fe5@yandex.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |Ubuntu
https://bugs.winehq.org/show_bug.cgi?id=43914
Louis Lenders xerox.xerox2000x@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Summary|RPCS3 emulator doesn't |RPCS3 emulator doesn't |start (invalid address) |start : Invalid address CC| |xerox.xerox2000x@gmail.com URL| |https://ci.appveyor.com/api | |/buildjobs/t1f0ojsr8ri6ki5f | |/artifacts/rpcs3-v0.0.3-201 | |7-10-19-34a6085c_win64.zip
--- Comment #1 from Louis Lenders xerox.xerox2000x@gmail.com --- I can confirm this.
sha1sum rpcs3.exe ] 49771925ec2e86c2647d5ce66411872aacb24237 rpcs3.exe
https://bugs.winehq.org/show_bug.cgi?id=43914
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Keywords| |win64 Component|-unknown |ntdll Summary|RPCS3 emulator doesn't |64-bit RPCS3 emulator |start : Invalid address |doesn't start, loader | |reports 'Invalid address' | |(non-relocatable PE wants | |to use lowest possible | |image base on NT: 0x10000 / | |64 KB)
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
--- snip --- $ WINEDEBUG=+tid,+process,+loaddll,+module,+virtual wine64 ./rpcs3.exe ... 002e:trace:process:exec_process starting L"Z:\home\focht\Downloads\rpcs3.exe" as Win64 binary ((nil)-(nil), arch 8664) ... 0030:trace:virtual:NtAllocateVirtualMemory 0xffffffffffffffff (nil) 00110000 2000 00000004 0030:trace:virtual:map_view got mem in reserved area 0x10000-0x120000 0030:trace:virtual:VIRTUAL_DumpView View: 0x10000 - 0x11ffff (valloc) 0030:trace:virtual:VIRTUAL_DumpView 0x10000 - 0x11ffff --rw- 0030:trace:virtual:NtAllocateVirtualMemory 0xffffffffffffffff 0x10000 00010000 1000 00000004 0030:trace:virtual:VIRTUAL_DumpView View: 0x10000 - 0x11ffff (valloc) 0030:trace:virtual:VIRTUAL_DumpView 0x10000 - 0x1ffff c-rw- 0030:trace:virtual:VIRTUAL_DumpView 0x20000 - 0x11ffff --rw- 0030:trace:virtual:virtual_create_builtin_view created 0x7bc80000-0x7bdb4000 0030:trace:virtual:VIRTUAL_DumpView View: 0x7bc80000 - 0x7bdb3fff (builtin image) 0030:trace:virtual:VIRTUAL_DumpView 0x7bc80000 - 0x7bc80fff c-r-- 0030:trace:virtual:VIRTUAL_DumpView 0x7bc81000 - 0x7bd94fff c-r-x 0030:trace:virtual:VIRTUAL_DumpView 0x7bd95000 - 0x7bdb3fff c-rw- 0030:trace:module:load_builtin_callback loaded ntdll.dll 0x10360 0x7bc80000 0030:trace:module:load_builtin_dll Trying built-in L"kernel32.dll" 0030:trace:virtual:virtual_create_builtin_view created 0x7b460000-0x7b87a000 0030:trace:virtual:VIRTUAL_DumpView View: 0x7b460000 - 0x7b879fff (builtin image) 0030:trace:virtual:VIRTUAL_DumpView 0x7b460000 - 0x7b460fff c-r-- 0030:trace:virtual:VIRTUAL_DumpView 0x7b461000 - 0x7b6c8fff c-r-x 0030:trace:virtual:VIRTUAL_DumpView 0x7b6c9000 - 0x7b879fff c-rw- 0030:trace:module:load_dll looking for L"ntdll.dll" in L"" 0030:trace:module:load_dll Found L"ntdll.dll" for L"ntdll.dll" at 0x7bc80000, count=2 0030:trace:virtual:NtProtectVirtualMemory 0xffffffffffffffff 0x7b6d3e58 00000820 00000004 0030:trace:virtual:VIRTUAL_DumpView View: 0x7b460000 - 0x7b879fff (builtin image) 0030:trace:virtual:VIRTUAL_DumpView 0x7b460000 - 0x7b460fff c-r-- 0030:trace:virtual:VIRTUAL_DumpView 0x7b461000 - 0x7b6c8fff c-r-x 0030:trace:virtual:VIRTUAL_DumpView 0x7b6c9000 - 0x7b6d2fff c-rw- 0030:trace:virtual:VIRTUAL_DumpView 0x7b6d3000 - 0x7b6d4fff c-rW- 0030:trace:virtual:VIRTUAL_DumpView 0x7b6d5000 - 0x7b879fff c-rw- 0030:trace:virtual:NtProtectVirtualMemory 0xffffffffffffffff 0x7b6d3000 00002000 00000004 0030:trace:virtual:VIRTUAL_DumpView View: 0x7b460000 - 0x7b879fff (builtin image) 0030:trace:virtual:VIRTUAL_DumpView 0x7b460000 - 0x7b460fff c-r-- 0030:trace:virtual:VIRTUAL_DumpView 0x7b461000 - 0x7b6c8fff c-r-x 0030:trace:virtual:VIRTUAL_DumpView 0x7b6c9000 - 0x7b6d2fff c-rw- 0030:trace:virtual:VIRTUAL_DumpView 0x7b6d3000 - 0x7b6d4fff c-rW- 0030:trace:virtual:VIRTUAL_DumpView 0x7b6d5000 - 0x7b879fff c-rw- 0030:trace:module:load_builtin_callback loaded KERNEL32.dll 0x10440 0x7b460000 0030:trace:loaddll:load_builtin_dll Loaded L"KERNEL32.dll" at 0x7b460000: builtin 0030:trace:module:LdrGetDllHandle L"kernel32" -> 0x7b460000 (load path (null)) 0030:trace:virtual:NtAllocateVirtualMemory 0xffffffffffffffff (nil) 00001f44 3000 00000004 0030:trace:virtual:map_view got mem in reserved area 0x120000-0x122000 0030:trace:virtual:VIRTUAL_DumpView View: 0x120000 - 0x121fff (valloc) 0030:trace:virtual:VIRTUAL_DumpView 0x120000 - 0x121fff c-rw- 0030:trace:virtual:NtAllocateVirtualMemory 0xffffffffffffffff (nil) 0000200c 3000 00000004 0030:trace:virtual:map_view got mem in reserved area 0x130000-0x133000 0030:trace:virtual:VIRTUAL_DumpView View: 0x130000 - 0x132fff (valloc) 0030:trace:virtual:VIRTUAL_DumpView 0x130000 - 0x132fff c-rw- 0030:trace:virtual:NtFreeVirtualMemory 0xffffffffffffffff 0x120000 00000000 8000 0030:trace:process:init_current_directory starting in L"Z:\home\focht\Downloads\" 0x8 0030:trace:process:__wine_kernel_init starting process name=L"Z:\home\focht\Downloads\rpcs3.exe" argv[0]=L"Z:\home\focht\Downloads\rpcs3.exe" 0030:trace:module:load_dll looking for L"Z:\home\focht\Downloads\rpcs3.exe" in L"C:\windows\system32;C:\windows\system;C:\windows;.;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 0030:trace:module:get_load_order looking for L"Z:\home\focht\Downloads\rpcs3.exe" 0030:trace:module:get_load_order got main exe default n,b for L"Z:\home\focht\Downloads\rpcs3.exe" 0030:trace:module:load_native_dll Trying native dll L"Z:\home\focht\Downloads\rpcs3.exe" 0030:trace:virtual:NtMapViewOfSection handle=0x14 process=0xffffffffffffffff addr=(nil) off=000000000 size=0 access=20 0030:trace:virtual:map_view got mem in reserved area 0x140000-0x38ff000 0030:trace:module:map_image mapped PE file at 0x140000-0x38ff000 0030:trace:module:map_image mapping section .text at 0x141000 off 400 size 128d800 virt 128d7f3 flags 60000020 0030:trace:module:map_image clearing 0x13ce800 - 0x13cf000 0030:trace:module:map_image mapping section .rdata at 0x13cf000 off 128dc00 size 7b4000 virt 7b3f24 flags 40000040 0030:trace:module:map_image mapping section .data at 0x1b83000 off 1a41c00 size 4d200 virt 1be6a1c flags c0000040 0030:trace:module:map_image clearing 0x1bd0200 - 0x1bd1000 0030:trace:module:map_image mapping section .pdata at 0x376a000 off 1a8ee00 size d0a00 virt d0854 flags 40000040 0030:trace:module:map_image clearing 0x383aa00 - 0x383b000 0030:trace:module:map_image mapping section .tls at 0x383b000 off 1b5f800 size 400 virt 311 flags c0000040 0030:trace:module:map_image clearing 0x383b400 - 0x383c000 0030:trace:module:map_image mapping section .rodata at 0x383c000 off 1b5fc00 size e00 virt c30 flags 40000040 0030:trace:module:map_image clearing 0x383ce00 - 0x383d000 0030:trace:module:map_image mapping section .gfids at 0x383d000 off 1b60a00 size 200 virt 50 flags 40000040 0030:trace:module:map_image clearing 0x383d200 - 0x383e000 0030:trace:module:map_image mapping section _RDATA at 0x383e000 off 1b60c00 size aa00 virt a830 flags 40000040 0030:trace:module:map_image clearing 0x3848a00 - 0x3849000 0030:trace:module:map_image mapping section .rsrc at 0x3849000 off 1b6b600 size b5200 virt b50e0 flags 40000040 0030:trace:module:map_image clearing 0x38fe200 - 0x38ff000 0030:trace:virtual:VIRTUAL_DumpView View: 0x140000 - 0x38fefff (image) 0030:trace:virtual:VIRTUAL_DumpView 0x140000 - 0x140fff c-r-- 0030:trace:virtual:VIRTUAL_DumpView 0x141000 - 0x13cefff c-r-x 0030:trace:virtual:VIRTUAL_DumpView 0x13cf000 - 0x1b82fff c-r-- 0030:trace:virtual:VIRTUAL_DumpView 0x1b83000 - 0x3769fff c-rW- 0030:trace:virtual:VIRTUAL_DumpView 0x376a000 - 0x383afff c-r-- 0030:trace:virtual:VIRTUAL_DumpView 0x383b000 - 0x383bfff c-rW- 0030:trace:virtual:VIRTUAL_DumpView 0x383c000 - 0x38fefff c-r-- 0030:warn:module:perform_relocations Need to relocate module from 0x10000 to 0x140000, but there are no relocation records 0030:warn:module:load_dll Failed to load module L"Z:\home\focht\Downloads\rpcs3.exe"; status=c0000018 wine: Invalid address. 0030:trace:module:LdrShutdownProcess () --- snip ---
Unfortunately they chose the lowest possible image load base on NT - 64 KB instead of the default one for x64 which is usually 0x140000000.
This conflicts with Wine's reserved memory area (vm views) which starts at 0x10000 on x64.
https://github.com/RPCS3/rpcs3/blob/master/rpcs3/rpcs3.vcxproj#L145
--- snip --- <Link>
<AdditionalDependencies>..\hidapi.lib;winmm.lib;OpenAL.lib;XAudio.lib;D3D12GSRender.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;VKstatic.1.lib;glslang.lib;OSDependent.lib;OGLCompiler.lib;SPIRV.lib;HLSL.lib;Advapi32.lib;user32.lib;zlib.lib;..\libpng.lib;asmjit.lib;yaml-cpp.lib;emucore.lib;dxgi.lib;$(QTDIR)\lib\qtmain.lib;shell32.lib;opengl32.lib;$(QTDIR)\lib\Qt5OpenGL.lib;$(QTDIR)\lib\Qt5Widgets.lib;$(QTDIR)\lib\Qt5Quick.lib;$(QTDIR)\lib\Qt5Gui.lib;$(QTDIR)\lib\Qt5Qml.lib;$(QTDIR)\lib\Qt5Network.lib;$(QTDIR)\lib\Qt5Core.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;Qt5WinExtras.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\3rdparty\OpenAL\libs\Win64;..\Vulkan\glslang-build\hlsl\Release;..\Vulkan\glslang-build\SPIRV\Release;..\Vulkan\glslang-build\OGLCompilersDLL\Release;..\Vulkan\glslang-build\glslang\OSDependent\Windows\Release;..\Vulkan\Vulkan-build\loader\Release;..\Vulkan\glslang-build\glslang\Release;..\lib$(CONFIGURATION)-$(PLATFORM);..\3rdparty\minidx12\Lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions> <DataExecutionPrevention>true</DataExecutionPrevention> <GenerateDebugInformation>Debug</GenerateDebugInformation> <IgnoreImportLibrary>true</IgnoreImportLibrary> <LinkIncremental>false</LinkIncremental> <OutputFile>$(OutDir)\rpcs3.exe</OutputFile> <RandomizedBaseAddress>false</RandomizedBaseAddress> <SubSystem>Windows</SubSystem> <SuppressStartupBanner>true</SuppressStartupBanner> <BaseAddress>0x10000</BaseAddress> </Link> --- snip ---
Linker setting: BaseAddress -> 0x10000
Regards
https://bugs.winehq.org/show_bug.cgi?id=43914
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |1d49a57e77c2e18dd0b9e74aa6b | |71fc95ac57017 Status|NEW |RESOLVED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Fixed by 1d49a57e77c2e18dd0b9e74aa6b71fc95ac57017.
https://bugs.winehq.org/show_bug.cgi?id=43914
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 2.20.
https://bugs.winehq.org/show_bug.cgi?id=43914
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.0.x
https://bugs.winehq.org/show_bug.cgi?id=43914
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.0.x |---
--- Comment #5 from Michael Stefaniuc mstefani@winehq.org --- Removing the 2.0.x milestone from bugs included in 2.0.5.