rtk-ai/rtk · error · anyhow::Error
legacy dictionary format is unsupported
Error message
legacy dictionary format is unsupported
What it means
skip_string_dictionary rejects binlog fileFormatVersion < 10, the legacy string-dictionary layout introduced before the modern format. This reader only understands the post-v10 dictionary encoding, so old binlogs fail explicitly.
Source
Thrown at src/cmds/dotnet/binlog.rs:512
if (file_format_version < 13 && read_importance) || (flags & FLAG_IMPORTANCE != 0) {
let _ = reader.read_7bit_i32()?;
}
Ok(result)
}
fn skip_build_event_context(reader: &mut BinReader<'_>, file_format_version: i32) -> Result<()> {
let count = if file_format_version > 1 { 7 } else { 6 };
for _ in 0..count {
let _ = reader.read_7bit_i32()?;
}
Ok(())
}
fn skip_string_dictionary(reader: &mut BinReader<'_>, file_format_version: i32) -> Result<()> {
if file_format_version < 10 {
anyhow::bail!("legacy dictionary format is unsupported");
}
let _ = reader.read_7bit_i32()?;
Ok(())
}
fn read_optional_string(
reader: &mut BinReader<'_>,
parsed: &ParsedBinlog,
) -> Result<Option<String>> {
read_deduplicated_string(reader, parsed)
}
fn read_deduplicated_string(
reader: &mut BinReader<'_>,
parsed: &ParsedBinlog,
) -> Result<Option<String>> {
let index = reader.read_7bit_i32()?;View on GitHub (pinned to 36788f6bd4)
Solutions
- Regenerate the log with a modern .NET SDK / MSBuild 17 (emits format 18)
- Do not attempt to parse binlogs older than format 10 with this tool
- Find a newer artifact, or convert the log via MSBuild Structured Log Viewer then re-export
Defensive patterns
Strategy: fallback
Validate before calling
fn binlog_supports_dictionary(bytes: &[u8]) -> bool {
if bytes.len() < 12 { return false; }
i32::from_le_bytes([bytes[8], bytes[9], bytes[10], bytes[11]]) >= 10
} Try / catch
match parse_events_from_binlog(&path) {
Ok(b) => use_events(&b),
Err(e) if e.to_string().contains("legacy dictionary") => {
eprintln!("pre-v10 binlog not supported; regenerate with a modern SDK");
}
Err(e) => return Err(e),
} Prevention
- Drop support targets below MSBuild 15.5-era formats
- Refresh old archived logs with new builds
- Document minimum supported binlog version for your tooling
When it happens
Trigger: read_event_fields encounters an event referencing the string dictionary while the binlog header's fileFormatVersion is below 10 — i.e., a binlog from a very old MSBuild (pre-2018 era, MSBuild 15.3 and earlier).
Common situations: Replaying ancient archived .binlog artifacts; legacy CI servers with very old .NET Framework MSBuild; vendored sample binlogs from old repos.
Related errors
- Failed to parse binlog at {}: unsupported binlog format {}
- Failed to parse binlog at {}: empty file
- negative record length: {}
- negative event length: {}
- unexpected end of stream
AI-assisted analysis of rtk-ai/rtk@36788f6bd4 (2026-09-03).
Data as JSON: /api/errors/3913759cd370122b.
Report an issue: GitHub.