Skip to content

Fix Text effect font-cache race to allow deterministic renders - #6959

Merged
derwin12 merged 2 commits into
xLightsSequencer:masterfrom
derwin12:fix-fontmanager-race
Aug 22, 2026
Merged

Fix Text effect font-cache race to allow deterministic renders#6959
derwin12 merged 2 commits into
xLightsSequencer:masterfrom
derwin12:fix-fontmanager-race

Conversation

@derwin12

Copy link
Copy Markdown
Contributor
  • Headless renders of a sequence with Text effects produced different .fseq output on every run (and could crash) due to a data race in FontManager::init() — its static font/name vectors were lazily
    populated behind a plain bool check with no synchronization, so concurrent frame-parallel render threads could race on the same push_back calls the first time a Text effect rendered.
  • Reproduced with back-to-back --headless renders of the same .xsq, --fseqcmp, and XL_VERIFY_STATELESS=1 (captured an ACCESS_VIOLATION inside FontManager::init under load).
  • Fix: guard FontManager::init() and FontManager::get_font_names() with std::call_once so the one-time population is properly serialized. No behavioral/data changes — same fonts, same order.

@derwin12
derwin12 merged commit 08925ac into xLightsSequencer:master Aug 22, 2026
3 checks passed
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