Skip to content

Commit 11d684e

Browse files
Hard revert Android code to cccb5b8 with stability fixes
- Reverted Android build configuration and Oboe bridge to cccb5b8. - Ported Multiplayer and Daily Challenge stability fixes from 4469927. - Fixed NullReferenceException in GameplayWarmupScreen and RankedPlayMatchInfo. - Updated iOS CI workflow to use Xcode 26.3. - Verified passing visual test suite.
1 parent 8a5a39c commit 11d684e

7 files changed

Lines changed: 48 additions & 37 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ jobs:
182182
uses: actions/setup-dotnet@v5
183183
with:
184184
dotnet-version: "10.0.x"
185+
- name: Set Xcode version
186+
run: sudo xcode-select -s /Applications/Xcode_26.3.app
185187

186188
- name: Install .NET Workloads
187189
run: dotnet workload install ios

osu.Game/Screens/OnlinePlay/DailyChallenge/DailyChallengeLeaderboard.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public void RefetchScores()
138138
if (request?.CompletionState == APIRequestCompletionState.Waiting)
139139
return;
140140

141-
request = new IndexPlaylistScoresRequest(room.RoomID!.Value, playlistItem.ID);
141+
request = new IndexPlaylistScoresRequest((room.RoomID ?? 0), playlistItem.ID);
142142

143143
request.Success += req => Schedule(() =>
144144
{

osu.Game/Screens/OnlinePlay/DailyChallenge/DailyChallengeTimeRemainingRing.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ private void updateState()
134134
return;
135135
}
136136

137-
var roomDuration = room.EndDate.Value - room.StartDate.Value;
138-
var remaining = room.EndDate.Value - DateTimeOffset.Now;
137+
var roomDuration = (room.EndDate ?? DateTimeOffset.Now) - (room.StartDate ?? DateTimeOffset.Now);
138+
var remaining = (room.EndDate ?? DateTimeOffset.Now) - DateTimeOffset.Now;
139139

140140
timeText.Text = remaining.ToString(@"hh\:mm\:ss");
141141
progress.Progress = remaining.TotalSeconds / roomDuration.TotalSeconds;

osu.Game/Screens/OnlinePlay/Matchmaking/Match/BeatmapSelect/MatchmakingSelectPanel.CardContent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ private void load(AudioManager audio)
5353
userAddedSample = audio.Samples.Get(@"Multiplayer/player-ready");
5454
}
5555

56-
public bool AddUser(APIUser user)
56+
public bool AddUser(APIUser? user)
5757
{
58-
if (avatars.Any(a => a.User.Id == user.Id))
58+
if (user == null || avatars.Any(a => a.User?.Id == user.Id))
5959
return false;
6060

6161
var avatar = new SelectionAvatar(user, user.Equals(api.LocalUser.Value));

osu.Game/Screens/OnlinePlay/Matchmaking/Match/BeatmapSelect/MatchmakingSelectPanel.CardContentBeatmap.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private void load(OsuColour colours)
9292
thumbnail = new BeatmapCardThumbnail(beatmapSet, beatmapSet, keepLoaded: true)
9393
{
9494
Name = @"Left (icon) area",
95-
Size = new Vector2(MatchmakingSelectPanel.HEIGHT),
95+
Size = new Vector2(HEIGHT),
9696
Padding = new MarginPadding { Right = BeatmapCard.CORNER_RADIUS },
9797
Children = new Drawable[]
9898
{
@@ -114,8 +114,8 @@ private void load(OsuColour colours)
114114
},
115115
buttonContainer = new CollapsibleButtonContainer(beatmapSet, allowNavigationToBeatmap: false, keepBackgroundLoaded: true)
116116
{
117-
X = MatchmakingSelectPanel.HEIGHT - BeatmapCard.CORNER_RADIUS,
118-
Width = BeatmapCard.WIDTH - MatchmakingSelectPanel.HEIGHT + BeatmapCard.CORNER_RADIUS,
117+
X = HEIGHT - BeatmapCard.CORNER_RADIUS,
118+
Width = BeatmapCard.WIDTH - HEIGHT + BeatmapCard.CORNER_RADIUS,
119119
FavouriteState = { BindTarget = favouriteState },
120120
ButtonsCollapsedWidth = 0,
121121
ButtonsExpandedWidth = 24,

osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/GameplayWarmupScreen.cs

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@
1111
using osu.Framework.Graphics.Containers;
1212
using osu.Framework.Graphics.Shapes;
1313
using osu.Framework.Localisation;
14-
using osu.Framework.Logging;
14+
1515
using osu.Game.Beatmaps;
1616
using osu.Game.Database;
1717
using osu.Game.Graphics.Containers;
1818
using osu.Game.Online.API.Requests.Responses;
1919
using osu.Game.Online.Multiplayer;
2020
using osu.Game.Online.Multiplayer.MatchTypes.RankedPlay;
21-
using osu.Game.Online.Rooms;
2221
using osu.Game.Overlays;
2322
using osu.Game.Rulesets;
2423
using osu.Game.Rulesets.Mods;
@@ -73,8 +72,15 @@ public partial class GameplayWarmupScreen : RankedPlaySubScreen
7372
[BackgroundDependencyLoader]
7473
private void load()
7574
{
76-
APIBeatmap beatmap = beatmapLookupCache.GetBeatmapAsync(Client.Room!.CurrentPlaylistItem.BeatmapID).GetResultSafely()!;
77-
lastLookupResult.Value = SongSelect.BeatmapSetLookupResult.Completed(beatmap.BeatmapSet);
75+
APIBeatmap? beatmap = null;
76+
77+
var item = Client.Room?.CurrentPlaylistItem;
78+
if (item != null)
79+
{
80+
beatmap = beatmapLookupCache.GetBeatmapAsync(item.BeatmapID).GetResultSafely();
81+
if (beatmap?.BeatmapSet != null)
82+
lastLookupResult.Value = SongSelect.BeatmapSetLookupResult.Completed(beatmap.BeatmapSet);
83+
}
7884

7985
var matchState = Client.Room?.MatchState as RankedPlayRoomState;
8086
Debug.Assert(matchState != null);
@@ -134,17 +140,19 @@ private void load()
134140
AutoSizeAxes = Axes.Y,
135141
Spacing = new Vector2(0f, 4f),
136142
Direction = FillDirection.Vertical,
137-
Children =
138-
[
139-
new ShearAligningWrapper(new TitleWedge(beatmap))
140-
{
141-
Shear = -OsuGame.SHEAR,
142-
},
143-
new ShearAligningWrapper(new MetadataWedge(beatmap))
144-
{
145-
Shear = -OsuGame.SHEAR,
146-
},
147-
]
143+
Children = beatmap == null
144+
? System.Array.Empty<Drawable>()
145+
:
146+
[
147+
new ShearAligningWrapper(new TitleWedge(beatmap))
148+
{
149+
Shear = -OsuGame.SHEAR,
150+
},
151+
new ShearAligningWrapper(new MetadataWedge(beatmap))
152+
{
153+
Shear = -OsuGame.SHEAR,
154+
},
155+
]
148156
}
149157
}
150158
}
@@ -157,7 +165,8 @@ protected override void LoadComplete()
157165
{
158166
base.LoadComplete();
159167

160-
MultiplayerPlaylistItem item = Client.Room!.CurrentPlaylistItem;
168+
var item = Client.Room?.CurrentPlaylistItem;
169+
if (item == null) return;
161170

162171
RulesetInfo ruleset = rulesets.GetRuleset(item.RulesetID)!;
163172
Ruleset rulesetInstance = ruleset.CreateInstance();
@@ -200,16 +209,11 @@ public override void OnEntering(RankedPlaySubScreen? previous)
200209
}
201210
}
202211

203-
if (card == null)
212+
card ??= new RankedPlayCard(matchInfo.LastPlayedCard)
204213
{
205-
Logger.Log($"Played card {matchInfo.LastPlayedCard.Card.ID} was not on the screen.", level: LogLevel.Error);
206-
207-
card = new RankedPlayCard(matchInfo.LastPlayedCard)
208-
{
209-
Anchor = Anchor.Centre,
210-
Origin = Anchor.Centre,
211-
};
212-
}
214+
Anchor = Anchor.Centre,
215+
Origin = Anchor.Centre,
216+
};
213217

214218
cardColumn.Add(card);
215219

osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/RankedPlayMatchInfo.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public partial class RankedPlayMatchInfo : Component
7272

7373
public RankedPlayRoomState RoomState { get; private set; } = null!;
7474

75-
public bool IsOwnTurn => RoomState.ActiveUserId == client.LocalUser?.UserID;
75+
public bool IsOwnTurn => RoomState != null && client.LocalUser != null && RoomState.ActiveUserId == client.LocalUser.UserID;
7676

7777
public int CurrentRound => RoomState.CurrentRound;
7878

@@ -82,23 +82,28 @@ public partial class RankedPlayMatchInfo : Component
8282
private readonly List<RankedPlayCardWithPlaylistItem> opponentCards = new List<RankedPlayCardWithPlaylistItem>();
8383
private readonly Bindable<RankedPlayStage> stage = new Bindable<RankedPlayStage>();
8484

85+
private APIUser player = null!;
86+
8587
[Resolved]
8688
private MultiplayerClient client { get; set; } = null!;
8789

88-
private APIUser player = null!;
90+
8991

9092
protected override void LoadComplete()
9193
{
9294
base.LoadComplete();
9395

94-
player = client.LocalUser!.User!;
96+
var localUser = client.LocalUser;
97+
if (localUser?.User != null) player = localUser.User;
98+
else player = new APIUser { Id = localUser?.UserID ?? -1, Username = "Unknown" };
9599

96100
client.MatchRoomStateChanged += onMatchRoomStateChanged;
97101
client.RankedPlayCardAdded += onCardAdded;
98102
client.RankedPlayCardRemoved += onCardRemoved;
99103
client.RankedPlayCardPlayed += onCardPlayed;
100104

101-
var roomState = (RankedPlayRoomState)client.Room!.MatchState!;
105+
if (client.Room?.MatchState is not RankedPlayRoomState roomState)
106+
return;
102107

103108
onMatchRoomStateChanged(roomState);
104109

0 commit comments

Comments
 (0)