Skip to content

Stop reading an ESE database at the end of a file cut short - #359

Merged
abrignoni merged 2 commits into
mainfrom
fix/ese-truncated-file
Sep 28, 2026
Merged

abrignoni merged 2 commits into
mainfrom
fix/ese-truncated-file

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Stops a truncated ESE database from hanging the run.

  • The vendored ESE reader waits forever for a page past the end of a file cut short, such as a partial copy. scripts/ese_rows.ESEDatabase reads pages the same way but raises there instead, and TableRows stops that table, keeps the records read before it and names the table and page in the run log.
  • WebCache, SRUM, Windows Search, the Thumbnail Cache and BITS open their databases with it.
  • Copies of each of those files cut to 90, 75, 50 and 25 percent of its length now finish in seconds; the eight run on main all hung. The four registered Windows images give the same rows as before. Notes say so.

🤖 Generated with Claude Code

abrignoni and others added 2 commits September 28, 2026 01:52
The vendored reader's getPage reads until it has a whole page, so a page
past the end of a truncated copy made it wait forever and the run never
finished. ESEDatabase is the vendored reader with a getPage that raises
PageOutOfRange there instead. TableRows stops a table at such a page,
keeps the records read before it and names the table and page in the run
log. WebCache, SRUM, Windows Search, the Thumbnail Cache and BITS open
their databases with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each ESE artifact's notes now say that a table in a database file cut
short is read up to the first of its pages past the end of the file and
that the run log names it, with what copies of a tested image's file cut
to 90, 75, 50 and 25 percent of its length gave.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@abrignoni
abrignoni merged commit 85e5d0d into main Sep 28, 2026
11 checks passed
@abrignoni
abrignoni deleted the fix/ese-truncated-file branch September 28, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant