You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
frontend: Fallback warning: answer warnings after shutdown, and align the cb docs #2369
Two follow-ups from the coordinator review of #2238 (#2238 (review)), the shared fallback warning (#2218). Both were non-blocking.
A warning after shutdown is never answered.closeWindow() calls FallbackWarning::SetMainWindow(nullptr) and flushes the posted events. A Warn() that comes after that (for example from a source's destroy during shutdown) is queued to an event loop that no longer runs, so its cb is never called. A caller that frees param in cb leaks it. This breaks the "called once" contract of obs_frontend_warn_fallback().
frontend/utility/FallbackWarning: after SetMainWindow(nullptr), Warn() logs as before and then calls cb(param, true) at once, inside the call. A mutex that both take makes the order clear: a warning posted before shutdown is answered by the flush, a later one at once. SetMainWindow(window) starts the queue again.
docs/fallback-warning.md and docs/sphinx/reference-frontend-api.rst: cb is never called inside the call while OBS runs; without the OBS frontend and after shutdown, it is (with true).
Acceptance criteria
RED then GREEN: a case in test_fallback_warning_queue that warns after SetMainWindow(nullptr) gets exactly one answer, accepted=true, inside the call, with the log line. It passes with and without the frontend's Rust.
The existing queue, dialog and API tests still pass.
The policy doc and the API reference say the same thing about when cb runs.
Activity
zackees commentedon Oct 25, 2026
Claiming: #2369.
test: clang-format the after-shutdown case (#2369)
frontend: Answer a fallback warning that comes after shutdown (GREEN, #…
frontend: Answer a fallback warning that comes after shutdown (obs-ru…