{"record":{"id":"4b2936923d6fee47","repo":"flxzt/rnote","slug":"affine-does-not-have-value-at-index-6","errorCode":null,"errorMessage":"affine does not have value at index 6","messagePattern":"affine does not have value at index 6","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/rnote-engine/src/fileformats/rnoteformat/maj0min15.rs","lineNumber":156,"sourceCode":"                .get(0)\n                .cloned()\n                .ok_or(anyhow!(\"affine does not have value at index 0\"))?,\n            affine\n                .get(1)\n                .cloned()\n                .ok_or(anyhow!(\"affine does not have value at index 1\"))?,\n            affine\n                .get(3)\n                .cloned()\n                .ok_or(anyhow!(\"affine does not have value at index 3\"))?,\n            affine\n                .get(4)\n                .cloned()\n                .ok_or(anyhow!(\"affine does not have value at index 4\"))?,\n            affine\n                .get(6)\n                .cloned()\n                .ok_or(anyhow!(\"affine does not have value at index 6\"))?,\n            affine\n                .get(7)\n                .cloned()\n                .ok_or(anyhow!(\"affine does not have value at index 7\"))?,\n        ],\n    );\n\n    Ok(())\n}\n","sourceCodeStart":138,"sourceCodeEnd":166,"githubUrl":"https://github.com/flxzt/rnote/blob/bbc5354502ba2fc83eec2670b535348825e679a6/crates/rnote-engine/src/fileformats/rnoteformat/maj0min15.rs#L138-L166","documentation":"Index guard in convert_transform_to_affine_in_obj: .get(6) on the affine array returned None, i.e. the stored transform lacks the final component needed for the affine reconstruction during the maj0min15 migration. Indicates truncated transform data in the file being converted.","triggerScenarios":"An .rnote file with an \"affine\" array of length 4-5 (missing indexes 6,7) during the maj0min15 conversion.","commonSituations":"Truncated files, or exporters that emit only the linear part of the matrix without the translation row.","solutions":["Append the missing translation elements so \"affine\" has all 8 values, e.g. [..., 0.0, 1.0].","Restore the file from backup or re-export.","Fix the generating code to include the full 8-element matrix."],"exampleFix":"// before\n\"affine\": [1, 0, 0, 1]\n// after\n\"affine\": [1, 0, 0, 1, 0, 0, 0, 1]","handlingStrategy":"validation","validationCode":"if affine.len() < 8 { return Err(\"affine missing translation row\".into()); }","typeGuard":"fn is_full_affine(a: &serde_json::Value) -> bool {\n    a.as_array().map(|a| a.len() >= 8).unwrap_or(false)\n}","tryCatchPattern":null,"preventionTips":["Include the full 3x3 (8 stored values incl. translation) in any custom writer.","Round-trip test: write a file, read it back through migrations.","Check file sizes/integrity after transfers."],"tags":["json","file-migration","index-out-of-range"],"backgroundTag":"index-out-of-bounds","analyzedSha":"bbc5354502ba2fc83eec2670b535348825e679a6","analyzedAt":"2026-09-08T13:20:33.747Z","contentChangedAt":"2026-09-08T13:20:33.747Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}