Skip to content

StandardDownloader.run's catch dereferences an entry that abort()/cleanup() already cleared #148

Closed

Description

@Nawid3333

Severity: low

Where: chrome/player/network/StandardDownloader.mjs (run, the .catch((err) => {...}) after getRequest())

What happens

.catch((err) => {
  console.error('Failed to get request for entry:', err);
  this.entry.onFail(this.loader.stats, this.entry, null);
  this.cleanup();
});

abort()/cleanup() set this.entry = null while getRequest() (the preProcessor) is still pending.

Failure scenario

A DASH segment aborted by a seek while preProcessFragment is awaiting, and the preProcessor then rejects: TypeError in the catch, an unhandled rejection. Harmless otherwise, since cleanup already ran.

Suggested fix

Return early from the catch when the downloader no longer owns an entry (if (!this.entry) return;).

Confidence: high.


From a line-by-line code review of the tree at 41363fd (2026-10-02). Each claim above was checked against the source before filing; the reproduction steps and line references are as of that commit.


Generated by Claude Code

Activity

  1. added
    bugSomething isn't working
    code-reviewFound by the 2026-10-02 line-by-line review
    on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcode-reviewFound by the 2026-10-02 line-by-line review

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions