ppy/osu · warning · ArgumentException
{nameof(VectorScale)} must be finite, but is {value}.
Error message
{nameof(VectorScale)} must be finite, but is {value}. What it means
Thrown by the VectorScale setter on DrawableStoryboardSprite when Validation.IsFinite(value) is false. Identical guard and rationale to DrawableStoryboardAnimation: NaN/Infinity scale components are rejected to protect geometry invalidation.
Source
Thrown at osu.Game/Storyboards/Drawables/DrawableStoryboardSprite.cs:60
if (flipV == value)
return;
flipV = value;
Invalidate(Invalidation.MiscGeometry);
}
}
private Vector2 vectorScale = Vector2.One;
public Vector2 VectorScale
{
get => vectorScale;
set
{
if (vectorScale == value)
return;
if (!Validation.IsFinite(value)) throw new ArgumentException($@"{nameof(VectorScale)} must be finite, but is {value}.");
vectorScale = value;
Invalidate(Invalidation.MiscGeometry);
}
}
public override bool RemoveWhenNotAlive => false;
protected override Vector2 DrawScale
=> new Vector2(FlipH ? -base.DrawScale.X : base.DrawScale.X, FlipV ? -base.DrawScale.Y : base.DrawScale.Y) * VectorScale;
public override Anchor Origin => StoryboardExtensions.AdjustOrigin(base.Origin, VectorScale, FlipH, FlipV);
public override bool IsPresent
=> !float.IsNaN(DrawPosition.X) && !float.IsNaN(DrawPosition.Y) && base.IsPresent;
protected override void Update()
{
View on GitHub (pinned to d9c73e12ad)
Solutions
- Validate the value with Validation.IsFinite before setting, falling back to Vector2.One.
- Fix the storyboard command decoder to reject/sanitize non-finite parameters.
- Audit scale-producing math for possible zero-division.
Example fix
// before sprite.VectorScale = value; // after sprite.VectorScale = float.IsFinite(value.X) && float.IsFinite(value.Y) ? value : Vector2.One;
Defensive patterns
Strategy: validation
Validate before calling
if (!Validation.IsFinite(value))
value = Vector2.One; Type guard
static bool IsFiniteScale(Vector2 v) => Validation.IsFinite(v);
Prevention
- Validate VectorScale before setting.
- Fix storyboard command decoding for corrupt scale values.
- Check scale computations for NaN sources.
When it happens
Trigger: Setting VectorScale with NaN or Infinity component(s) on a storyboard sprite, e.g. from a parsed scale command with corrupt data.
Common situations: Storyboard S-command with bad parameters; runtime scale math dividing by zero; imported storyboard with invalid scale keyframes.
Related errors
- {nameof(VectorScale)} must be finite, but is {value}.
- {nameof(VectorScale)} must be finite, but is {value}.
- Provided client ID must be an integer.
- Can't have zero or fewer stages.
- No valid beatmap files found in the beatmap archive.
AI-assisted analysis of ppy/osu@d9c73e12ad (2026-08-13).
Data as JSON: /api/errors/cce9a4cee37782c3.
Report an issue: GitHub.