-
-
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
Beatmaps hidden difficulties show 0 stars #10458
Comments
I asked about this on the discord server but got no response some beatmapset have current difficulties, but mostly 0* database.log |
diff --git a/osu.Game/BackgroundDataStoreProcessor.cs b/osu.Game/BackgroundDataStoreProcessor.cs
index 90e55dea6d..39abdb0936 100644
--- a/osu.Game/BackgroundDataStoreProcessor.cs
+++ b/osu.Game/BackgroundDataStoreProcessor.cs
@@ -134,18 +134,16 @@ private void processBeatmapSetsWithMissingMetrics()
// of other possible ways), but for now avoid queueing if the user isn't logged in at startup.
if (api.IsLoggedIn)
{
- foreach (var b in r.All<BeatmapInfo>().Where(b => b.StarRating < 0 || (b.OnlineID > 0 && b.LastOnlineUpdate == null)))
+ foreach (var b in r.All<BeatmapInfo>().Where(b => (b.StarRating < 0 || (b.OnlineID > 0 && b.LastOnlineUpdate == null)) && b.BeatmapSet != null))
{
- Debug.Assert(b.BeatmapSet != null);
- beatmapSetIds.Add(b.BeatmapSet.ID);
+ beatmapSetIds.Add(b.BeatmapSet!.ID);
}
}
else
{
- foreach (var b in r.All<BeatmapInfo>().Where(b => b.StarRating < 0))
+ foreach (var b in r.All<BeatmapInfo>().Where(b => b.StarRating < 0 && b.BeatmapSet != null))
{
- Debug.Assert(b.BeatmapSet != null);
- beatmapSetIds.Add(b.BeatmapSet.ID);
+ beatmapSetIds.Add(b.BeatmapSet!.ID);
}
}
});
|
@cdwcgt you have a single beatmap without a set in your local database. This is not supposed to happen, hence the assertions in the code you have patched above. Since you are capable of writing code, I cannot discount the possibility of this being a data anomaly that you yourself have called into being. Thus, unless you can replicate a way to create a beatmap without a set via the editor on current master, I don't think we want the patch above until this is proven to be affecting a bigger number of users. |
@bdach Weirdly, I've managed to repro the detached-beatmap-from-set thing repro multiple times from a stable import. I haven't had a chance yet to figure out how it happens... but it might be worth guarding defensively against.. I'm not sure if it can help with investigation, but it's also repro on my current database (run with debug and it should hit an assert on startup). |
I wouldn't really expect a stable import to trigger this either, but it may be worth looking into. That said I'm not sure a post-facto broken database is going to help any. Logs from the stable import might. Or a dump of the actual data being imported from stable. I guess we could add the guard. But I'm loath to do it because things will silently corrupt anyways but in a slightly different way. There's a whole bunch of places that may also blow up on a beatmap with no set. |
Agree, but it looks like the aforementioned case is going to be breaking all processing on a hidden background thread. Seems like one we should consider fixing.. |
Adding a sneaky fix for this one in peppy@0611a1d. |
bit of a weird place to apply that in but sure. |
Dunno, was touching the same class and I kinda want to make this fix happen without much attention for now 😅 |
Describe the bug: (As title) Probably an issue with the dynamic calculation?
Screenshots or videos showing encountered issue:
osu!lazer version: 2020.1009.0
The text was updated successfully, but these errors were encountered: