Skip to content

Fix GTK SIGABRT caused by dual reconnect racing into concurrent combo repopulation#18

Merged
gensyn merged 3 commits into
mainfrom
copilot/investigate-gtk-error
Apr 16, 2026
Merged

Fix GTK SIGABRT caused by dual reconnect racing into concurrent combo repopulation#18
gensyn merged 3 commits into
mainfrom
copilot/investigate-gtk-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 16, 2026

  • Add is_connected() guard in BaseCore.on_ready() to skip domain/entity loading when backend is not yet connected (prevents double-populate race at startup)
  • Add matching is_connected() guard in PerformAction.on_ready() before _load_actions()/_reload()
  • Update test_on_ready_not_connected in test_perform_action_on_ready.py to expect no loading calls when disconnected
  • All 73 backend tests pass

…ected

Prevents the intermittent GTK crash (gtk_list_tile_split assertion, SIGABRT)
caused by a race condition at startup: if the WebSocket connects fast enough,
both StreamController's direct on_ready() call and _on_connect()'s
GLib.idle_add(on_ready) land in the same GTK idle cycle before a frame render.
This results in two populate() calls on the same ComboRow widget with different
data, corrupting GTK's internal list-tile state.

Fix: return early from BaseCore.on_ready() and PerformAction.on_ready() when
the backend is not connected. _on_connect() already re-invokes on_ready() for
every registered action once the connection is established, so all combos are
populated exactly once with real data.

Agent-Logs-Url: https://github.com/gensyn/HomeAssistantPlugin/sessions/1e729528-c030-4bd3-a769-497949a9b022

Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
Copilot AI requested a review from gensyn April 16, 2026 10:30
@gensyn gensyn marked this pull request as ready for review April 16, 2026 10:57
@gensyn gensyn merged commit 272672b into main Apr 16, 2026
2 checks passed
@gensyn gensyn deleted the copilot/investigate-gtk-error branch April 16, 2026 10:58
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.

2 participants