{"record":{"id":"8b91e7fa2d41b98b","repo":"openai/codex","slug":"animation-name-references-sprite-index-but-p","errorCode":null,"errorMessage":"animation {name} references sprite index {}, but pet has {frame_count} frames","messagePattern":"animation (.+?) references sprite index (.+?), but pet has (.+?) frames","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/tui/src/pets/model.rs","lineNumber":464,"sourceCode":"\n    animations\n        .entry(\"idle\".to_string())\n        .or_insert_with(idle_animation);\n    validate_animation_indices(&animations, frame_count)?;\n    Ok(animations)\n}\n\nfn validate_animation_indices(\n    animations: &HashMap<String, Animation>,\n    frame_count: usize,\n) -> Result<()> {\n    for (name, animation) in animations {\n        if animation.frames.is_empty() {\n            bail!(\"animation {name} must include at least one frame\");\n        }\n        for frame in &animation.frames {\n            if frame.sprite_index >= frame_count {\n                bail!(\n                    \"animation {name} references sprite index {}, but pet has {frame_count} frames\",\n                    frame.sprite_index\n                );\n            }\n        }\n        if !animations.contains_key(&animation.fallback) {\n            bail!(\n                \"animation {name} fallback {} does not exist\",\n                animation.fallback\n            );\n        }\n    }\n    Ok(())\n}\n\nfn default_frame_count() -> usize {\n    (catalog::DEFAULT_FRAME_COLUMNS * catalog::DEFAULT_FRAME_ROWS) as usize\n}","sourceCodeStart":446,"sourceCodeEnd":482,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/tui/src/pets/model.rs#L446-L482","documentation":"Error \"animation {name} references sprite index {}, but pet has {frame_count} frames\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/tui/src/pets/model.rs:464 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}