SFP icon indicating copy to clipboard operation
SFP copied to clipboard

SFP fails to reinject when Steam updates

Open PhantomGamers opened this issue 2 years ago • 7 comments

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 avatar Jun 11 '23 20:06 PhantomGamers

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.

PhantomGamers avatar Jun 20 '23 05:06 PhantomGamers

@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.

SaiyajinK avatar Jul 21 '23 11:07 SaiyajinK

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

I thought I fixed that but I guess not

PhantomGamers avatar Jul 21 '23 11:07 PhantomGamers

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 ! 👍🏻

SaiyajinK avatar Jul 21 '23 12:07 SaiyajinK

Nothing changed regarding this in 0.0.50

PhantomGamers avatar Jul 21 '23 12:07 PhantomGamers

@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.

Bread-Ch4n avatar Feb 24 '24 13:02 Bread-Ch4n

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.

PhantomGamers avatar Feb 25 '24 06:02 PhantomGamers