Commit Graph

1848 Commits

Author SHA1 Message Date
edb6d3907b Merge pull request #11472 from frenzibyte/explicit-beatmap-markers
Add explicit content markers to beatmap panels and overlay
2021-01-17 21:44:10 +09:00
8a0b975d71 Fix deadlock scenario when calculating fallback difficulty
The previous code would run a calcaulation for the beatmap's own ruleset
if the current one failed. While this does make sense, with the current
way we use this component (and the implementation flow) it is quite unsafe.

The to the call on `.Result` in the `catch` block, this would 100%
deadlock due to the thread concurrency of the `ThreadedTaskScheduler`
being 1. Even if the nested run could be run inline (it should be), the
task scheduler won't even get to the point of checking whether this is
feasible due to it being saturated by the already running task.

I'm not sure if we still need this fallback lookup logic. After removing
it, it's feasible that 0 stars will be returned during the scenario that
previously caused a deadlock, but I don't necessarily think this is
incorrect. There may be another reason for this needing to exist which
I'm not aware of (diffcalc?) but if that's the case we may want to move
the try-catch handling to the point of usage.

To reproduce the deadlock scenario with 100% success (the repro
instructions in the linked issue aren't that simple and require some
patience and good timing), the main portion of the lookup can be changed
to randomly trigger a nested lookup:

```
if (RNG.NextSingle() > 0.5f)
    return GetAsync(new
DifficultyCacheLookup(key.Beatmap, key.Beatmap.Ruleset,
key.OrderedMods)).Result;
else
    return new StarDifficulty(attributes);
```

After switching beatmap once or twice, pausing debug and viewing the
state of threads should show exactly what is going on.
2021-01-14 18:25:34 +09:00
e8daea91d2 Add online beatmap "explicit content" property 2021-01-13 12:13:14 +03:00
9a22df2b88 Fix BPM multiplier not working in all cases 2021-01-12 17:50:22 +09:00
3c3e860dbc Move ControlPointInfo copying to base Beatmap.Clone method (and remove setter) 2021-01-07 23:52:04 +09:00
00dc98e3ab Make legacy control point's BpmMultiplier setter private again 2021-01-07 19:06:52 +09:00
69ac22dd7f Fix incorrectly copy pasted xmldoc 2021-01-07 19:06:10 +09:00
31a6e9b860 Remove unused using 2021-01-05 14:24:49 +09:00
afab35a31a Fix missing copy implementation in LegacySampleControlPiont 2021-01-05 13:41:31 +09:00
caa88c6100 Use CreateCopy instead of Clone interface
I was going for conformity by using the IClonable interface, but it
doesn't look like we use it anywhere else in the project.
2021-01-05 13:13:52 +09:00
ba4e411422 Clone and copy ControlPointInfo when retrieving a playable beatmap 2021-01-04 16:37:07 +09:00
d7279dab40 Merge pull request #11226 from peppy/fix-legacy-skin-texture-loader-store
Fix incorrectly provided texture loader store to skins
2020-12-23 16:41:01 +09:00
807c1ecd1f Refactor recommendation iteration code to read better 2020-12-22 14:57:32 +09:00
8cc2ed3fae Move from OsuGameBase to OsuGame
Also moves to a more suitable namespace.
2020-12-22 14:28:27 +09:00
85518b4d99 Enforce non-null for BeatmapManager WorkingBeatmap resources 2020-12-22 12:06:10 +09:00
a97a2b2a66 Add nullability to BeatmapManager's GameHost reference 2020-12-22 12:03:25 +09:00
10c2745682 Add region specifications around implicit interface implementations 2020-12-22 12:01:09 +09:00
a5bcf1dc20 Expose resources to skin via interface (and share common pieces with beatmap) 2020-12-21 15:18:52 +09:00
0ffbe12fcc Expose resources to beatmaps in a saner way 2020-12-21 14:22:34 +09:00
7c804be4d3 Rename textureStore to make its purpose more clear 2020-12-21 14:06:33 +09:00
a35060ea7a Add a simple cache-busting query string to online.db retrieval
As we are finally pushing updates for this database, this adds a minimum
level of guarantee that a client will request a new version (without
having to worry about multiple levels of server-side caching).
2020-12-11 17:56:02 +09:00
2150cf1c52 Rename parameters 2020-12-02 10:55:48 +09:00
5760e1c1fc Make HitSampleInfo immutable 2020-12-01 15:37:51 +09:00
25af091409 Fix storyboard animations of very old beatmaps playing too slow
Closes https://github.com/ppy/osu/issues/10772.
2020-11-12 17:03:43 +09:00
6cc0bf17a9 Add explicit lock object and some xmldoc for clarity 2020-11-10 14:31:52 +09:00
66ea1572c7 Fix unsafe list manipulation in BeatmapDifficultyCache 2020-11-10 01:10:00 +09:00
a2877fb00a Merge pull request #10730 from peppy/fix-patcher-no-object-crash
Fix legacy patcher crash on no objects present
2020-11-09 18:51:00 +09:00
6d4bb4316c Fix difficulty retrieval for online-sourced beatmaps 2020-11-08 00:12:25 +01:00
c5b6908e71 Always write [HitObjects] to file
I think this is expected. If not, there's an alternative solution.
2020-11-08 00:18:27 +09:00
c1c3d37720 Remove non-null assert 2020-11-06 17:24:28 +09:00
f51cb0dd14 Add ruleset fallback logic into cache lookup class 2020-11-06 16:58:53 +09:00
c5b172d0dd Remove synchronous lookup path from BeatmapDifficultyCache 2020-11-06 14:53:15 +09:00
b69ada64e8 Update BeatmapDifficultyCache to use base implementation logic 2020-11-06 14:31:21 +09:00
517a656899 Move StarDifficulty to own file 2020-11-06 13:51:25 +09:00
74ca2faa31 Remove unused using 2020-11-06 13:48:06 +09:00
0103b12575 Add basic base class to begin to standardise function across caching components 2020-11-06 13:26:39 +09:00
5113d4af8f Rename BeatmapDifficultyManager to BeatmapDifficultyCache 2020-11-06 13:14:29 +09:00
ab9e0aac58 Merge pull request #10258 from Game4all/results-dynamic-pp-calc 2020-11-02 15:40:55 +09:00
73b290aca3 Merge branch 'master' into results-dynamic-pp-calc 2020-11-02 14:47:33 +09:00
3adf451e82 Handle changes via SamplePoints list for simplicity 2020-11-02 14:40:40 +09:00
3090b6ccb5 Resolve CA2249 inspections
"Use `string.Contains` instead of `string.IndexOf` to improve
readability"
2020-11-01 18:54:44 +01:00
ca5de22ca5 Resolve CA1834 inspection
"Use `StringBuilder.Append(char)` instead of
`StringBuilder.Append(string)` when the input is a constant unit string"
2020-11-01 18:50:13 +01:00
89797d7a57 Merge pull request #9786 from Wieku/storyboard-skin-sprites
Allow storyboard elements to load textures from skins
2020-10-23 17:16:55 +09:00
9753dab93b Remove IOnlineComponent and change existing components to use bindable flow 2020-10-22 14:19:12 +09:00
e2552d4c36 Merge branch 'master' into storyboard-skin-sprites 2020-10-20 23:01:54 +02:00
cdd56ece87 Read UseSkinSprites when decoding storyboards 2020-10-20 22:49:56 +02:00
bd4e0e1a60 Merge branch 'master' into epilepsy-warning 2020-10-20 17:43:37 +09:00
13060b8575 Merge branch 'master' into beatmap-carousel-less-diffcalc-stutter 2020-10-20 14:26:16 +09:00
fd4bab85cf Merge branch 'master' into epilepsy-warning 2020-10-20 01:06:46 +02:00
1238e6c30f Add flag value to database
Unfortunately required, as loadBeatmaps() refreshes the decoded beatmap
with the database-stored values, which can end up overwriting the
decoded ones.
2020-10-20 00:46:08 +02:00