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 DrawableStoryboardAnimation when Validation.IsFinite(value) is false — i.e. one or both components are NaN or Infinity. A non-finite scale would corrupt layout/rendering math, so it is rejected before assignment.
Source
Thrown at osu.Game/Storyboards/Drawables/DrawableStoryboardAnimation.cs:63
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;
public DrawableStoryboardAnimation(StoryboardAnimation animation)
{
View on GitHub (pinned to d9c73e12ad)
Solutions
- Sanitize scale values before assignment: replace NaN/Infinity with sane defaults (Vector2.One).
- Trace the storyboard command source to fix the bad parameter at decode time.
- Add a float.IsFinite check in the storyboard command decoder.
Example fix
// before anim.VectorScale = computed; // computed may be NaN // after anim.VectorScale = Validation.IsFinite(computed) ? computed : 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
- Sanitize scale values before assignment.
- Guard storyboard command decoders against non-finite parameters.
- Audit scale math for zero-division.
When it happens
Trigger: Setting VectorScale to a Vector2 containing NaN or Infinity (e.g. result of 0/0, division by zero in scale computation, or a storyboard command decoding to an invalid float).
Common situations: Storyboard command (S command) with malformed parameters producing NaN; division-based scale calculation with zero denominator; importing a storyboard authored with bad scale values.
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.
- Unsupported animation style
AI-assisted analysis of ppy/osu@d9c73e12ad (2026-08-13).
Data as JSON: /api/errors/725650900de23ff0.
Report an issue: GitHub.