{"record":{"id":"d01b298f2fe97b97","repo":"denoland/deno","slug":"malformed-msi-no-columns-stream","errorCode":null,"errorMessage":"malformed .msi: no _Columns stream","messagePattern":"malformed \\.msi: no _Columns stream","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/desktop.rs","lineNumber":4991,"sourceCode":"    (\"_Columns\", vec![str_w, 2, str_w, 2], vec![0, 1]),\n    (\n      \"_Validation\",\n      vec![str_w, str_w, str_w, 4, 4, str_w, 2, str_w, str_w, str_w],\n      vec![0, 1],\n    ),\n  ];\n  for (name, widths, keys) in system_tables {\n    if let Some(raw) = find_raw(name) {\n      let bytes = read_stream(&mut comp, &raw)?;\n      let sorted = msi_resort_stream(&bytes, widths, keys);\n      write_stream(&mut comp, &raw, &sorted)?;\n    }\n  }\n\n  // Parse the (now sorted) `_Columns` table to recover every persistent table's\n  // column widths and which columns are primary keys.\n  let columns_raw = find_raw(\"_Columns\").ok_or_else(|| {\n    deno_core::anyhow::anyhow!(\"malformed .msi: no _Columns stream\")\n  })?;\n  let columns = read_stream(&mut comp, &columns_raw)?;\n  let col_row_w = str_w + 2 + str_w + 2; // Table, Number, Name, Type\n  let ncol = columns.len() / col_row_w;\n  let read_col = |arr_off: usize, row: usize, w: usize| -> u64 {\n    let base = arr_off + row * w;\n    let mut v = 0u64;\n    for k in 0..w {\n      v |= (columns[base + k] as u64) << (8 * k);\n    }\n    v\n  };\n  let off_table = 0usize;\n  let off_number = ncol * str_w;\n  let off_type = off_number + ncol * 2 + ncol * str_w;\n  // A column Type word: 0x8000 marks the stored value present (always set here);\n  // 0x0800 marks a string type; 0x2000 marks a primary-key column; for integer\n  // columns the low byte is the storage size (2 or 4 bytes).","sourceCodeStart":4973,"sourceCodeEnd":5009,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/cli/tools/desktop.rs#L4973-L5009","documentation":"Error \"malformed .msi: no _Columns stream\" thrown in denoland/deno.","triggerScenarios":"Thrown at cli/tools/desktop.rs:4991 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":"89f33cbef296a2b287f323d42de54c871fa69c77","analyzedAt":"2026-08-16T07:54:21.310Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}