1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-23 03:27:26 +08:00
Commit Graph

3957 Commits

Author SHA1 Message Date
Bartłomiej Dach
92ba770314
Fix missing wireframe behind percent sign on accuracy counter 2024-01-09 14:00:58 +01:00
Bartłomiej Dach
77bf6e3244
Fix missing wireframe behind "x" sign on combo counter display 2024-01-09 13:59:27 +01:00
Dean Herbert
4110adc4c0
Fix missing wireframe on argon combo counter 2024-01-09 20:16:28 +09:00
Dean Herbert
765d41faa9
Change second occurrence of debug.assert with early return for fallback safety 2024-01-09 14:07:48 +09:00
Dean Herbert
3f5899dae0
Fix incorrect implementation of wireframe digits 2024-01-09 14:07:48 +09:00
Dean Herbert
16ea7f9b77
Avoid completely unnecessary string allocations in ArgonCounterTextComponent 2024-01-07 14:31:22 +09:00
Dean Herbert
b809d4c068
Remove delegate overhead from argon health display's animation updates 2024-01-07 14:31:22 +09:00
Dean Herbert
91bb3f6c57
Cache argon character glyph lookups to reduce string allocations 2024-01-05 01:24:00 +09:00
Dean Herbert
705f25e4b9
Make ScoreProcessor.Rank read-only 2024-01-04 17:13:24 +09:00
Dean Herbert
0bbc27e380
Add a gameplay configuration flag to disable fail animation 2024-01-04 17:13:24 +09:00
Bartłomiej Dach
04147eb689
Fix lack of correct default value spec 2024-01-03 11:46:28 +01:00
Bartłomiej Dach
e686a6a1dd
Fix player submission test intermittent failures due to audio playback discrepancy logic kicking in
See https://github.com/ppy/osu/actions/runs/7384457927/job/20087439457#step:5:133.
2024-01-03 09:17:01 +01:00
Bartłomiej Dach
3c5e9ac9a9
Fix possible double score submission when auto-retrying via perfect mod
Closes https://github.com/ppy/osu/issues/26035.

`submitOnFailOrQuit()`, as the name suggests, can be called both when
the player has failed, or when the player screen is being exited from.
Notably, when perfect mod with auto-retry is active, the two happen
almost simultaneously.

This double call exposes a data race in `submitScore()` concerning the
handling of `scoreSubmissionSource`. The race could be experimentally
confirmed by applying the following patch:

diff --git a/osu.Game/Screens/Play/SubmittingPlayer.cs b/osu.Game/Screens/Play/SubmittingPlayer.cs
index 83adf1f960..76dd29bbdb 100644
--- a/osu.Game/Screens/Play/SubmittingPlayer.cs
+++ b/osu.Game/Screens/Play/SubmittingPlayer.cs
@@ -228,6 +228,7 @@ private Task submitScore(Score score)
                 return Task.CompletedTask;
             }

+            Logger.Log($"{nameof(scoreSubmissionSource)} is {(scoreSubmissionSource == null ? "null" : "not null")}");
             if (scoreSubmissionSource != null)
                 return scoreSubmissionSource.Task;

@@ -237,6 +238,7 @@ private Task submitScore(Score score)

             Logger.Log($"Beginning score submission (token:{token.Value})...");

+            Logger.Log($"creating new {nameof(scoreSubmissionSource)}");
             scoreSubmissionSource = new TaskCompletionSource<bool>();
             var request = CreateSubmissionRequest(score, token.Value);

which would result in the following log output:

	[runtime] 2024-01-02 09:54:13 [verbose]: scoreSubmissionSource is null
	[runtime] 2024-01-02 09:54:13 [verbose]: scoreSubmissionSource is null
	[runtime] 2024-01-02 09:54:13 [verbose]: Beginning score submission (token:36780)...
	[runtime] 2024-01-02 09:54:13 [verbose]: creating new scoreSubmissionSource
	[runtime] 2024-01-02 09:54:13 [verbose]: Beginning score submission (token:36780)...
	[runtime] 2024-01-02 09:54:13 [verbose]: creating new scoreSubmissionSource
	[network] 2024-01-02 09:54:13 [verbose]: Performing request osu.Game.Online.Solo.SubmitSoloScoreRequest
	[network] 2024-01-02 09:54:14 [verbose]: Request to https://dev.ppy.sh/api/v2/beatmaps/869310/solo/scores/36780 successfully completed!
	[network] 2024-01-02 09:54:14 [verbose]: SubmitSoloScoreRequest finished with response size of 639 bytes
	[network] 2024-01-02 09:54:14 [verbose]: Performing request osu.Game.Online.Solo.SubmitSoloScoreRequest
	[runtime] 2024-01-02 09:54:14 [verbose]: Score submission completed! (token:36780 id:20247)
	[network] 2024-01-02 09:54:14 [verbose]: Request to https://dev.ppy.sh/api/v2/beatmaps/869310/solo/scores/36780 successfully completed!
	[network] 2024-01-02 09:54:14 [verbose]: SubmitSoloScoreRequest finished with response size of 639 bytes
	[runtime] 2024-01-02 09:54:14 [error]: An unhandled error has occurred.
	[runtime] 2024-01-02 09:54:14 [error]: System.InvalidOperationException: An attempt was made to transition a task to a final state when it had already completed.
	[runtime] 2024-01-02 09:54:14 [error]: at osu.Game.Screens.Play.SubmittingPlayer.<>c__DisplayClass30_0.<submitScore>b__0(MultiplayerScore s) in /home/dachb/Documents/opensource/osu/osu.Game/Screens/Play/SubmittingPlayer.cs:line 250

The intention of the submission logic was to only ever create one
`scoreSubmissionSource`, and then reuse this one if a redundant
submission request was made. However, because of the temporal proximity
of fail and quit in this particular case, combined with the fact that
the calls to `submitScore()` are taking place on TPL threads, means that
there is a read-write data race on `scoreSubmissionSource`, wherein the
source can be actually created twice.

This leads to two concurrent score submission requests, which, upon
completion, attempt to transition only _the second_
`scoreSubmissionSource` to a final state (this is because the API
success/failure request callbacks capture `this`, i.e. the entire
`SubmittingPlayer` instance, rather than the `scoreSubmissionSource`
reference specifically).

To fix, ensure correct synchronisation on the read-write critical
section, which should prevent the `scoreSubmissionSource` from being
created multiple times.
2024-01-02 10:55:52 +01:00
Bartłomiej Dach
6d124513e7
Fix test failures due to player bailing early after failing to load beatmap 2023-12-28 14:15:15 +01:00
Bartłomiej Dach
619b0cc69b
Fix code quality inspection 2023-12-28 14:12:28 +01:00
Bartłomiej Dach
24a80da83f
Merge branch 'master' into universal-offset-from-session-plays 2023-12-28 14:07:46 +01:00
Dean Herbert
e1a376c0a7
Fix using "Back" binding at spectator fail screen not working 2023-12-28 20:14:18 +09:00
Dean Herbert
b7f3c83514
Expose the ability to update global offset from the player loader screen 2023-12-28 20:01:34 +09:00
Bartłomiej Dach
1b7af989ec
Migrate BeatmapOffsetControl to use session static directly 2023-12-27 19:19:27 +01:00
Bartłomiej Dach
d4423d4933
Store last set score to a SessionStatic 2023-12-27 19:13:42 +01:00
Dean Herbert
d70fddb6fd
Fix elapsed time being counted twice on first frame 2023-12-27 00:11:22 +09:00
Dean Herbert
225528d519
Bail from score submission if audio playback rate is too far from reality
Closes https://github.com/ppy/osu/issues/23149.
2023-12-26 19:20:58 +09:00
Dean Herbert
686b2a4394
Disable positional interaction for now 2023-12-24 03:00:51 +09:00
Dean Herbert
72bec527fd
Add conditions to match stable offset adjust limitations 2023-12-24 02:36:27 +09:00
Dean Herbert
92b490f2e7
Don't bother with alt support for now 2023-12-24 01:59:48 +09:00
Dean Herbert
6f11885d4b
Add control to allow changing offset from gameplay 2023-12-23 20:51:30 +09:00
Dean Herbert
7e9522a722
Allow external use of offset text explanation 2023-12-23 20:46:12 +09:00
Dean Herbert
27a9dcc5a1
Add basic hotkey offset adjust support (via existing offset control) 2023-12-23 19:55:05 +09:00
Bartłomiej Dach
81bbdccee7
Rename ScoreInfo.{ -> Client}Version 2023-12-21 12:56:43 +01:00
Dean Herbert
a4baa0a716
Add versioning of local scores
For any potential future usage
2023-12-21 18:37:15 +09:00
rushiiMachine
ebbc8333e8
Prevent ExportReplay being spammed on fail by being held down
This was already handled in ReplayDownloadButton (98efff0bd6/osu.Game/Screens/Ranking/ReplayDownloadButton.cs (L114-L115)) but seemingly missed for SaveFailedScoreButton
2023-12-20 08:41:16 -08:00
Dan Balasescu
d7aca2f641
Add IApplicableHealthProcessor 2023-12-17 19:27:03 +09:00
Dean Herbert
27296c59de
Show back button when spectating
Avoids getting stuck at some screens.
It's a bit ugly having the back button visible like this,
but is the best approach we have for now.
2023-12-15 11:26:17 +09:00
Dean Herbert
76c4931f3a
Merge pull request #25673 from frenzibyte/fix-argon-initial-display
Fix `ArgonHealthDisplay` not displaying miss correctly during initial transition
2023-12-13 22:16:34 +09:00
Dean Herbert
3131d37621
Clear transformations with more fire 2023-12-13 17:00:21 +09:00
Dean Herbert
f2c6c348be
Fix HitError Clear methods not correctly returning pooled drawables 2023-12-13 16:13:23 +09:00
Dean Herbert
110749205d
Cache GameplayClockContainer to allow usage of OnSeek 2023-12-13 16:13:08 +09:00
Dean Herbert
eb30a603d9
Fix typo in argument name 2023-12-13 15:01:36 +09:00
Bartłomiej Dach
f69a5b44cc
Merge branch 'master' into fix-argon-initial-display 2023-12-06 09:30:28 +01:00
Salman Ahmed
20fd458fac Perserve miss animation when followed by a hit at same frame 2023-12-05 21:59:28 +03:00
Salman Ahmed
9496cdf42b Add explanatory note for scheduling 2023-12-05 21:59:28 +03:00
Salman Ahmed
927cfe4257 Fix health processor event leaks 2023-12-05 21:59:28 +03:00
Salman Ahmed
629e64d50a Fix ArgonHealthDisplay not displaying miss correctly during initial transition 2023-12-04 23:55:31 +03:00
Salman Ahmed
4d82a55594 Remove method for being unused 2023-12-04 23:24:28 +03:00
Salman Ahmed
5723715ea0 Fix ArgonHealthDisplay sometimes behaving weirdly on miss judgements 2023-12-04 23:24:28 +03:00
Dean Herbert
a4be28a2ae
Don't show buttons on fail overlay when player interaction is disabled 2023-11-27 12:25:24 +09:00
Bartłomiej Dach
98ab9853ce
Merge branch 'master' into show-spectator-fail-2 2023-11-27 12:24:59 +09:00
Bartłomiej Dach
19639de299
Merge branch 'master' into fix-spectator-quit-2 2023-11-27 11:36:10 +09:00
Dean Herbert
7ceb49fbc0
Add extra test coverage and handle case where still at loading screen 2023-11-24 15:05:39 +09:00
Dean Herbert
d3a55d83c0
Schedule FailScore inside onFail instead of onFailComplete 2023-11-24 14:44:57 +09:00