Commit Graph

36201 Commits

Author SHA1 Message Date
3c1a86d11d Trim braces for consistency 2021-01-15 22:04:45 +01:00
eb40d3a5ba Merge pull request #11501 from peppy/fix-spinner-test-not-playing-samples 2021-01-15 20:25:57 +01:00
27db01b533 Merge branch 'master' into fix-spinner-test-not-playing-samples 2021-01-15 19:52:54 +01:00
778efc5108 Merge pull request #11498 from peppy/fix-editor-timeline-scroll-snapping
Fix editor timeline not snapping on non-precise wheel scroll
2021-01-15 18:16:04 +09:00
14b3323682 Use OnComplete instead of Finally to avoid potentially stopping on aborted transforms 2021-01-15 17:18:15 +09:00
311f8b7017 Only restart spinning sample if it was not already playing 2021-01-15 17:17:51 +09:00
767c76921f Adjust transition time of spinner sound 2021-01-15 17:17:28 +09:00
8a6857f151 Add support for playing a SkinnableSample without restarting it 2021-01-15 17:16:12 +09:00
6adb6b6700 Fix spinner tests not playing spinning sound due to empty hitsamples 2021-01-15 17:13:52 +09:00
88a27124c0 Make long spinner test longer and fix step name 2021-01-15 17:13:27 +09:00
ed78be825f Fix editor timeline not snapping on non-precise wheel scroll
For wheel input with precision, we still prefer exact tracking for now.
May change this in the future based on feedback from mappers, but it
makes little sense to do non-snapped scrolling when input is coming from
a non-precise source.
2021-01-15 15:47:42 +09:00
c3049f431a Merge branch 'master' into net5.0 2021-01-15 15:23:41 +09:00
2b578e97e5 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-15 15:19:12 +09:00
ede5abdba4 Fix unstable multiplayer room ordering when selection is made 2021-01-15 15:19:12 +09:00
b8c85ef017 Revert polling changes to fix participant list display
It turns out this polling was necessary to get extra data that isn't
included in the main listing request. It was removed deemed useless, and
in order to fix the order of rooms changing when selecting a room.
Weirdly, I can't reproduce this happening any more, and on close
inspection of the code can't see how it could happen in the first place.

For now, let's revert this change and iterate from there, if/when the
same issue arises again.

I've discussed avoiding this second poll by potentially including more
data (just `user_id`s?) in the main listing request, but not 100% sure
on this - even if the returned data is minimal it's an extra join
server-side, which could cause performance issues for large numbers of
rooms.
2021-01-15 15:19:12 +09:00
d023ad8ad1 Remove assert messages 2021-01-15 15:18:29 +09:00
3f88340304 Restore previous exception handling flow for stable path lookup 2021-01-15 15:17:38 +09:00
7c612ec556 Remove global.json 2021-01-15 15:11:03 +09:00
e0a4a666c8 Remove unnecessary workaround (mentioned package is pinned by SignalR to a working version) 2021-01-15 15:01:16 +09:00
f42a6270bb Update framework (again) for native libs fix 2021-01-15 14:57:01 +09:00
51255033e2 Update some missed usages of KeyBindingContainer in tests 2021-01-15 14:57:01 +09:00
86f66727de Update KeyBinding usages in line with interface changes 2021-01-15 14:57:01 +09:00
ebbc32adfa Change conditional used to decide legacy judgement animation to match stable
In stable, the type of legacy judgement to show is based on the presence
of particle textures in the skin. We were using the skin version
instead, which turns out to be incorrect and not what some user skins
expect.

Closes #11078.
2021-01-15 14:51:27 +09:00
40f020c683 Merge pull request #11494 from peppy/fix-beatmap-carousel-incorrect-sample
Fix the beatmap carousel playing the difficulty change sample on beatmap change
2021-01-15 14:47:00 +09:00
3e366b1f15 Ensure the main realm context is closed when the factory is disposed 2021-01-15 14:26:06 +09:00
693602513e Update test to use GetForWrite 2021-01-15 14:22:48 +09:00
9f77bb07c3 Merge pull request #11464 from peppy/fix-is-connected-thread-safety
Fix non-threadsafe usage of MultiplayerClient.IsConnected
2021-01-15 14:10:02 +09:00
0a65ae8f1e Fix the beatmap carousel playing the difficulty change sample on beatmap change 2021-01-15 14:07:24 +09:00
0c01a3a685 Found a better solution than TValue type checking for additional beatmap colour settings. Added unit tests for Catch Beatmap Skin settings. 2021-01-14 23:30:24 -05:00
4cccde9007 Update framework 2021-01-15 13:20:46 +09:00
dc8e38cf4d Remove pointless inline comment 2021-01-15 07:20:13 +03:00
67b5ebadf5 Merge branch 'master' into fix-is-connected-thread-safety 2021-01-15 12:56:21 +09:00
99e43c77c2 Simplified colour config checks in SkinProvidingContainer.cs 2021-01-14 16:53:55 -05:00
abfc5f24a3 Merge pull request #11462 from peppy/fix-participants-list
Revert polling changes to fix participant list display
2021-01-14 22:07:03 +09:00
3e8732a59f Merge branch 'master' into fix-participants-list 2021-01-14 21:30:53 +09:00
ef6245813b Merge pull request #11483 from peppy/fix-difficulty-calculation-deadlock
Fix deadlock scenario when calculating fallback difficulty
2021-01-14 21:30:25 +09:00
063acefd5c Merge branch 'master' into fix-difficulty-calculation-deadlock 2021-01-14 20:32:43 +09:00
0ea4e221b2 Merge branch 'master' into net5.0 2021-01-14 14:02:51 +03:00
862cb1412c Merge pull request #11410 from frenzibyte/user-beatmap-downloading-states
Add change state methods for multiplayer user beatmap availability
2021-01-14 18:42:26 +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
2988700bea Merge branch 'master' into realm-key-binding-store 2021-01-14 16:37:09 +09:00
f26c6210f3 Remove unnecessary Take() call and refactor default group logic naming 2021-01-14 16:36:24 +09:00
fd582f521c Reduce lifetime of realm context usage in detach scenario 2021-01-14 16:33:55 +09:00
8d071f97fb Early return 2021-01-14 16:33:03 +09:00
df08d964a5 Mark the types which have been migrated in OsuDbContext 2021-01-14 16:31:18 +09:00
e3c5a909e4 Fix known non-null variable 2021-01-14 16:30:57 +09:00
8a08d3f4ef Fix transactions not actually being committed 2021-01-14 16:13:10 +09:00
af1509d892 Remove unused variable (but add back pending writes counter) 2021-01-14 15:51:19 +09:00
4759797d15 Update framework 2021-01-14 15:51:07 +09:00
6eca8eac65 Merge pull request #11479 from smoogipoo/fix-judgement-1-frame-issue
Fix default judgement text mispositioned for one frame
2021-01-14 13:14:50 +09:00