-
Notifications
You must be signed in to change notification settings - Fork 0
QWK.NET ‐ Troubleshooting
This guide helps diagnose and resolve common issues when working with QWK.NET. For detailed explanations of format behaviour, see the linked canonical documentation.
Symptom: QwkFormatException thrown when opening packet in Strict mode.
Likely Cause: Packet contains structural errors or missing required fields that violate the QWK specification.
What to Check:
- Exception message and
Locationproperty for specific error details - Whether packet is genuinely malformed or just uses format variations
- If packet works in Lenient mode (indicates format variation, not corruption)
Where to Read Next:
- Validation Modes - How Strict mode differs from Lenient
- QWK Format Notes - Common format variations that cause Strict mode failures
Symptom: QwkPacket.Open() throws exception or returns null.
Likely Cause: Archive format not supported, file corruption, or missing required files (CONTROL.DAT, MESSAGES.DAT).
What to Check:
- Archive format (ZIP is built-in, other formats require extensions)
- File exists and is readable
- Archive contains
CONTROL.DATandMESSAGES.DATfiles - Try Salvage mode for corrupted archives
Where to Read Next:
- API Overview - Supported archive formats and entry points
- Validation Modes - Salvage mode for damaged packets
Symptom: Packet opens but packet.Messages is empty or missing expected messages.
Likely Cause: Malformed message headers, incorrect block counts, or truncated MESSAGES.DAT file.
What to Check:
- Validation report for warnings about message parsing
- Whether messages appear in Lenient/Salvage modes but not Strict
-
MESSAGES.DATfile size matches expected content
Where to Read Next:
- Validation Modes - How validation modes handle malformed messages
- QWK Format Observations - Message header variations and quirks
Symptom: ValidationReport contains numerous warnings but packet appears to work.
Likely Cause: Packet uses format variations common in real-world BBS packets (date formats, missing fields, etc.).
What to Check:
- Warning messages to identify specific issues
- Whether warnings are about format variations (normal) or corruption (problematic)
- If packet data is still usable despite warnings
Where to Read Next:
- Validation Modes - When warnings are normal vs problematic
- QWK Format Observations - Message header variations and quirks
Symptom: ValidationReport.Errors contains entries even in Lenient mode.
Likely Cause: Structural errors that prevent parsing but don't halt processing (e.g., corrupted index entries, malformed headers).
What to Check:
- Error messages and locations for specific issues
- Whether errors prevent data access or are just logged
- If Salvage mode recovers more data
Where to Read Next:
- Validation Modes - Error vs warning distinction
- INDEX_FILES_NDX.md - Index-related errors
Symptom: Packet that should be valid fails validation.
Likely Cause: Using Strict mode with packets containing format variations, or validation logic detecting legitimate issues.
What to Check:
- Validation mode (Strict vs Lenient)
- Specific validation error messages
- Whether packet works correctly in Lenient mode
Where to Read Next:
- Validation Modes - Choosing the right validation mode
- QWK Format Observations - Format variations that may cause validation issues
Symptom: BBS names or message content show accented letters or symbols instead of box-drawing characters.
Likely Cause: Wrong encoding used when reading or displaying packet content (e.g., Latin-1 instead of CP437).
What to Check:
- Whether QWK.NET is being used correctly (uses CP437 by default)
- If custom encoding is being applied incorrectly
- Console or display system encoding settings
Where to Read Next:
- Encoding and CP437 - Encoding symptoms and solutions
Symptom: Names with accents (e.g., José) display as José or Jos?.
Likely Cause: CP437 accented characters decoded with wrong encoding or fallback policy.
What to Check:
- Encoding used for text display
- Fallback policy settings
- Whether issue occurs during reading or display
Where to Read Next:
- Encoding and CP437 - Accented character handling
Symptom: Message bodies appear as single lines or breaks in wrong places.
Likely Cause: 0xE3 line terminators not being processed correctly, or wrong LineEndingMode used.
What to Check:
-
LineEndingModesetting if custom processing used - Whether
message.Body.Linesproperty works correctly - Raw text content for 0xE3 terminators
Where to Read Next:
- Encoding and CP437 - Line ending handling
- API Overview - Message body API
Symptom: Messages appear out of sequence or missing messages in sequence.
Likely Cause: Corrupted or incorrect index file, or index file from different packet version.
What to Check:
- Validation report for index-related warnings
- Whether sequential enumeration produces correct order
- If index file matches current
MESSAGES.DATcontent
Where to Read Next:
- Index Files (.NDX) - Index file problems and solutions
- Validation Modes - How validation handles index issues
Symptom: Some messages not accessible via index, but present in MESSAGES.DAT.
Likely Cause: Index entries skipped due to invalid offsets, or index file incomplete.
What to Check:
- Validation report for skipped index entries
- Whether messages accessible via sequential enumeration
- Index file entry count vs actual message count
Where to Read Next:
- Index Files (.NDX) - Incorrect entry count problems
- Validation Modes - Index validation behaviour
Symptom: Warnings about index file size, negative offsets, or offsets beyond file size.
Likely Cause: Corrupted index file, truncated file, or index from different packet.
What to Check:
- Specific error messages in validation report
- Index file size (must be multiple of 4 bytes)
- Whether sequential enumeration works as fallback
Where to Read Next:
- Index Files (.NDX) - Common index file problems
- Validation Modes - Index error handling
Symptom: packet.Control.BbsName is empty or "UNKNOWN", or other fields missing.
Likely Cause: Empty or missing required fields in CONTROL.DAT, or validation mode applied defaults.
What to Check:
- Validation report for missing field warnings
- Whether fields are truly missing or just empty strings
- Validation mode used (Strict vs Lenient)
Where to Read Next:
- Index Files (.NDX) - Empty or missing fields
- Validation Modes - Default value handling
Symptom: Conference numbers have gaps or don't start at 0.
Likely Cause: Non-sequential conference numbering (common in real-world packets).
What to Check:
- Whether gaps are intentional (conferences deleted/renumbered)
- If messages reference non-existent conferences
- Validation report for conference-related warnings
Where to Read Next:
- QWK Format Observations - Conference number gaps
- QWK Format Notes - Variations
Symptom: Long headers or extension files not accessible despite being present.
Likely Cause: Kludges not parsed correctly, or extension files not detected in archive.
What to Check:
- Whether
TOREADER.EXTorTODOOR.EXTfiles exist in archive - If long headers are in message kludges collection
- Archive file listing for extension files
Where to Read Next:
- QWKE Observations - QWKE feature detection and parsing
- API Overview - QWKE API usage
Symptom: packet.Control.CreatedAt or message.DateTime is DateTime.MinValue.
Likely Cause: Invalid or unparseable date format in packet.
What to Check:
- Validation report for date parsing warnings
- Raw date strings in
CONTROL.DATor message headers - Whether date format is supported variant
Where to Read Next:
- QWK Format Observations - Date format variations
- Validation Modes - Date handling in different modes
Always examine packet.ValidationReport for detailed issue information:
ValidationReport report = packet.ValidationReport;
if (!report.IsValid)
{
Console.WriteLine(report.ToHumanReadableString());
// Or export for analysis:
File.WriteAllText("report.json", report.ToJson(indented: true));
}If packet fails in one mode, try others:
- Strict → Lenient: Often resolves format variation issues
- Lenient → Salvage: May recover data from corrupted packets
When debugging, access raw properties to see original bytes:
-
message.Body.RawText- Original message body bytes -
packet.Control.RawLines- Original CONTROL.DAT lines - Index entry
RawMsbinBytes- Original MSBIN float bytes
- Validation Modes - Complete validation mode reference
- QWK Format Observations - Real-world format variations
- Encoding and CP437 - Encoding troubleshooting
- Index Files (.NDX) - Index file problems
- QWKE Observations - QWKE-specific issues
- API Overview - API reference and examples