aa2g / AA2Unlimited

Modding framework for Artificial Academy 2
120 stars 33 forks source link

[Linux/Wine] .ppx resource loader errors #288

Open morphiusDev opened 3 years ago

morphiusDev commented 3 years ago

Logfile: GIST

It seems like since the ppx format has been introduced, the game stopped working for me on Linux/Wine.

On default settings the launcher will hang when pressing "Launch the game" & won't recover until forcefully closed. Turning off the "Use .ppx resource loader" option results in the game starting as expected. Using .pp2 resource loader doesn't hang up the launcher and the game will launch.

If there's anything I can test to help get it working just let me know.

edit: Tried using latest Wine 6.0 (system) as well as multiple other versions via Lutris.

edit 2: Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. at PPeXM64.Program.Main(String[] args) in D:\Sourcecode\GitHub-Bepis\PPeX\PPeXM64\Program.cs:line 138 wine: Unhandled page fault on read access to 0000000000000000 at address 0000000019BA6705 (thread 0090), starting debugger... Unhandled exception: page fault on read access to 0x00000000 in 64-bit code (0x000000007b02ce76).

Might as well be a problem with wine and .NET Core but I can't tell. Maybe @bbepis can pinpoint the issue.

morphiusDev commented 3 years ago

I found that the game can launch when the *.exe is executed from a terminal environment; execution through the filemanager (ie nemo, nautilus etc) directly doesn't work because of the code line specified above ("PPeX\PPeXM64\Program.cs:line 138"). My guess is that there's a problem with resolving a path used in the source code that points to the "pipe server' (\.\pipe\PPEX), whatever that may be. So, it looks like a minor issue, but still has to be investigated.

b800047 commented 3 years ago

It looks like the PPX server process (AAUnlimited\ppex\PPeXM64.exe) cannot start. Make sure that you have .NET Core — which you can find in the “extra” folder, or download it here — installed, and that you are running a 64 bit OS. If you have a 32 bit OS… The source code is available, so it should not take more than a minute to build a 32 bit version of it?

Found this post in another forum with a similar problem...not sure if its available for Linux but its worth a shot...

k4yf0ur commented 3 years ago

Manually install net desktop runtime provided in the extra folder, use winetricks to install vcrun 2015, and install alsa and openal plugins from package manager. Create a prefix with winecfg and then run WINEPREFIX=/your/aa2/prefix winetricks -q dotnetcoredesktop3 vcrun2015 dxvk. Set a shortcut or use something like lutris so it runs AA2 from that prefix

kongtonic commented 2 years ago

I'm experiencing a similar issue right now on Windows. If I disable the ppx option, AA2 runs (but I see all white). Without, a window flashes in before instantly disappearing the and the configuration window hangs. When I run PPeXM64.exe manually via a powershell, this is what I see:

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at PPeXM64.Program.Main(String[] args) in D:\Sourcecode\GitHub-Bepis\PPeX\PPeXM64\Program.cs:line 58

Windows version: Windows 11 Insider Preview 22499.1000 (rs_prerelease)

dotnet.exe --list-runtimes
Microsoft.NETCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

I experienced the same issues with the 3.1.9 dotnet version packaged with the torrent. I also have the directx and vc++ version packaged (14.0.23026.0) installed. Same results regardless of with or without fix/wined3d scripts being used.

Any idea what could possibly be causing this?

kongtonic commented 2 years ago

The error I posted was a red herring, I just didn't give it any args...once I gave it the data folder as an argument and then tried to run AA2 it works fine with the ppx enabled, so for whatever reason the server isn't being started properly through the launcher. Not sure why exactly.