Skip to content

Fix duel crash due to failing lookups (#37606) - #288

Merged
winnerspiros merged 1 commit into
winnerspiros:masterfrom
ppy:master
May 2, 2026
Merged

Fix duel crash due to failing lookups (#37606)#288
winnerspiros merged 1 commit into
winnerspiros:masterfrom
ppy:master

Conversation

@winnerspiros

@winnerspiros winnerspiros commented May 2, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes
    • Improved duel notification handling to more reliably process user requests and prevent potential edge case issues.

Copilot AI review requested due to automatic review settings May 2, 2026 10:38
@coderabbitai

coderabbitai Bot commented May 2, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9e12f0b4-a979-43e9-ad8e-bf2d46f86e72

📥 Commits

Reviewing files that changed from the base of the PR and between 86898d3 and 3924fc7.

📒 Files selected for processing (1)
  • osu.Game/Screens/OnlinePlay/Matchmaking/Queue/QueueController.cs

📝 Walkthrough

Walkthrough

The duel notification dispatch in QueueController is refactored from a continuation-based async pattern to an async local method. The new flow adds explicit null safety and uses the Scheduler for posting notifications, while removing an unused using directive.

Changes

Duel Notification Dispatch

Layer / File(s) Summary
Async Pattern Refactoring
osu.Game/Screens/OnlinePlay/Matchmaking/Queue/QueueController.cs
onMatchmakingDuelIssued replaces ContinueWith continuation with async local handleDuelRequestAsync method. Flow now awaits users.GetUserAsync(duel.UserId), checks for null, and schedules DuelNotification via Scheduler.Add instead of forcing non-null dereference.
Import Cleanup
osu.Game/Screens/OnlinePlay/Matchmaking/Queue/QueueController.cs
Removed unused using osu.Framework.Extensions; while retaining using osu.Framework.Extensions.ObjectExtensions;.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit hops through async trails,
Where continuations once did sail,
Now local methods smooth the way,
With null-checks bright as morning's ray— 🐰✨
Notifications queued to play!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix duel crash due to failing lookups' directly relates to the main change: handling null user lookups in duel notification logic to prevent crashes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@gitar-bot

gitar-bot Bot commented May 2, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@winnerspiros
winnerspiros merged commit 4f05f73 into winnerspiros:master May 2, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants