ppy/osu · error · InvalidDataException
Unknown event type: {split[0]}
Error message
Unknown event type: {split[0]} What it means
Thrown by LegacyStoryboardDecoder.handleEvents when a line in the [Events] section (at depth 0, i.e. not a sub-command) has a first token that doesn't parse to a LegacyEventType enum value. The decoder uses Enum.TryParse on the token, and anything not matching a known event name (Background, Video, Sprite, Animation, Sample, etc.) triggers this.
Source
Thrown at osu.Game/Beatmaps/Formats/LegacyStoryboardDecoder.cs:117
foreach (char c in line)
{
if (c == ' ' || c == '_')
depth++;
else
break;
}
line = line.Substring(depth);
string[] split = line.Split(',');
if (depth == 0)
{
storyboardSprite = null;
if (!Enum.TryParse(split[0], out LegacyEventType type))
throw new InvalidDataException($@"Unknown event type: {split[0]}");
var source = isPrimaryStream ? StoryboardElementSource.Beatmap : StoryboardElementSource.Shared;
switch (type)
{
case LegacyEventType.Background:
{
// the actual filename is handled in `LegacyBeatmapDecoder`.
// this only handles the background offset, because it does not logically belong in `Beatmap` or related classes.
if (split.Length > 4)
{
float x = Parsing.ParseFloat(split[3]);
float y = Parsing.ParseFloat(split[4]);
storyboard.BackgroundOffset = new Vector2(x, y);
}
break;
}
View on GitHub (pinned to d9c73e12ad)
Solutions
- Open the file in a text editor, go to the [Events] section, and find the line whose first field is shown in the error message.
- Correct the event keyword to a valid LegacyEventType (Background, Video, Sprite, Animation, Sample).
- If the event type is genuinely new/unknown, either remove the line or update the LegacyEventType enum and add handling.
- Re-download the beatmap/storyboard if it's corrupt.
Defensive patterns
Strategy: try-catch
Try / catch
try
{
storyboardDecoder.Decode(reader);
}
catch (InvalidDataException ex) when (ex.Message.Contains("Unknown event type"))
{
Logger.Log($"Unrecognized storyboard event — skipping or rejecting file: {ex.Message}", LoggingTarget.Database);
} Prevention
- Use storyboard editors that only emit valid LegacyEventType keywords (Background, Video, Sprite, Animation, Sample).
- Validate storyboard files from untrusted sources before decoding.
- Keep a whitelist of valid event types when processing .osb/.osu files programmatically.
When it happens
Trigger: Decoding a .osu or .osb file whose [Events] section contains a line with an unrecognized event keyword — e.g. 'UnknownEvent,0,0,...'. Typos like 'Backgroudn' or entirely custom event types not in the LegacyEventType enum cause the parse to fail.
Common situations: A storyboard produced by a non-standard editor that emits event types not in the osu! specification; manual editing with a typo in an event keyword; a future/corrupt format version with new event types the current decoder doesn't know.
Related errors
- Unknown command type: {commandType}
- Beat length cannot be NaN in a timing control point
- Color specified in incorrect format (should be R,G,B or R,G,
- Color must be specified with 8-bit integer components
AI-assisted analysis of ppy/osu@d9c73e12ad (2026-08-13).
Data as JSON: /api/errors/79d91e9a4203f824.
Report an issue: GitHub.