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 DrawableStoryboardVideo (inner DrawableVideo type) when Validation.IsFinite(value) is false. Same finite-scale invariant as the sprite/animation variants but applied to video storyboards.
Source
Thrown at osu.Game/Storyboards/Drawables/DrawableStoryboardVideo.cs:121
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);
}
}
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 DrawableVideo(Stream stream, bool startAtCurrentTime = true)
: base(stream, startAtCurrentTime)
{
}
}
}
}
View on GitHub (pinned to d9c73e12ad)
Solutions
- Guard the assignment: only set finite values, default to Vector2.One otherwise.
- Fix upstream storyboard command parsing to filter non-finite values.
- Check for zero-division in any scale transform math.
Example fix
// before video.VectorScale = parsed; // after video.VectorScale = Validation.IsFinite(parsed) ? parsed : 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
- Guard VectorScale assignments with IsFinite.
- Sanitize storyboard video scale parameters at decode.
- Audit runtime scale math for non-finite results.
When it happens
Trigger: Assigning a Vector2 with NaN or Infinity to a video's VectorScale, typically from a corrupt storyboard command or computed scale.
Common situations: Malformed storyboard file with invalid scale for a video layer; runtime scale computation yielding NaN; import of a hand-edited storyboard.
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/7641a039c4451b94.
Report an issue: GitHub.