PhantomGamers / SFP

This utility is designed to allow you to apply skins to the modern Steam client
MIT License
559 stars 10 forks source link

SFP fails to reinject when Steam updates #117

Open PhantomGamers opened 1 year ago

PhantomGamers commented 1 year ago

This issue seems to be reproducible 100% of the time, however it is hard to debug as it only seems to occur when a steam update is applied and I don't know of a way to reproduce the restart that happens on update.

The last time this happened, SFP failed to detect the launch arguments.

https://github.com/PhantomGamers/SFP/blob/b13ac098b7ed57acf7f517a48ee680bb9650b304/SFP/Models/Steam.cs#L361-L366

I think either SFP tries to get the command line of the process too soon after it starts, or during this update mechanism the process opens and restarts again too quickly so by the time SFP checks the arguments the process is no longer running.

PhantomGamers commented 1 year ago

One possible fix to this could be that if TryInject is already running when the steam started event is triggered, the existing TryInject thread is terminated and it is reran from the steam started event.

SaiyajinK commented 1 year ago

@PhantomGamers are we talking about the same problem?

https://github.com/PhantomGamers/SFP/assets/105972098/8c14ff7b-7d2b-4ff2-af4d-74ae2f134bee

Since 0.0.50 I have this. and if I remove the arguments (-dev) everything works fine again except that I no longer have access to the dev.

PhantomGamers commented 1 year ago

No, that's a different issue. You're missing a space before -dev

I thought I fixed that but I guess not

SaiyajinK commented 1 year ago

I always put without spaces and it always worked like that! it's weird isn't it? but whatever, I included a space and everything works again, dev mode too ^^" thanks ! 👍🏻

PhantomGamers commented 1 year ago

Nothing changed regarding this in 0.0.50

V0IDL355 commented 7 months ago

@PhantomGamers are we talking about the same problem?

sfp_faillaucnharguments.mp4 Since 0.0.50 I have this. and if I remove the arguments (-dev) everything works fine again except that I no longer have access to the dev.

Steam prob was failing to launch or was crashing.

PhantomGamers commented 7 months ago

I've implemented some fixes for this a while ago anyway so it should work more consistently anyway.

Only reason I'm keeping this open, which I should mention here for documentation purposes, is that there seems to be some issue when the PC resumes from sleep mode that prevents SFP from reinjecting as well, which is a similar issue, but it's hard to reproduce as it doesn't happen consistently. Seems to mostly only happen when the PC is asleep for an extended period of time.