Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

(Steam Deck) Injection crashes the game at startup with the current build #24

Open
Deus-nsf opened this issue Dec 17, 2023 · 43 comments
Open
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Deus-nsf
Copy link

Your link to thirteenAG's asi loader doesn't work, so I got the latest d3d11.dll from his github, hopefully that isn't the issue.

loading with the following command:
WINEDLLOVERRIDES="d3d11.dll=n,b" %command%

which does load alias, but crashes.

This is a follow up to this thread: aliasIsolation#40 (comment)

@Deus-nsf Deus-nsf added the bug Something isn't working label Dec 17, 2023
@Deus-nsf
Copy link
Author

Oh no... I think I understand what is going on.......
I was certain Alien Isolation was a 64 bit game, but it's 32 bit...
So I have to get a 32 bit ASI loaader... let me test that reql quick but it has to be this.

@RyanJGray
Copy link
Owner

Sorry for the delay in replying - been quite busy before stuff finished up at work for Christmas!

I had tested this on my own Steam Deck and was confused what the issue was, as the crash dump that you sent in aliasIsolation#40 didn't suggest Alias was responsible for the crash 😅

That would make sense though, it does confuse me why Alien Isolation isn't 64-bit for PC - the native Linux port and the Windows Store release are 64-bit I believe.

@Deus-nsf
Copy link
Author

Deus-nsf commented Dec 21, 2023

unfortunately it has to be more complicated than this, because it still doesn't work... can you link the dll that you use for the ASI loading? maybe something changed since last time.

Because for example I can't even boot the game with my current d3d11.dll asi loader, even without .asi files in the same root level.

It's... a bit of a mess to be honest, sorry. Very black box-y (at least on the asi loading part).

@RyanJGray
Copy link
Owner

unfortunately it has to be more complicated than this, because it still doesn't work... can you link the dll that you use for the ASI loading? maybe something changed since last time.

Because for example I can't even boot the game with my current d3d11.dll asi loader, even without .asi files in the same root level.

It's... a bit of a mess to be honest, sorry. Very black box-y (at least on the asi loading part).

Let me send you my d3d11.dll in a bit and hopefully that helps, maybe ThirteenAG's ASI loader got an update that broke something with the game.

No problem, sorry you're having issues with it, never had this problem before but hopefully we can fix it!

@joghert
Copy link

joghert commented Feb 6, 2024

Current combo with V7.1.0 ASI Loader seems to be unable to actually inject to the lib, and the game gets stuck trying to load content. Obtaining an older version of ASI Loader to test is not possible now, because ThirteenAG only links to latest build and the release files don't contain any actual releases.

@Deus-nsf
Copy link
Author

Deus-nsf commented Feb 6, 2024

Hence why the working dll should be directly hosted by Ryan :)

@RyanJGray RyanJGray self-assigned this Mar 14, 2024
@RyanJGray RyanJGray added this to the v1.1.3 milestone Mar 14, 2024
@RyanJGray
Copy link
Owner

I'd rather not have to host the injector DLL in the project unless it's absolutely necessary, but if it keeps causing problems I'll host an older version in the release zips, no problem.

I tested v1.1.3 of Alias with EndeavourOS (via Steam / Proton), and the latest d3d11-Win32 release from ThirteenAG, and it all seems to be working okay, I'll test this on my Steam Deck now.

@joghert
Copy link

joghert commented Mar 24, 2024

It seems to work with Alias v1.1.3 and Ultimate ASI Loader 7.1.0 and looks perfect now. Thanks for all the effort in making this possible. (Valve Proton 8.0-5)

I agree on the not hosting DLLs from other projects, that can get very messy. But finding a version that is actually working on multiple systems would add in the search for the code change in the original project.

I had a try compiling a previous version and got stuck and demotivated.

@RyanJGray
Copy link
Owner

No worries, happy to help! :P

I tested Alias v1.1.3 on my Steam Deck (Valve Proton 8.0-5), and it got a solid 60FPS even in large areas (with stock Deck performance settings), with no visual artifacts that I could notice.

Yeah... I'm not exactly sure what ThirteenAG changes in their newer versions, I doubt being very up to date with their injector would have a performance improvement or any noticeable benefit when there aren't any bugs that I know of.
It might make more sense for me to just host the current working DLL in the release zip.

I'll add ASI Loader 7.1.0 into the release zips from now on.

The only downside is the in-game Alias GUI isn't usable on the Deck or on controller, I'll see about fixing that. (:

@Klemci
Copy link

Klemci commented Mar 30, 2024

n older version of ASI Loader to test is not possible now

I don't get it, i have acces to Dec 6, 2021 to Feb 2, 2024 build:

https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases?page=1

@joghert
Copy link

joghert commented Mar 30, 2024

n older version of ASI Loader to test is not possible now

I don't get it, i have acces to Dec 6, 2021 to Feb 2, 2024 build:

https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases?page=1

I missed the "Usually it works as dinput8.dll, but if it's not, there is a possibility to rename it(see the list of supported names above)." and assumed the linked files would be the same version as in the release.
In that assumption the release looks broken.

@joghert
Copy link

joghert commented Mar 30, 2024

To get back to the original bug report, I think the reason AliasIsolation crashed is because i used a custom settings xml as a base for my settings (https://www.nexusmods.com/alienisolation/mods/34).

I think I forgot to test with a clean installation folder, so that might have interfered with a proper search for the culprit.

@Klemci
Copy link

Klemci commented Apr 3, 2024

Try the tool to manage your settings, it backups original btw 👍 https://www.nexusmods.com/alienisolation/mods/19?tab=files

@RyanJGray
Copy link
Owner

RyanJGray commented Apr 3, 2024

To get back to the original bug report, I think the reason AliasIsolation crashed is because i used a custom settings xml as a base for my settings (https://www.nexusmods.com/alienisolation/mods/34).

I think I forgot to test with a clean installation folder, so that might have interfered with a proper search for the culprit.

Huh, that's weird.

I can't imagine using the enhanced engine settings XML would cause Alias to crash, but I'll do some testing.

In any case, glad it seems to be working now!

@Klemci
Copy link

Klemci commented Apr 3, 2024

Mine is done by GPUnity,, i know about his Arkham City Redux MOD...

edit:
oh yes, you mean your's has original backup file.

@nabel0
Copy link

nabel0 commented Aug 21, 2024

No worries, happy to help! :P

I tested Alias v1.1.3 on my Steam Deck (Valve Proton 8.0-5), and it got a solid 60FPS even in large areas (with stock Deck performance settings), with no visual artifacts that I could notice.

Yeah... I'm not exactly sure what ThirteenAG changes in their newer versions, I doubt being very up to date with their injector would have a performance improvement or any noticeable benefit when there aren't any bugs that I know of. It might make more sense for me to just host the current working DLL in the release zip.

I'll add ASI Loader 7.1.0 into the release zips from now on.

The only downside is the in-game Alias GUI isn't usable on the Deck or on controller, I'll see about fixing that. (:

Im encountering the same problem (crash) with your latest version.
I also can't find the compatible ASI Loader in your release files.
Am i doing anything wrong?

@nabel0
Copy link

nabel0 commented Aug 21, 2024

Found and fixed the problem:
You MUST use Proton 8.0-5 to get it to work (Latest ASI Loader will work).
If you use latest Proton 9.xx the game will crash on load.

@Deus-nsf
Copy link
Author

Found and fixed the problem: You MUST use Proton 8.0-5 to get it to work (Latest ASI Loader will work). If you use latest Proton 9.xx the game will crash on load.

That was it?! Fk me.... Can't believe I didn't just try that.
I can't confirm it works yet though, but DAMN.

@nabel0
Copy link

nabel0 commented Aug 21, 2024

Found and fixed the problem: You MUST use Proton 8.0-5 to get it to work (Latest ASI Loader will work). If you use latest Proton 9.xx the game will crash on load.

That was it?! Fk me.... Can't believe I didn't just try that. I can't confirm it works yet though, but DAMN.

Would be nice if you also can test and verify this...

@RyanJGray
Copy link
Owner

Interesting... good find! I guess Valve have broken or changed something in 9. I normally play with Proton Experimental, but 8 has been working for me as well, I'll have to test Proton 9 with this mod.

@RyanJGray
Copy link
Owner

It's odd because it works with Proton 9.0-2 on my laptop (with an NVIDIA GPU), latest ASI loader and Alias mod release...

Any chance when the game crashes you get a popup saying Alias Isolation crashed? That popup mentions a crash dump which would help me a ton in trying to work out what's causing this. If it gets generated it'll be in your .steam/steam/steamapps/compatdata/214490/pfx/drive_c/users/steamuser/Temp folder as a file called aliasIsolationCrashDump.dmp.

I'll need to test the game on my Deck again when I get home this evening

@RyanJGray
Copy link
Owner

RyanJGray commented Aug 21, 2024

No worries, happy to help! :P
I tested Alias v1.1.3 on my Steam Deck (Valve Proton 8.0-5), and it got a solid 60FPS even in large areas (with stock Deck performance settings), with no visual artifacts that I could notice.
Yeah... I'm not exactly sure what ThirteenAG changes in their newer versions, I doubt being very up to date with their injector would have a performance improvement or any noticeable benefit when there aren't any bugs that I know of. It might make more sense for me to just host the current working DLL in the release zip.
I'll add ASI Loader 7.1.0 into the release zips from now on.
The only downside is the in-game Alias GUI isn't usable on the Deck or on controller, I'll see about fixing that. (:

Im encountering the same problem (crash) with your latest version. I also can't find the compatible ASI Loader in your release files. Am i doing anything wrong?

That was my bad, I forgot to add it in, sorry! I don't see that you're doing anything wrong, if you're using the ASI loader as a file named d3d11.dll in your AI folder, it should all just work:tm:

I'll be adding the latest ASI loader into the release versions from now on, I'm working on a big refactor of the mod behind the scenes, but it'll be in the next update (which will be released at https://github.com/aliasIsolation/aliasIsolation instead of here for the first time)

@nabel0
Copy link

nabel0 commented Aug 21, 2024

aliasIsolationCrashDump2.dmp
aliasIsolationCrashDump.dmp

It's odd because it works with Proton 9.0-2 on my laptop (with an NVIDIA GPU), latest ASI loader and Alias mod release...

Any chance when the game crashes you get a popup saying Alias Isolation crashed? That popup mentions a crash dump which would help me a ton in trying to work out what's causing this. If it gets generated it'll be in your .steam/steam/steamapps/compatdata/214490/pfx/drive_c/users/steamuser/Temp folder as a file called aliasIsolationCrashDump.dmp.

I'll need to test the game on my Deck again when I get home this evening

Here you go...Those crashdumps are generated with Proton 9.0-2 on a SteamDeck.
If i select Proton 8.5-0 everything is working fine

@RyanJGray
Copy link
Owner

Thanks so much for those, I'll take a look at them in Visual Studio now and see if I can work out what's crashing...

@RyanJGray
Copy link
Owner

RyanJGray commented Aug 21, 2024

Interesting, the crash seems to be happening in the game's code, it's intentionally crashing itself because it's out of memory (crash in CA::run_out_of_memory_crash_now_please), I'll dig into this some more.

@RyanJGray
Copy link
Owner

@nabel0 I can't seem to reproduce the crashes you're having on Proton 9 on the Deck, I'm running the latest Stable firmware on my Deck, and the game only seems to use about 4GiB of RAM at any given time from what the performance overlay says... hmm.

Any chance you could share some more details about how your Deck is set up? Are you running the game via Desktop mode with other apps open in the background (such as Discord)? Any more details would help massively so that I can try and reproduce it!

The only lead I have at the minute is that it seems like your Deck is running out of RAM with Proton 9 for some reason. The crashes you got are occurring in engine code due to the game running out of memory, unless the crashes tend to happen after some time playing the game instead of an immediate crash?

@nabel0
Copy link

nabel0 commented Aug 21, 2024

@nabel0 I can't seem to reproduce the crashes you're having on Proton 9 on the Deck, I'm running the latest Stable firmware on my Deck, and the game only seems to use about 4GiB of RAM at any given time from what the performance overlay says... hmm.

Any chance you could share some more details about how your Deck is set up? Are you running the game via Desktop mode with other apps open in the background (such as Discord)? Any more details would help massively so that I can try and reproduce it!

The only lead I have at the minute is that it seems like your Deck is running out of RAM with Proton 9 for some reason. The crashes you got are occurring in engine code due to the game running out of memory, unless the crashes tend to happen after some time playing the game instead of an immediate crash?

Thats strange. My deck also is on the latest stable firmware. Im running the game in gamemode. No other stuff is running. Game is crashing immediately if i launch it with anythig then proton 8. If I disable your mod I can launch the game with proton 9 without a problem.

@RyanJGray
Copy link
Owner

That is bizarre... could you run the game with PROTON_LOG=1 %command% in your launch options please?

It'll make a log file in your home folder on the Deck, if you could attach that here I can see if anything sticks out.

At a bit of a loss so far as to what in Alias would be leaking memory, let me get you a beta version of the update that I'm working on and we can see if it helps, I guess?

@nabel0
Copy link

nabel0 commented Aug 21, 2024

That is bizarre... could you run the game with PROTON_LOG=1 %command% in your launch options please?

It'll make a log file in your home folder on the Deck, if you could attach that here I can see if anything sticks out.

At a bit of a loss so far as to what in Alias would be leaking memory, let me get you a beta version of the update that I'm working on and we can see if it helps, I guess?

Sure thing. I'm happy to help to debug this. I'll upload the logs later. And I'm happy to help you with the beta version for sure.

@nabel0
Copy link

nabel0 commented Aug 22, 2024

Here you go @RyanJGray
I attatched the proton logfile for you.
Hope you can find something usefull.
steam-214490.zip

@RyanJGray
Copy link
Owner

Thanks a million! I'll take a look and see if anything sticks out

@RyanJGray
Copy link
Owner

RyanJGray commented Aug 22, 2024

@nabel0 did you by any chance extract the aliasIsolation.pdb debug symbols file to the game directory, too? If it exists, try deleting it. That file is not used during normal play and is more to help me go back and debug crashes like this

The crash is happening in Wine, it's trying to load Alias Isolation's debugging symbols file (not sure why, Windows never does that) and it's hitting a memory leak and eventually crashing your game due to it eating up all the memory on the Deck

@nabel0
Copy link

nabel0 commented Aug 22, 2024

@nabel0 did you by any chance extract the aliasIsolation.pdb debug symbols file to the game directory, too? If it exists, try deleting it. That file is not used during normal play and is more to help me go back and debug crashes like this

The crash is happening in Wine, it's trying to load Alias Isolation's debugging symbols file (not sure why, Windows never does that) and it's hitting a memory leak and eventually crashing your game due to it eating up all the memory on the Deck

BINGO.
That was indeed the problem. I deleted this file (aliasIsolation.pdb) and now it's working fine with latest proton.
I didn't know this file is not needed.
Thnx for your help <3

P.S:
If you still need a betatester for your new version I'm happy to help you in the future.

@RyanJGray
Copy link
Owner

Congrats! Glad to help.

What a bizarre issue in any case, why Wine even tries to load that file I have no clue. I may try and report that to the Wine or Proton devs.

I will definitely keep that in mind. Thanks!

Keep an eye on the upstream aliasIsolation repository for a pre-release build in the next week or two.

Mainly minor UI tweaks, code tidying and optimisations, and much smaller binary sizes (about 700KB instead of 2MB for the ASI). Very much behind the scenes stuff for the most part.

Possibly some shader improvements if I can work those out! :D

@nabel0
Copy link

nabel0 commented Aug 22, 2024

What a bizarre issue in any case, why Wine even tries to load that file I have no clue. I may try and report that to the Wine or Proton devs.

I think that's a good idea. I think I would do it too.

Keep an eye on the upstream aliasIsolation repository for a pre-release build in the next week or two.

You mean this one, right?
--> https://github.com/aliasIsolation/aliasIsolation

Mainly minor UI tweaks, code tidying and optimisations, and much smaller binary sizes (about 700KB instead of 2MB for the ASI). Very much behind the scenes stuff for the most part.
Possibly some shader improvements if I can work those out! :D

Do you think there is a way to make ‘aliasIsolation’ compatible with this mod here? --> https://github.com/Nibre/MotherVR
MotherVR is an awesome mod to play Alien Isolation completely in VR.
It would certainly be super impressive if the ‘aliasIsolation’ features were added here, or if ‘aliasIsolation’ were simply compatible with it.

@RyanJGray
Copy link
Owner

RyanJGray commented Aug 22, 2024

Will look into reporting it as a bug!

Yep, that repository is the right one. I managed to get in touch with the original author a year or so ago, and they granted me maintainer/collaborator permissions on the original repository.

Moving releases and my changes there would make the updated version get more visibility, I feel.

I actually picked up a used Valve Index recently to experiment with VR, I can certainly try to get Alias working with MotherVR!

I understand Alias may have issues with the rendering in VR mode, but I have never confirmed it myself. Is the aliasing particularly bad in VR mode?

@RyanJGray
Copy link
Owner

MotherVR not being open-source doesn't help things, which is a real shame, but I will try to figure out what the issues are.

Not ideal having to essentially reverse-engineer another mod to figure out how to make Alias compatible, but it's their mod and code.

One thing I can do is remove the piece of code in Alias, which forcefully disables the ancient Oculus VR code in the game's engine, which would at least let us see what the MotherVR experience is like?

I can send you a beta build if you'd like to try it out

@nabel0
Copy link

nabel0 commented Aug 22, 2024

Is the aliasing particularly bad in VR mode?

It could certainly be better. In 2D it also makes a big difference whether I play Alien Isolation without ‘aliasIsolation’ or not.
So I think it could also make a certain difference to the AA in 3D.

One thing I can do is remove the piece of code in Alias, which forcefully disables the ancient Oculus VR code in the game's engine, which would at least let us see what the MotherVR experience is like?
I can send you a beta build if you'd like to try it out

I think the ‘MotherVR’ mod patches a lot more than just the ‘old’ Oculus VR code.
Do I understand you correctly that you just want to quickly activate the Oculus VR code in ‘aliasIsolation’ to test whether the AA makes a difference to the ‘vanilla’ MotherVR and whether it's even worth continuing to work on it?

I'm definitely up for any outrage :)
I like testing stuff for VR.

@nabel0
Copy link

nabel0 commented Aug 22, 2024

I actually picked up a used Valve Index recently to experiment with VR, I can certainly try to get Alias working with MotherVR!

Please do yourself a favour and try the game with the ‘MotherVR’ mod if you haven't already.
I always use an XBOX controller, but it probably works with the VR controllers as well.
The game is breathtaking and scary in VR. Simply awesome :D

@RyanJGray
Copy link
Owner

I actually picked up a used Valve Index recently to experiment with VR, I can certainly try to get Alias working with MotherVR!

Please do yourself a favour and try the game with the ‘MotherVR’ mod if you haven't already. Preferably with a game controller. It is not recommended to play with the VR controllers. The game is breathtaking and frightening in VR. Simply awesome :D

That's a great idea, always up for a spooky time! That's my Sunday night planning sorted. Always wanted to try the game in VR.

I've played Isolation so much that the game rarely spooks me.
I kind of know how the AI works... a bit too well from my work picking the game apart, but it still throws something new at me from time to time, which scares the living daylights out of me!
In VR I think I will be a lot less confident with the AI when I'm actually fully immersed in the game :D

Also a good idea to play with the mod and have some fun, before then spending hours upon hours trying to pick it apart and understand how it works!

@RyanJGray
Copy link
Owner

Also if you use Discord or some other comms platform other than GitHub issues, could I add you on there? Bit faster than filling up this issue with messages lol

@nabel0
Copy link

nabel0 commented Aug 22, 2024

Also if you use Discord or some other comms platform other than GitHub issues, could I add you on there? Bit faster than filling up this issue with messages lol

That's a very good idea :)
I am a heavy Discord user. Is there any server where I can find you?

@RyanJGray
Copy link
Owner

Me too!

Hmm, if you're in the OpenCAGE Discord I'm in there under my GitHub username

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants