ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
24.67k stars 1.07k forks source link

Project Torque (1112400) #3359

Open Newbytee opened 4 years ago

Newbytee commented 4 years ago

Compatibility Report

System Information

I confirm:

steam-1112400.log

Symptoms

The game does not launch and instead crashes before anything else happens.

Reproduction

  1. Start the game
  2. Observe that the game crashes instantly upon launch
madewokherd commented 4 years ago

With wine-mono from the master branch I get this: [00000028:] EXCEPTION handling: System.InvalidProgramException: Invalid IL code in ^].^Z:^A (): IL_0019: callvirt 0x0a000fda

Looks like obfuscated code, that'll be a pain to track down.

madewokherd commented 4 years ago

The failing code looks like this

                IL_0000: br.s IL_0012

                IL_0002: ldnull
                IL_0003: ldftn class [mscorlib]System.Reflection.Assembly '\u001d.\u001a'::'\u0001'(object, class [mscorlib]System.ResolveEventArgs)
                IL_0009: newobj instance void [mscorlib]System.ResolveEventHandler::.ctor(object, native int)
                IL_000e: br.s IL_0019

                IL_0010: leave.s IL_0023

                IL_0012: call class [mscorlib]System.AppDomain [mscorlib]System.AppDomain::get_CurrentDomain()
                IL_0017: br.s IL_0002

                IL_0019: callvirt instance void [mscorlib]System.AppDomain::add_AssemblyResolve(class [mscorlib]System.ResolveEventHandler)

My guess: Mono processes the code sequentially to figure out the stack types, but in fact the objects aren't pushed in the order they're written. It fails because the call signature doesn't match what it thinks is supposed to be in the stack.

Jackster commented 2 years ago

I am running the game without obfuscation on my SteamDeck. Here is the full error log. steam-17677587930077462528.log

My issue is this. Unhandled exception: unimplemented function d3dx9_36.dll.D3DXGatherFragments called in 32-bit code (0x7b011197).

D3DX fragment linker was removed in later builds of DX9 releases. Will look into it. If anyone has any suggestions, please let me know.

The game uses the November 2007 SDK which is D3DX9_35

Jackster commented 2 years ago

I should note, I did get this working when I first got my Deck. https://community.projecttorque.racing/threads/steam-deck-support-it-works.1618/#post-9316

I used ProtonTricks to install the following

This stopped working a couple of weeks after I posted that topic on our forum.

Jackster commented 2 years ago

Opening the dump files from the Steam Deck and it looks to be an issue with Fragment Linker. image If one force installs d3dx9_36 via ProtonTricks, it no longer crashes when loading. But that game does not fully load up. gamescope_2022-10-23_16-44-41 It is getting stuck on loading the game. image At this point, I would guess this is a .NET 3.5 issue stopping the game fully loading.

Jackster commented 1 year ago

More Proton debugs from the game. Fresh install of the latest OS and running Proton 7.0-5

Stock Proton settings other than "DXVK_LOG_LEVEL": "full", DXVK.log

"PROTON_USE_WINED3D": "1", WINED3D.log

Jackster commented 1 year ago

Looks to be a Wine level issue. Will report back.

Jackster commented 1 year ago

So I tested an old .exe today and it worked when I included the d3dx9_36.dll and d3dx9_31.dll files in the game directory. When running without these files, I got the "unimplemented function d3dx9_36.dll.D3DXGatherFragments" error.

I have not been able to get the current build to load the .DLLs before today so did not upload them to the deck and we don't include them with the release (as advised) as Steam handles the DX9 install.

Here is the Proton log from the old version that runs. steam-16801495106560458752.log

I have just tried 2 new builds and both worked when the DLLs were included in the game directory. Even managed to get the March 2010 SDK working and that I believe is the last SDK we can run before stuff got properly removed. gamescope_2022-12-24_04-13-10

As for how the obfuscated version use to run, IDK. We have made some changes and updates to the obfuscation so I will roll back and check to see what might be causing us issues.

Jackster commented 1 year ago

Rolled back to an earlier version and it does not run.

Looks like users will need to force install .NET 3.5 to get it working as Mono does not run the obfuscated code.

Is anyone able to advise on how to force .NET 3.5 over mono or a way to install it that is easy for the end user? ProtonTricks does not want to install 3.5 (at least since May 2022) as it comes up with the "2.0 is not installed" error.