Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFP fails to reinject when Steam updates #117

Open
PhantomGamers opened this issue Jun 11, 2023 · 7 comments
Open

SFP fails to reinject when Steam updates #117

PhantomGamers opened this issue Jun 11, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@PhantomGamers
Copy link
Owner

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.

SFP/SFP/Models/Steam.cs

Lines 361 to 366 in b13ac09

var cmdLine = GetCommandLine();
if (!cmdLine.Any())
{
Log.Logger.Error("Arguments are empty, cannot check arguments");
return false;
}

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 PhantomGamers added the bug Something isn't working label Jun 11, 2023
@PhantomGamers
Copy link
Owner Author

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
Copy link

SaiyajinK commented Jul 21, 2023

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

@PhantomGamers
Copy link
Owner Author

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

I thought I fixed that but I guess not

@SaiyajinK
Copy link

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
Copy link
Owner Author

Nothing changed regarding this in 0.0.50

@Bread-Ch4n
Copy link

@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
Copy link
Owner Author

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.

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

No branches or pull requests

3 participants