-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Game crash when changing addition sample bank for multiple objects #28629
Comments
Crash in the logs:
Looking at sentry this doesn't to be specific to changing samples, or even the editor. I see several instances of this from different stacks. More likely that the method in question is just generally unsafe.
I can't reproduce this. Please provide a video of this showing, preferably with the link to the map(s) that exhibit this behaviour. |
Sentry issue: OSU-133H |
I guess for the crash I would do this... diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs
index 5f5deca1ba..f71d0d1d62 100644
--- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs
+++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs
@@ -6,6 +6,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
@@ -73,6 +74,7 @@ protected override void OnFree()
ScaleBindable.UnbindFrom(HitObject.ScaleBindable);
}
+ [ItemCanBeNull]
protected virtual IEnumerable<Drawable> DimmablePieces => Enumerable.Empty<Drawable>();
protected override void UpdateInitialTransforms()
@@ -91,7 +93,7 @@ protected override void UpdateInitialTransforms()
drawableObjectPiece.ApplyCustomUpdateState -= applyDimToDrawableHitObject;
drawableObjectPiece.ApplyCustomUpdateState += applyDimToDrawableHitObject;
}
- else
+ else if (piece?.IsLoaded == true)
applyDim(piece);
}
but I can't reproduce this crashing for one, and secondly it's a bit of a dicey one. I'm pretty sure it should be safe because @ppy/team-client thoughts on this? |
hmm, what would you say to this solution instead? diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableHitCircle.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableHitCircle.cs
index 7d707dea6c..760e15190c 100644
--- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableHitCircle.cs
+++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableHitCircle.cs
@@ -325,6 +325,9 @@ public ProxyableSkinnableDrawable(ISkinComponentLookup lookup, Func<ISkinCompone
internal void SuppressHitAnimations()
{
+ if (!IsLoaded)
+ return;
+
UpdateState(ArmedState.Idle, true);
UpdateComboColour();
diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs
index 02d0ebee83..69ad126f7b 100644
--- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs
+++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs
@@ -375,6 +375,9 @@ private partial class DefaultSliderBody : PlaySliderBody
internal void SuppressHitAnimations()
{
+ if (!IsLoaded)
+ return;
+
UpdateState(ArmedState.Idle, true);
HeadCircle.SuppressHitAnimations();
TailCircle.SuppressHitAnimations();
diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderTail.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderTail.cs
index 42abf41d6f..053ca25398 100644
--- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderTail.cs
+++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderTail.cs
@@ -132,6 +132,9 @@ protected override void OnApply()
internal void SuppressHitAnimations()
{
+ if (!IsLoaded)
+ return;
+
UpdateState(ArmedState.Idle, true);
UpdateComboColour();
I believe this is specific to the new flow, where |
Okay that's very scary. I think I'd want to understand how these can happen before deciding on a fix.. |
The only way I can see the last of those screenshots happening is a |
I could recreate the crash and the issue from the 2nd screenshot on a map I made, and on this map. Another difficulty had no issues changing the addition banks, oddly enough. I've attached two videos of me doing so on all three, and the map on gofile (github hates olz) compressed3.mp4compressed2.mp4 |
if the link to download the map ever dies, let me know and i can attempt to reupload it ^^ |
Type
Crash to desktop
Bug description
The game crashes after selecting multiple objects with different addition, then attempting changing the addition sample bank on a slider end with a hitsound.
You can reproduce like in the video by doing CTRL-A to a map with multiple banks for additions, changing the addition bank of a slider end, deselecting, then adding a hitsound to the slider end.I've not been able to get it to consistently reproduce either, so I'm not sure what direction to give thereScreenshots or videos
2024-06-26.21-14-44.mp4
Version
2024.625.2-lazer
Logs
compressed-logs.zip
The text was updated successfully, but these errors were encountered: