{"record":{"id":"79d91e9a4203f824","repo":"ppy/osu","slug":"unknown-event-type-split-0","errorCode":null,"errorMessage":"Unknown event type: {split[0]}","messagePattern":"Unknown event type: (.+?)","errorType":"exception","errorClass":"InvalidDataException","httpStatus":null,"severity":"error","filePath":"osu.Game/Beatmaps/Formats/LegacyStoryboardDecoder.cs","lineNumber":117,"sourceCode":"\r\n            foreach (char c in line)\r\n            {\r\n                if (c == ' ' || c == '_')\r\n                    depth++;\r\n                else\r\n                    break;\r\n            }\r\n\r\n            line = line.Substring(depth);\r\n\r\n            string[] split = line.Split(',');\r\n\r\n            if (depth == 0)\r\n            {\r\n                storyboardSprite = null;\r\n\r\n                if (!Enum.TryParse(split[0], out LegacyEventType type))\r\n                    throw new InvalidDataException($@\"Unknown event type: {split[0]}\");\r\n\r\n                var source = isPrimaryStream ? StoryboardElementSource.Beatmap : StoryboardElementSource.Shared;\r\n\r\n                switch (type)\r\n                {\r\n                    case LegacyEventType.Background:\r\n                    {\r\n                        // the actual filename is handled in `LegacyBeatmapDecoder`.\r\n                        // this only handles the background offset, because it does not logically belong in `Beatmap` or related classes.\r\n                        if (split.Length > 4)\r\n                        {\r\n                            float x = Parsing.ParseFloat(split[3]);\r\n                            float y = Parsing.ParseFloat(split[4]);\r\n                            storyboard.BackgroundOffset = new Vector2(x, y);\r\n                        }\r\n\r\n                        break;\r\n                    }\r","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/ppy/osu/blob/d9c73e12adff2feaae4a3e158d36fe5883faf6ca/osu.Game/Beatmaps/Formats/LegacyStoryboardDecoder.cs#L99-L135","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try\n{\n    storyboardDecoder.Decode(reader);\n}\ncatch (InvalidDataException ex) when (ex.Message.Contains(\"Unknown event type\"))\n{\n    Logger.Log($\"Unrecognized storyboard event — skipping or rejecting file: {ex.Message}\", LoggingTarget.Database);\n}","preventionTips":["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."],"tags":["storyboard-decoding","events","unknown-type","data-corruption"],"backgroundTag":null,"analyzedSha":"d9c73e12adff2feaae4a3e158d36fe5883faf6ca","analyzedAt":"2026-08-13T14:12:54.015Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}