Skip to content

#7400 | fix(synth): route effects cleanup through ManagedTimer#7788

Open
dhruvpatil972 wants to merge 1 commit into
sugarlabs:masterfrom
dhruvpatil972:#7400-timer-cleanup
Open

#7400 | fix(synth): route effects cleanup through ManagedTimer#7788
dhruvpatil972 wants to merge 1 commit into
sugarlabs:masterfrom
dhruvpatil972:#7400-timer-cleanup

Conversation

@dhruvpatil972

@dhruvpatil972 dhruvpatil972 commented Jul 11, 2026

Copy link
Copy Markdown

Summary

Replaces raw setTimeout inside _performNotes in js/utils/synthutils.js with setGuardedTimeout from ManagedTimer. This registers temporary audio effect node cleanups under the centralized timer management system, ensuring they are cancelled when playback is stopped and avoiding errors on disposed audio nodes.

Fixes #7400

PR Category

  • Bug Fix
  • Feature
  • Performance
  • Tests
  • Documentation
  • CI/CD

Changes

1. Synthesizer Utilities

  • Replaced raw setTimeout in _performNotes (js/utils/synthutils.js) with timerManager.setGuardedTimeout when available, falling back to raw setTimeout otherwise.

2. Logo & Widgets

  • Explicitly passed _timerManager to the Synth instance in js/logo.js and js/widgets/legobricks.js.

Verification

  • npm test — Passed 6,744/6,744 tests across all 190 suites ✅
  • npm run lint — Passed cleanly on modified files ✅

@github-actions github-actions Bot added bug fix Fixes a bug or incorrect behavior size/M Medium: 50-249 lines changed area/javascript Changes to JS source files feature Adds new functionality tests Adds or updates test coverage performance Improves performance (load time, memory, rendering) documentation Updates to docs, comments, or README ci Changes to CI/CD workflows and automation labels Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/javascript Changes to JS source files bug fix Fixes a bug or incorrect behavior ci Changes to CI/CD workflows and automation documentation Updates to docs, comments, or README feature Adds new functionality performance Improves performance (load time, memory, rendering) size/M Medium: 50-249 lines changed tests Adds or updates test coverage

Projects

Development

Successfully merging this pull request may close these issues.

_performNotes uses raw setTimeout for effect cleanup instead of ManagedTimer, leaving stale cleanup callbacks after Stop

1 participant