1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 23:47:25 +08:00
Commit Graph

69292 Commits

Author SHA1 Message Date
StanR
6ed151ccf5 Merge branch 'master' into rhythm-fixes 2024-09-23 14:25:32 +05:00
StanR
e04b88a9b0 Replace speed buff with aim buff 2024-09-23 13:49:25 +05:00
Dan Balasescu
ccf1acce56
Merge pull request #29933 from bdach/fix-dodgy-dim
Fix `DrawableOsuHitObject` not properly cleaning up dim application callbacks
2024-09-20 14:21:14 +09:00
StanR
e986a7dfe1 Fix repetition nerf not updating the counts 2024-09-19 19:15:54 +05:00
StanR
202364be5e Use List instead of Dictionary for island counting, minor adjustments 2024-09-19 17:52:55 +05:00
Bartłomiej Dach
89509ea49e
Fix DrawableOsuHitObject not properly cleaning up dim application callbacks
Should fix https://github.com/ppy/osu/issues/28629.

First of all, to support the claim that this does fix the issue -
reproduction is rather difficult, but I believe I found a way to
maximise the chances of it reproducing by performing the following
steps:

1. Apply the following diff:

diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs
index eacd2b3e75..4c00da031a 100644
--- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs
+++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs
@@ -6,6 +6,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
 using JetBrains.Annotations;
 using osu.Framework.Allocation;
 using osu.Framework.Bindables;
@@ -95,6 +96,8 @@ public DrawableSlider([CanBeNull] Slider s = null)
         [BackgroundDependencyLoader]
         private void load()
         {
+            Thread.Sleep(100);
+
             tailContainer = new Container<DrawableSliderTail> { RelativeSizeAxes = Axes.Both };

             AddRangeInternal(new Drawable[]

2. Download https://osu.ppy.sh/beatmapsets/1470790#osu/3023028 and open
   it in the editor.

3. Select all objects using Ctrl-A. Yes, it'll take a while, especially
   so with the patch above.

4. Rotate the selection by any amount using the right toolbox.

5. Press undo. The game should crash. If it doesn't spam redo and undo
   until it does.

Now to explain what the fix is.

In the issue thread I spent a considerable time hemming and hawing about
which of the dimmable pieces was null, which was a complete miss and a
failure at reading. Let's see the stack trace again:

	2024-06-27 02:15:20 [error]: at osu.Game.Rulesets.Osu.Objects.Drawables.DrawableOsuHitObject.<UpdateInitialTransforms>g__applyDim|15_0(Drawable piece) in /home/runner/work/osu-auth-client/osu-auth-client/osu/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs:line 101

Line 101, you say? What could be null here?

	bd8addfb5f/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs (L101)

Okay, what's `InitialLifetimeOffset`, then?

	bd8addfb5f/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs (L108)

Yes, that's right. It's `HitObject` that is null here.

Now why does *that* happen? First, let's note that all stacks where this
died went through `UpdateState()`, which means that the problematic
`applyDim()` calls had to be `ApplyCustomUpdateState` event callbacks.
Meaning that the pieces where `HitObject` was null were DHOs themselves.

Recall that parent DHOs and child DHOs are pooled separately. Therefore,
there is no guarantee that any parent and child DHOs will remain
associated with each other for the entire duration of a gameplay
session; it is quite the contrary, and nobody should rely on that.
Unfortunately for us, adding a `applyDimToDrawableHitObject` callback to
a child object's `ApplyCustomUpdateState` *implicitly creates* such an
association, because it ends up allocating a closure that captures
`this` (meaning the parent in this context).

Therefore, this now creates a situation where a child DHO can attempt to
read state from a former parent DHO which can be in an indeterminate
state, and in fact, when this crashes, the former parent DHO is most
likely not even in use - hence the null `HitObject`.

Thus, the fix is to clear the association by unsubscribing from the
event when nested objects are cleared.

My hypothesis why the reproduction scenario is like it is, is that both
the sleep and the increased pressure on the pool (by way of selecting
all objects and therefore forcing the DHOs to be materialised beyond
pool capacity) increases the likelihood of getting a crosslink.
When pool pressure is low, it is much more likely that a parent DHO
*will* get the same child DHO again on re-application, even though
that is not guaranteed.

Just as an additional detail, note that the sentry issue for this lists
the "first seen" version as 2024.312.0, which is the release that
included https://github.com/ppy/osu/pull/27401 which would be directly
responsible for this mess.
2024-09-19 14:30:02 +02:00
StanR
732a114b95 Slight refactoring 2024-09-19 15:53:18 +05:00
Dean Herbert
bd8addfb5f
Merge pull request #29897 from bdach/editor/setup-screen-slider
Implement "form" slider bar control
2024-09-19 19:07:14 +09:00
Dean Herbert
ca8402d980
Make animation slightly more snappy 2024-09-19 19:06:46 +09:00
Dean Herbert
cd61aecad1
Merge pull request #29925 from nekupaw/skip-overlay-beat-synced-animation
Implement beat-synchronized animation in skip overlay
2024-09-19 18:53:45 +09:00
Dean Herbert
9376ba3262
Merge pull request #26311 from OliBomby/grids-3
Make editor flip, rotate, and scale tools revolve around the grid center
2024-09-19 18:45:39 +09:00
Bartłomiej Dach
7f141801d9
Merge pull request #29930 from peppy/player-avatar-corner-fix
Improve flexibility of skin layout editor player avatar
2024-09-19 11:36:44 +02:00
Dean Herbert
188a430418
Merge branch 'master' into grids-3 2024-09-19 18:21:05 +09:00
Dean Herbert
fd45644d0f
Fix skin layout editor PlayerAvatar applying corner radius weirdly after scale
Closes #29919.

I've also made this handle resizing better, so now you can have
non-square avatar displays.
2024-09-19 16:55:04 +09:00
Bartłomiej Dach
fdd94aa845
Remove pointless max
The clamp should already ensure this.
2024-09-19 09:43:50 +02:00
Neku
d0519238a3
Implement beat-synchronized animation in skip overlay 2024-09-19 09:43:45 +02:00
StanR
0bad5e4684 Move slider-related ratio multiplier out of the delta switch block, add nerf for ratios with delta difference fractions that are too big, adjust consts 2024-09-19 04:38:01 +05:00
Bartłomiej Dach
cf9f8c7f66
Merge pull request #29916 from peppy/fix-song-select-crash-selection-after-loading
Fix occasional song select crash when entering gameplay
2024-09-18 11:44:59 +02:00
Bartłomiej Dach
d506d8a150
Implement TabbableContentContainer for slider control 2024-09-18 11:32:55 +02:00
Bartłomiej Dach
093d9ab076
Keep slider bar looking active when dragging outside of its bounds 2024-09-18 11:30:52 +02:00
Bartłomiej Dach
0bab755be3
Add missing xmldoc 2024-09-18 11:25:23 +02:00
Bartłomiej Dach
95e26e6fd8
Make slider bar instantaneous by default (and fix broken implementation) 2024-09-18 11:23:00 +02:00
Dean Herbert
ac507a3ba5
Remove unused parameter in applyActiveCriteria 2024-09-18 17:22:09 +09:00
Dean Herbert
743d509241
Also ensure filter is applied when returning to song select 2024-09-18 17:22:08 +09:00
Bartłomiej Dach
ba9143e597
Merge pull request #29912 from peppy/remove-dropdown-opacity
Remove opacity from old style dropdown menus
2024-09-18 09:48:11 +02:00
Dean Herbert
c192a6a1d5
Fix song select crashes due to attempting to clear selection after load has already begun 2024-09-18 16:12:34 +09:00
Dean Herbert
aae98e6906
Add failing test showing crash at song select on selection edge case 2024-09-18 16:12:34 +09:00
Dean Herbert
76c5e743d7
Remove opacity from old style dropdown menus
These aren't used in many places, but we've since moved away from
opacity in UI elements like this, so let's just nuke it here for
legibility.

Addresses https://github.com/ppy/osu/discussions/29906.
2024-09-18 13:49:27 +09:00
Bartłomiej Dach
1b17231da4
Implement "form" slider bar control 2024-09-17 11:40:57 +02:00
Bartłomiej Dach
ea94f903c1
Merge pull request #29894 from peppy/fix-fruit-rotation
Fix osu!catch fruit rotation being applied too late
2024-09-17 10:26:21 +02:00
Dean Herbert
f8fff4074d
Fix rotation not being updated correctly on start time change 2024-09-17 16:18:29 +09:00
Dean Herbert
c1c0d49bfe
Add comments and fix bananas stopping still if not caught 2024-09-17 16:15:45 +09:00
Dean Herbert
a1fa132ddb
Merge pull request #29893 from bdach/slider-end-drag-marker-broken-by-stacking
Fix slider end drag marker being in incorrect position for stacked sliders
2024-09-17 16:03:38 +09:00
Dean Herbert
3f4422429d
*Also* fix droplets 2024-09-17 15:38:51 +09:00
Dean Herbert
2ccdad41e7
Also fix banana showers 2024-09-17 15:31:00 +09:00
Bartłomiej Dach
67a7f608f1
Fix slider end drag marker being in incorrect position for stacked sliders
Closes https://github.com/ppy/osu/issues/29884.
2024-09-17 08:23:46 +02:00
Bartłomiej Dach
3e63fe399f
Enable NRT in test scene 2024-09-17 08:22:37 +02:00
Bartłomiej Dach
a99dbfa768
Add failing test step demonstrating incorrect end drag marker position 2024-09-17 08:21:58 +02:00
Dean Herbert
785a725507
Fix osu!catch fruit rotation being applied too late 2024-09-17 15:12:02 +09:00
Dean Herbert
d34e8ea69e
Update framework 2024-09-16 16:15:09 +09:00
StanR
c9ce7d29e6 Adjust multipliers 2024-09-16 01:04:46 +05:00
StanR
bee18b03e7 Reduce history max overall instead of using clock rate 2024-09-16 00:49:36 +05:00
StanR
145731bdef More balancing 2024-09-15 02:48:41 +05:00
StanR
863a74f980 Balancing 2024-09-15 02:08:37 +05:00
StanR
738d4bcb80 Reduce ratio if we're starting island counting after a slider 2024-09-15 01:49:52 +05:00
StanR
db626f168a Refactor 2024-09-15 01:12:41 +05:00
StanR
5e8174faa8 Reduce ratio for island size 1 2024-09-14 22:03:01 +05:00
OliBomby
30096c1c71 clean up code 2024-09-14 17:26:04 +02:00
Olivier Schipper
f7503ee2c8
Merge pull request #107 from kongehund/master
Rewrite GetConvexHull using the clean room method
2024-09-14 17:05:33 +02:00
kongehund
385eb5eed5 Rewrite GetConvexHull 2024-09-14 16:32:51 +02:00