-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
SubmittingPlayer
no longer guarantees calling EndPlaying
before exit
#22220
Comments
Keeping it simple, my assumptions would be: As soon as exiting the player, Internally, So I'm not sure what you mean by "allowing out-of-order", because that doesn't make much sense. Is the main issue here not that |
Server flows (replay upload less so, score processing notification delivery more so) are relying on score submission to complete before notifying If there was a higher-level component coordinating/queueing both submission and notifying spectator in the background, then I could see this working. But I'm not sure we want to go there. |
For screen navigation tests, they rely on a full game instance which means running on Generally the logic in |
I think this needs to be simplified and handled server side. We can't have the client responsible for order of delivery of events to the server. Even if the client sends in the correct order, they could arrive out of order due to different routes or packet loss. I'd need to go through exactly what is happening currently to assess how wrong it is, but ultimately we should either aim for
|
I'll just note that as far as I'm aware, the client will currently synchronously wait for a response to the submission request before proceeding to call
This would be nice, but I don't know how that plays with the responsibilities of |
It should really be "as soon as gameplay is finished". I can't remember why it doesn't already do that. |
That's because it has changed since #21753, with clarification in the PR's description along with #22220 (comment). |
That PR didn't change that, it just made it so that the calls to the That being said, there is something I previously wanted to mention in this issue that I forgot about, and that is this:
Can you expand on this a bit more? I had similar concerns initially regarding the ordering, but I'm not sure it's strictly required. Can you point to the code which unmaps the submission token? I implemented the replay uploader at least with the intent that it would wait for the score ID to exist by periodically querying the tokens table, but I don't remember any unmapping going on. |
I'm referring to these two calls specifically. Granted, as you say, the score uploader does not need the token to be unmappable to a score ID at that particular instant, as it will indeed poll for the score ID for up to 30 seconds. This was also mentioned in #21753; the ordering guarantee is a nice addition there, but not a necessary one. The |
Type
Crash to desktop
Bug description
Coming from recurring test failures. Since #21753, gameplay screens no longer guarantee calling
EndPlaying
before exit, as it now happens under a fired-and-forgotten async task. This means that if submission took long and a user decided to play again, then the user might crash to desktop due to gameplay callingBeginPlaying
whenEndPlaying
hasn't been called yet pending previous score submission.I plan to push a workaround for tests, but that aside, I'm opening this issue thread (in addition to discord) to further discuss this matter. While it's rare to encounter this sort of edge case, it's best to leave an issue thread open for tracking at least. We may want to consider allowing out-of-order
BeginPlaying
/EndPlaying
calls, either by chaining them at aSpectatorClient
level, or let the server handle it properly.cc/ @ppy/area-client
Screenshots or videos
No response
Version
8f70424
Logs
The text was updated successfully, but these errors were encountered: