Skip to content

fix(image): discard stale async decode results - #35

Merged
joaner merged 1 commit into
ioai-tech:mainfrom
joaner:fix/image-discard-stale-async-decode
Jul 26, 2026
Merged

fix(image): discard stale async decode results#35
joaner merged 1 commit into
ioai-tech:mainfrom
joaner:fix/image-discard-stale-async-decode

Conversation

@joaner

@joaner joaner commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Description

Guard asynchronous image decode and bitmap-cache results with the worker runtime epoch. Results that finish after reset/dispose are closed and discarded instead of being rendered or cached.

Motivation / related issue

A JPEG, PNG, compressed-depth, or bitmap conversion started before a seek or topic switch can complete after the worker is reset. It could previously repaint or cache a stale frame.

Type of change

  • Bug fix (non-breaking change that fixes an issue)

Checklist

  • npm run lint passes with no errors
  • npm test passes (649 tests)
  • npm run build and npm run build:lib succeed
  • New behavior is covered by tests
  • Documentation updated (README, API.md, EMBEDDING.md) if the public API changed — N/A, no public API change

Additional verification: npm run typecheck and Playwright H.264/compressed-depth image tests.

Re-submitted via fork workflow (replaces closed upstream PR #33).

Co-authored-by: joaner <joaner@users.noreply.github.com>
@joaner
joaner merged commit 3def78a into ioai-tech:main Jul 26, 2026
2 checks passed
@joaner joaner mentioned this pull request Jul 26, 2026
1 task
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