ppy/osu · error · ArgumentOutOfRangeException
Invalid result type: {result}
Error message
Invalid result type: {result} What it means
HitExplosion.GetResultComponent() maps a HitResult to the corresponding TaikoSkinComponents explosion type. Only Miss, Ok, and Great are valid for Taiko hit explosions. Other result values (e.g., Meh, Good, Perfect, IgnoreHit, SmallBonusHit) are invalid for this visual component and throw ArgumentOutOfRangeException.
Source
Thrown at osu.Game.Rulesets.Taiko/UI/HitExplosion.cs:114
LifetimeEnd = skinnable.Drawable.LatestTransformEndTime;
}
private static TaikoSkinComponents getComponentName(HitResult result)
{
switch (result)
{
case HitResult.Miss:
return TaikoSkinComponents.TaikoExplosionMiss;
case HitResult.Ok:
return TaikoSkinComponents.TaikoExplosionOk;
case HitResult.Great:
return TaikoSkinComponents.TaikoExplosionGreat;
}
throw new ArgumentOutOfRangeException(nameof(result), $"Invalid result type: {result}");
}
public void VisualiseSecondHit(JudgementResult judgementResult)
{
secondHitTime = judgementResult.TimeAbsolute;
runAnimation();
}
}
}
View on GitHub (pinned to d9c73e12ad)
Solutions
- Filter HitResult values before creating a HitExplosion — only pass Miss, Ok, or Great.
- If a new result tier should produce an explosion, add a case mapping it to a TaikoSkinComponents explosion type.
- For non-explosion results, skip the HitExplosion creation entirely rather than passing the result through.
Example fix
// before
var explosion = new HitExplosion(result.Type); // throws for non-standard results
// after — guard against unsupported results
if (result.Type is HitResult.Miss or HitResult.Ok or HitResult.Great)
AddInternal(new HitExplosion(result.Type));
else
return; // no explosion for this result tier Defensive patterns
Strategy: type-guard
Validate before calling
// Filter to explosion-capable results before creating HitExplosion
static bool IsExplosionResult(HitResult result)
=> result is HitResult.Miss or HitResult.Ok or HitResult.Great; Type guard
static bool IsExplosionResult(HitResult result)
=> result is HitResult.Miss or HitResult.Ok or HitResult.Great; Prevention
- Filter HitResult values before creating HitExplosion — only Miss, Ok, and Great produce explosions.
- When adding a new HitResult tier to Taiko, decide whether it needs an explosion and add the case if so.
- Add a test that iterates all supported HitResult values through GetResultComponent.
When it happens
Trigger: A HitResult value other than Miss, Ok, or Great is passed to GetResultComponent — e.g., a scoring system change introduces additional result tiers, or a custom judgement produces a non-standard result.
Common situations: Custom scoring modes that add result tiers (e.g., a Good or Perfect result); mods that alter available HitResult values; changes to the ScoringValues that expose results the explosion system doesn't handle.
Related errors
- Unknown hit object type.
- Invalid component type: {component}
- Unsupported grid type.
- Unsupported animation style
- Use override with HitType parameter instead
AI-assisted analysis of ppy/osu@d9c73e12ad (2026-08-13).
Data as JSON: /api/errors/117d699afee00739.
Report an issue: GitHub.