denoland/deno · error

malformed .msi: no _Columns stream

Error message

malformed .msi: no _Columns stream

What it means

Error "malformed .msi: no _Columns stream" thrown in denoland/deno.

Source

Thrown at cli/tools/desktop.rs:4991

    ("_Columns", vec![str_w, 2, str_w, 2], vec![0, 1]),
    (
      "_Validation",
      vec![str_w, str_w, str_w, 4, 4, str_w, 2, str_w, str_w, str_w],
      vec![0, 1],
    ),
  ];
  for (name, widths, keys) in system_tables {
    if let Some(raw) = find_raw(name) {
      let bytes = read_stream(&mut comp, &raw)?;
      let sorted = msi_resort_stream(&bytes, widths, keys);
      write_stream(&mut comp, &raw, &sorted)?;
    }
  }

  // Parse the (now sorted) `_Columns` table to recover every persistent table's
  // column widths and which columns are primary keys.
  let columns_raw = find_raw("_Columns").ok_or_else(|| {
    deno_core::anyhow::anyhow!("malformed .msi: no _Columns stream")
  })?;
  let columns = read_stream(&mut comp, &columns_raw)?;
  let col_row_w = str_w + 2 + str_w + 2; // Table, Number, Name, Type
  let ncol = columns.len() / col_row_w;
  let read_col = |arr_off: usize, row: usize, w: usize| -> u64 {
    let base = arr_off + row * w;
    let mut v = 0u64;
    for k in 0..w {
      v |= (columns[base + k] as u64) << (8 * k);
    }
    v
  };
  let off_table = 0usize;
  let off_number = ncol * str_w;
  let off_type = off_number + ncol * 2 + ncol * str_w;
  // A column Type word: 0x8000 marks the stored value present (always set here);
  // 0x0800 marks a string type; 0x2000 marks a primary-key column; for integer
  // columns the low byte is the storage size (2 or 4 bytes).

View on GitHub (pinned to 89f33cbef2)

When it happens

Trigger: Thrown at cli/tools/desktop.rs:4991 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of denoland/deno@89f33cbef2 (2026-08-16). Data as JSON: /api/errors/d01b298f2fe97b97. Report an issue: GitHub.