Mass Effect 3: crash at startup but not if I use WINEDEBUG=+relay

Questions about Wine on Linux
Post Reply
TheCaconym
Newbie
Newbie
Posts: 4
Joined: Mon Apr 22, 2019 4:02 pm

Mass Effect 3: crash at startup but not if I use WINEDEBUG=+relay

Post by TheCaconym » Mon Jan 06, 2020 11:57 pm

Hello,

I am attempting to run Mass Effect 3 in a clean 32 bits prefix; two components were installed on top of the game: physx - through winetricks - and dxvk 1.5 (which includes d9vk - ME3 is a DirectX 9 game). I'm using wine-staging 5.0-rc2, compiled myself. A crash occurs pretty early in the game, and wine provides a backtrace (see below). I should mention the exact same crash occurs without dxvk.

The system is Debian Buster amd64; the graphic card is an nvidia one with very recent proprietary drivers. The same system runs 3D apps just fine, including Mass Effect 2 through wine+d9vk.

To investigate, I attempted to use WINEDEBUG=+relay; redirecting the output to a "stderr" file. After about two minutes, and 11GB of log file, the game runs. The crash does not occur, and thus I cannot investigate further.

I then tried to use WINEDEBUG=+relay but redirecting the stderr output to /dev/null instead (which would likely decrease the performance but not that much, the output being wiped immediately), thinking I could play this way: when I do this, the crash occurs yet again.

Any idea on how I could try to pinpoint the root cause given this ? I imagine the most likely reason for it working when redirecting the output to a file or the terminal is that it slows down the program enough that some sort of race condition or something does not occur; hence why it still crashes when using /dev/null or disabling the relay debug channel.

As for the (sadly uninformative) backtrace:

Code: Select all

Unhandled exception: page fault on read access to 0x00000004 in 32-bit code (0x0041def3).
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:0041def3 ESP:01fecd94 EBP:01feceb0 EFLAGS:00010202(  R- --  I   - - - )
 EAX:01fecea4 EBX:22085240 ECX:00000004 EDX:01feceec
 ESI:01fecf08 EDI:00000004
Stack dump:
0x01fecd94:  3a223a6c 7d2cf5f0 01fecf14 00000000
0x01fecda4:  00000000 0011a303 0011a2fb 0000000c
0x01fecdb4:  00000000 01fecde0 017d821c 0011959c
0x01fecdc4:  0011a304 01fecf18 7d2d1c2f 00140a72
0x01fecdd4:  0e57aa94 7eeb5f8c 00000000 00000006
0x01fecde4:  00000000 00000006 00000000 01fece10
Backtrace:
=>0 0x0041def3 EntryPoint+0xffffffff() in masseffect3 (0x01feceb0)
  1 0x00b8011c EntryPoint+0xffffffff() in masseffect3 (0x01fed5b8)
  2 0x00b7fda5 EntryPoint+0xffffffff() in masseffect3 (0x01fed5c4)
  3 0x00bca2d4 EntryPoint+0xffffffff() in masseffect3 (0x01fed604)
  4 0x00b6bbb0 EntryPoint+0xffffffff() in masseffect3 (0x01fed610)
  5 0x00452c3a EntryPoint+0xffffffff() in masseffect3 (0x01feda90)
  6 0x0044201f EntryPoint+0xffffffff() in masseffect3 (0x01fedab0)
  7 0x004530d8 EntryPoint+0xffffffff() in masseffect3 (0x01fedb20)
  8 0x0045331c EntryPoint+0xffffffff() in masseffect3 (0x01fedba8)
  9 0x006d71a1 EntryPoint+0xffffffff() in masseffect3 (0x01fedbc0)
  10 0x006d4509 EntryPoint+0xffffffff() in masseffect3 (0x01fedbd4)
  11 0x006cd2e0 EntryPoint+0xffffffff() in masseffect3 (0x01fefd98)
  12 0x00d2794f EntryPoint+0xffffffff() in masseffect3 (0x01fefdb4)
  13 0x00bf5252 EntryPoint+0xffffffff() in masseffect3 (0x01fefe34)
  14 0x00bf2ba8 EntryPoint+0xffffffff() in masseffect3 (0x01fefe80)
  15 0x00bf2d87 EntryPoint+0xffffffff() in masseffect3 (0x01fefe90)
  16 0x0112e501 EntryPoint+0xffffffff() in masseffect3 (0x01feff20)
  17 0x7b453b89 call_process_entry+0x18() in kernel32 (0x01feff48)
  18 0x7b453fbf start_process+0x11e(entry=<couldn't compute location>, peb=<couldn't compute location>) [Z:\home\ben\wine-5.0-rc2.x86_build\dlls\kernel32\..\..\..\wine-5.0-rc2\dlls\kernel32\process.c:174] in kernel32 (0x01feffd8)
  19 0x7b453b9a __wine_start_process+0x9() in kernel32 (0x01feffec)
0x0041def3 EntryPoint+0xffffffff in masseffect3: cmpb	$0x0,0x0(%edi)
Modules:
Module	Address			Debug info	Name (183 modules)
PE	  400000- 1b15000	Export          masseffect3
PE	 2c80000- 2c93000	Deferred        physxloader
PE	 2db0000- 2e0c000	Deferred        physxcooking
PE	 2f20000- 2f61000	Deferred        cudart32_60
PE	 97c0000- 9c46000	Deferred        physxcore
PE	10000000-1002b000	Deferred        physxextensions
PE	18000000-1803b000	Deferred        binkw32
PE	62440000-626f8000	Deferred        d3d9
PE	6a540000-6a838000	Deferred        d3d11
PE	6f400000-6f5fe000	Deferred        dxgi
ELF	7a800000-7a944000	Deferred        opengl32<elf>
  \-PE	7a840000-7a944000	\               opengl32
ELF	7b400000-7b673000	Dwarf           kernel32<elf>
  \-PE	7b420000-7b673000	\               kernel32
ELF	7bc00000-7beea000	Deferred        ntdll<elf>
  \-PE	7bc30000-7beea000	\               ntdll
ELF	7c000000-7c005000	Deferred        <wine-loader>
ELF	7c8bd000-7c917000	Deferred        libvulkan.so.1
ELF	7c93b000-7c988000	Deferred        uxtheme<elf>
  \-PE	7c950000-7c988000	\               uxtheme
ELF	7c988000-7c992000	Deferred        libuuid.so.1
ELF	7c992000-7c9cd000	Deferred        libexpat.so.1
ELF	7c9cd000-7ca1a000	Deferred        libfontconfig.so.1
ELF	7ca1a000-7ca59000	Deferred        libpng16.so.16
ELF	7ca59000-7cb1c000	Deferred        libfreetype.so.6
ELF	7cb1c000-7cb2f000	Deferred        libxi.so.6
ELF	7cb2f000-7cb33000	Deferred        libxcomposite.so.1
ELF	7cb33000-7cb40000	Deferred        libxrandr.so.2
ELF	7cb40000-7cb4c000	Deferred        libxrender.so.1
ELF	7cc4c000-7ccda000	Deferred        setupapi<elf>
  \-PE	7cc60000-7ccda000	\               setupapi
ELF	7ccda000-7ccf9000	Deferred        libbsd.so.0
ELF	7ccf9000-7cd27000	Deferred        libxcb.so.1
ELF	7cd27000-7ce76000	Deferred        libx11.so.6
ELF	7ce76000-7ce8b000	Deferred        libxext.so.6
ELF	7ce8b000-7cf46000	Deferred        winex11<elf>
  \-PE	7ceb0000-7cf46000	\               winex11
ELF	7cf46000-7cf6f000	Deferred        libtinfo.so.6
ELF	7cf6f000-7cf9c000	Deferred        libncurses.so.6
ELF	7cf9d000-7cfa4000	Deferred        libxfixes.so.3
ELF	7cfa4000-7cfb1000	Deferred        libxcursor.so.1
ELF	7cfc0000-7d12c000	Deferred        msvcp90<elf>
  \-PE	7d010000-7d12c000	\               msvcp90
ELF	7d150000-7d157000	Deferred        libxxf86vm.so.1
ELF	7d157000-7d16d000	Deferred        faultrep<elf>
  \-PE	7d160000-7d16d000	\               faultrep
ELF	7d16d000-7d187000	Deferred        powrprof<elf>
  \-PE	7d170000-7d187000	\               powrprof
ELF	7d187000-7d1b4000	Deferred        mpr<elf>
  \-PE	7d190000-7d1b4000	\               mpr
ELF	7d1b4000-7d24b000	Deferred        wininet<elf>
  \-PE	7d1d0000-7d24b000	\               wininet
ELF	7d24b000-7d330000	Deferred        msvcr90<elf>
  \-PE	7d270000-7d330000	\               msvcr90
ELF	7d330000-7d349000	Deferred        userenv<elf>
  \-PE	7d340000-7d349000	\               userenv
ELF	7d349000-7d47e000	Deferred        oleaut32<elf>
  \-PE	7d380000-7d47e000	\               oleaut32
ELF	7d47e000-7d4a5000	Deferred        shcore<elf>
  \-PE	7d490000-7d4a5000	\               shcore
ELF	7d4a5000-7d50d000	Deferred        shlwapi<elf>
  \-PE	7d4c0000-7d50d000	\               shlwapi
ELF	7d50d000-7df43000	Deferred        shell32<elf>
  \-PE	7d540000-7df43000	\               shell32
ELF	7df43000-7e00e000	Deferred        winmm<elf>
  \-PE	7df50000-7e00e000	\               winmm
ELF	7e00e000-7e02d000	Deferred        libz.so.1
ELF	7e02d000-7e0b5000	Deferred        dbghelp<elf>
  \-PE	7e040000-7e0b5000	\               dbghelp
ELF	7e0b5000-7e0ce000	Deferred        libresolv.so.2
ELF	7e0cf000-7e0d4000	Deferred        libxinerama.so.1
ELF	7e0d4000-7e0f2000	Deferred        aclui<elf>
  \-PE	7e0e0000-7e0f2000	\               aclui
ELF	7e0f2000-7e120000	Deferred        iphlpapi<elf>
  \-PE	7e100000-7e120000	\               iphlpapi
ELF	7e120000-7e13c000	Deferred        wsock32<elf>
  \-PE	7e130000-7e13c000	\               wsock32
ELF	7e13c000-7e155000	Deferred        d3dx10_42<elf>
  \-PE	7e140000-7e155000	\               d3dx10_42
ELF	7e155000-7e274000	Deferred        ucrtbase<elf>
  \-PE	7e190000-7e274000	\               ucrtbase
ELF	7e274000-7e29f000	Deferred        d3dxof<elf>
  \-PE	7e280000-7e29f000	\               d3dxof
ELF	7e29f000-7e31d000	Deferred        d3dcompiler_47<elf>
  \-PE	7e2c0000-7e31d000	\               d3dcompiler_47
ELF	7e31d000-7e3d3000	Deferred        d3dx9_42<elf>
  \-PE	7e340000-7e3d3000	\               d3dx9_42
ELF	7e3d3000-7e41f000	Deferred        winevulkan<elf>
  \-PE	7e3e0000-7e41f000	\               winevulkan
ELF	7e41f000-7e438000	Deferred        vulkan-1<elf>
  \-PE	7e430000-7e438000	\               vulkan-1
ELF	7e438000-7e451000	Deferred        xinput1_3<elf>
  \-PE	7e440000-7e451000	\               xinput1_3
ELF	7e451000-7e4e9000	Deferred        rpcrt4<elf>
  \-PE	7e470000-7e4e9000	\               rpcrt4
ELF	7e4e9000-7e653000	Deferred        ole32<elf>
  \-PE	7e520000-7e653000	\               ole32
ELF	7e653000-7e67a000	Deferred        imm32<elf>
  \-PE	7e660000-7e67a000	\               imm32
ELF	7e67a000-7e6c7000	Deferred        usp10<elf>
  \-PE	7e690000-7e6c7000	\               usp10
ELF	7e6c7000-7e7a0000	Deferred        msvcrt<elf>
  \-PE	7e6f0000-7e7a0000	\               msvcrt
ELF	7e7a0000-7e7b7000	Deferred        version<elf>
  \-PE	7e7b0000-7e7b7000	\               version
ELF	7e7b7000-7e83a000	Deferred        advapi32<elf>
  \-PE	7e7d0000-7e83a000	\               advapi32
ELF	7e83a000-7e991000	Deferred        gdi32<elf>
  \-PE	7e860000-7e991000	\               gdi32
ELF	7e991000-7ebc9000	Deferred        user32<elf>
  \-PE	7e9c0000-7ebc9000	\               user32
ELF	7ebc9000-7ed22000	Deferred        comctl32<elf>
  \-PE	7ebf0000-7ed22000	\               comctl32
ELF	7ed22000-7ed88000	Deferred        dinput8<elf>
  \-PE	7ed30000-7ed88000	\               dinput8
ELF	7ed88000-7ed9e000	Deferred        psapi<elf>
  \-PE	7ed90000-7ed9e000	\               psapi
ELF	7ed9e000-7edda000	Deferred        ws2_32<elf>
  \-PE	7edb0000-7edda000	\               ws2_32
ELF	7edda000-7eeb7000	Deferred        kernelbase<elf>
  \-PE	7edf0000-7eeb7000	\               kernelbase
ELF	7eeb7000-7eecc000	Deferred        libnss_files.so.2
ELF	7eecc000-7efd2000	Deferred        libm.so.6
ELF	7efd2000-7efdc000	Deferred        librt.so.1
ELF	7efde000-7efe5000	Deferred        libxdmcp.so.6
ELF	7efe5000-7efea000	Deferred        libxau.so.6
ELF	7efea000-7f000000	Deferred        wow64cpu<elf>
  \-PE	7eff0000-7f000000	\               wow64cpu
ELF	eb4f3000-ec000000	Deferred        libnvidia-glvkspirv.so.440.36
ELF	f3d71000-f3d7a000	Deferred        libxcb-sync.so.1
ELF	f3d7a000-f3d7f000	Deferred        libxcb-present.so.0
ELF	f3d7f000-f3d85000	Deferred        libxcb-dri3.so.0
ELF	f3d85000-f3d8a000	Deferred        libx11-xcb.so.1
ELF	f3d8a000-f3da8000	Deferred        libxcb-glx.so.0
ELF	f42a8000-f42c6000	Deferred        libgcc_s.so.1
ELF	f4350000-f43b2000	Deferred        libgldispatch.so.0
ELF	f43b2000-f43d6000	Deferred        libglx.so.0
ELF	f43d6000-f443c000	Deferred        libgl.so.1
ELF	f443c000-f45d2000	Deferred        wined3d<elf>
  \-PE	f4480000-f45d2000	\               wined3d
ELF	f45d2000-f4651000	Deferred        ddraw<elf>
  \-PE	f45f0000-f4651000	\               ddraw
ELF	f4916000-f493b000	Deferred        libgpg-error.so.0
ELF	f493b000-f49c8000	Deferred        libvorbisenc.so.2
ELF	f49c8000-f49f4000	Deferred        libvorbis.so.0
ELF	f49f4000-f49fd000	Deferred        libogg.so.0
ELF	f49fd000-f4a60000	Deferred        libflac.so.8
ELF	f4a60000-f4a7b000	Deferred        libnsl.so.1
ELF	f4a7b000-f4b5e000	Deferred        libgcrypt.so.20
ELF	f4b5e000-f4b7e000	Deferred        liblz4.so.1
ELF	f4b7e000-f4baa000	Deferred        liblzma.so.5
ELF	f4baa000-f4bb1000	Deferred        libasyncns.so.0
ELF	f4bb1000-f4c40000	Deferred        libsndfile.so.1
ELF	f4c40000-f4c4c000	Deferred        libwrap.so.0
ELF	f4c4c000-f4cf7000	Deferred        libsystemd.so.0
ELF	f4cf7000-f4cff000	Deferred        libxtst.so.6
ELF	f4cff000-f4d0a000	Deferred        libsm.so.6
ELF	f4d0a000-f4d27000	Deferred        libice.so.6
ELF	f4d27000-f4d2e000	Deferred        libcap.so.2
ELF	f4d2e000-f4d8d000	Deferred        libdbus-1.so.3
ELF	f4d8d000-f4e1e000	Deferred        libpulsecommon-12.2.so
ELF	f4e1e000-f4e7b000	Deferred        libpulse.so.0
ELF	f4e9f000-f4ee4000	Deferred        winepulse<elf>
  \-PE	f4eb0000-f4ee4000	\               winepulse
ELF	f4ee4000-f4f0c000	Deferred        mmdevapi<elf>
  \-PE	f4ef0000-f4f0c000	\               mmdevapi
ELF	f4f0c000-f4f61000	Deferred        dsound<elf>
  \-PE	f4f20000-f4f61000	\               dsound
ELF	f4f61000-f4f7b000	Deferred        nvapi<elf>
  \-PE	f4f70000-f4f7b000	\               nvapi
ELF	f5135000-f515e000	Deferred        gameux<elf>
  \-PE	f5140000-f515e000	\               gameux
ELF	f5503000-f7114000	Deferred        libnvidia-glcore.so.440.36
ELF	f7114000-f71fc000	Deferred        libglx_nvidia.so.0
ELF	f7320000-f7328000	Deferred        libnss_dns.so.2
ELF	f732a000-f7330000	Deferred        libdl.so.2
ELF	f7330000-f750e000	Deferred        libc.so.6
ELF	f750e000-f752f000	Deferred        libpthread.so.0
ELF	f7536000-f754b000	Deferred        libdrm.so.2
ELF	f754b000-f7550000	Deferred        libnvidia-tls.so.440.36
ELF	f7553000-f7719000	Dwarf           libwine.so.1
ELF	f771b000-f7745000	Deferred        ld-linux.so.2
ELF	f7747000-f7748000	Deferred        [vdso].so
Threads:
process  tid      prio (all id:s are in hex)
00000008 (D) C:\Games\Mass Effect 3\Binaries\Win32\MassEffect3.exe
	["C:\Games\Mass Effect 3\Binaries\Win32\MassEffect3.exe"]
	00000061    0
	0000005e    2
	0000005d    2
	0000005c    0
	0000005b    0
	0000005a    0
	00000059    0
	00000058    0
	00000057   -2
	00000056   -2
	00000055   -2
	00000054   -2
	00000053   -2
	00000052   -2
	00000051   -2
	00000050   -2
	0000004f   -2
	0000004e    0
	0000004d    0
	0000004c    0
	0000004a    0
	00000049    1
	00000048   15
	00000047    0
	00000046   15
	00000045    0
	00000044    0
	00000043    1
	00000042    0
	00000041    0
	0000003d    0
	0000003c    0
	0000003b    0
	0000003a    0
	00000039    0
	00000038    0
	00000037    0
	00000036    0
	00000035    0
	00000034    0
	00000033    0
	00000032    0
	00000031    0
	00000030    0
	0000002f    0
	0000002e    0
	0000002d    0
	0000002c    0
	00000009    0 <==
0000000e services.exe
	[C:\windows\system32\services.exe]
	00000027    0
	0000001d    0
	00000015    0
	00000010    0
	0000000f    0
00000011 plugplay.exe
	[C:\windows\system32\plugplay.exe]
	00000019    0
	00000018    0
	00000012    0
00000013 explorer.exe
	[C:\windows\system32\explorer.exe /desktop]
	00000023    0
	00000022    0
	00000021    0
	0000001c    0
	00000014    0
0000001a winedevice.exe
	[C:\windows\system32\winedevice.exe]
	00000024    0
	00000020    0
	0000001f    0
	0000001e    0
	0000001b    0
00000025 winedevice.exe
	[C:\windows\system32\winedevice.exe]
	0000002a    0
	00000029    0
	00000028    0
	00000026    0
00000062 explorer.exe
	[C:\windows\system32\explorer.exe /desktop]
	00000066    0
	00000065    0
	00000064    0
	00000063    0
System information:
    Wine build: wine-5.0-rc2 (Staging)
    Platform: i386
    Version: Windows 7
    Host system: Linux
    Host version: 4.9.0-5-amd64
Thanks in advance !

TheCaconym
Newbie
Newbie
Posts: 4
Joined: Mon Apr 22, 2019 4:02 pm

Re: Mass Effect 3: crash at startup but not if I use WINEDEBUG=+relay

Post by TheCaconym » Tue Jan 07, 2020 1:17 pm

In an attempt to have a more detailed backtrace, I recompiled wine with "-O0 -fno-inline -fno-omit-frame-pointer -fno-optimize-sibling-calls" (on top of -g). Lo and behold, the bug does not occur. This made me think my issue was linked to a compiler optimization.

So I then tried to compile wine with -O1; still crashing. Then with -O0: the crash disappears and the game runs without any issue. I won't be able to benefit from -O2 or even -O1 but still, I can play.

So I can confirm my issue was linked to compiler optimizations (I use gcc 8.3); and I encourage anyone with a similar bug to try the same, especially if you're compiling wine yourself.

Post Reply