Skip to content

Stop per-tick log flooding when referenced scenes are absent - #60

Open
lvkz wants to merge 2 commits into
StreamController:mainfrom
lvkz:fix/missing-scene-log-flood
Open

Stop per-tick log flooding when referenced scenes are absent#60
lvkz wants to merge 2 commits into
StreamController:mainfrom
lvkz:fix/missing-scene-log-flood

Conversation

@lvkz

@lvkz lvkz commented Aug 18, 2026

Copy link
Copy Markdown

When the active scene collection doesn't contain the scenes a deck page references — e.g. switching OBS to a lightweight "idle" collection while the page targets the full one — two per-tick status polls flood the log for as long as that collection stays active:

  1. SceneItem actions log Cannot find the scene item! unconditionally on every tick. A page with 58 SceneItem actions writes ~3,500 journal lines per minute.
  2. Filter actions crash on every tick: get_source_filter returns an empty dict (not None) when the scene/filter is missing, so the status is None guard passes and status["filterEnabled"] raises a KeyError through the rpyc netref — loguru then dumps a ~65-line traceback once per second.

On the affected machine this produced ~7,500 journal lines/minute, a 1 GB journald and 320 MB of app logs over five days.

Fixes

  • OBSController.get_scene_item_enabled: track already-reported (scene, item) pairs and warn once per pair, naming the pair so the message is actionable.
  • FilterBase.show_current_filter_status: treat an empty/keyless status as the existing UNKNOWN path instead of indexing it.

Testing

Applied to a live installation (StreamController 1.4.11-beta, OBS 32 with the deck page above, OBS parked in the idle collection):

last 60 s before after
scene-item warnings ~3,500 0 (19 one-shot warnings at startup, one per unique pair)
filter tracebacks ~60 0
total plugin journal lines ~7,500 25

Button behavior is unchanged — both patches touch only the read/status path; press handlers (set_scene_item_enabled, filter toggles) are untouched, and state display still resolves normally once the right collection is active.

lvkz added 2 commits August 18, 2026 18:25
Every SceneItem action polls get_scene_item_enabled once per tick. When the active scene collection does not contain the referenced scenes (e.g. a lightweight idle collection while the deck page targets the meeting one), each action logged the warning every second: a page with 58 SceneItem actions wrote ~3,500 journal lines per minute for as long as OBS stayed in that collection. Track already-reported (scene, item) pairs and warn once per pair, naming the pair so the message is actionable.
show_current_filter_status guarded against None, but the backend returns an empty dict when the scene or filter does not exist in the active scene collection. Indexing it raised a KeyError through the rpyc netref, and loguru dumped a ~65-line traceback on every tick -- one full traceback per second per filter action while another collection was active. Fall into the existing UNKNOWN path instead.
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