-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
"Watch Replay" button after fail turns green before it's ready #28497
Comments
I can't reproduce either example. |
The issue in the original post happens every single time I export a failed replay. I do have 100k+ maps and probably over 20k local scores though |
Related: #30797
Database file: https://drive.google.com/file/d/10lLK8tYiqSpsAjkt_pzsLQ0g-bVJ7fhr/view?usp=sharing Upon investigating with 100k+ diffs or a 200+MB database, the osu/osu.Game/Scoring/ScoreManager.cs Lines 87 to 107 in d3c66e2
Unsure how the first realm osu/osu.Game/Screens/Play/SaveFailedScoreButton.cs Lines 66 to 70 in f282152
The following hack fixes the issue, but it freezes everything for ~5 seconds: diff --git a/osu.Game/Scoring/ScoreManager.cs b/osu.Game/Scoring/ScoreManager.cs
index e3601fe91e..2ce36bcc96 100644
--- a/osu.Game/Scoring/ScoreManager.cs
+++ b/osu.Game/Scoring/ScoreManager.cs
@@ -81,7 +81,11 @@ public override bool PauseImports
/// <returns>The first result for the provided query, or null if no results were found.</returns>
public ScoreInfo? Query(Expression<Func<ScoreInfo, bool>> query)
{
- return Realm.Run(r => r.All<ScoreInfo>().FirstOrDefault(query)?.Detach());
+ return Realm.Run(r =>
+ {
+ r.Refresh();
+ return r.All<ScoreInfo>().FirstOrDefault(query)?.Detach();
+ });
}
private ScoreInfo? getDatabasedScoreInfo(IScoreInfo originalScoreInfo)
|
Seems like something is very wrong if a realm refresh is taking 5 seconds. |
That is because this call is happening on a worker thread, which appears to be instantaneously updated with the new Realm state. It is only the update thread that is stuck behind, and which triggering the refresh on makes the update thread stuck for a few seconds. Been digging through this one after repro'ing with joehu's database, but could not get anywhere unfortunately. Thought maybe if we're doing anything odd then it would be registered in the global statistics, but those are in a completely sane state throughout the import process. That being said, popping up the global statistics overlay and viewing logs (which enables "Finalizing object" logs) shows something odd happening after the score import: CleanShot.2024-11-24.at.03.07.29.mp4There is a chunk of object finalisation happening before the update I don't know how helpful this is going to be, but I'm leaving it out anyway. I'm not entirely sure what the implications are for when a the chunk of finalization happening
|
Type
Game behaviour
Bug description
The button turns green, but even if you click on it the replay won't start playing. This happens after failing a map and trying to watch the replay.
Screenshots or videos
2024-06-16.13-39-57.mp4
Version
2024.521.2
Logs
compressed-logs.zip
The text was updated successfully, but these errors were encountered: