Ignore empty crash report files - #14730
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Watcher re-registration can clear active reservations and cause duplicate crash processing.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Prevents empty crash-report placeholders from generating false telemetry while allowing later writes to be processed.
Changes:
- Tracks pending delayed reads per crash filename.
- Leaves zero-byte crash reports untouched.
File summaries
| File | Description |
|---|---|
Extension/src/LanguageServer/extension.ts |
Updates crash-file scheduling and empty-file handling. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
Overlapping pending reports can incorrectly clear the shared crash-writing telemetry flag.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes correctly handle empty reports and overlapping delayed reads without altering non-empty report parsing.
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Summary
Prevent empty native crash-report placeholders from being classified and uploaded as crashes. Track delayed reads per file so a later write to the same file is still processed normally.
Root cause
The crash watcher introduced in #11858 assumes every file change represents a completed report. The missing-signal fallback added in #13493 consequently classifies a zero-byte file as
SIGMISSING, logs it as a crash, and deletes it. A report file can be observed before its crash header has been written, which can produce false telemetry and remove the path before a later real crash writes its report.Fix
Use a per-file pending set only while a delayed read is scheduled. Release the filename before reading, and leave zero-byte files untouched without logging telemetry. A later write can then produce another change event and schedule normal processing, while non-empty crash-report parsing remains unchanged.