Skip to content

A log file loader has one owner: the viewer's loader set - #56

Merged
trissim merged 1 commit into
mainfrom
claude-a/log-loader-one-owner
Nov 17, 2026
Merged

trissim merged 1 commit into
mainfrom
claude-a/log-loader-one-owner

Conversation

@trissim

@trissim trissim commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

The 0.10.0 release run segfaulted in test_visible_log_viewer_discovers_server_started_after_initial_scan teardown. LogFileLoader had two lifetime owners: parent=self (Qt children) and a queued finished → deleteLater. cleanup() waited and dropped it; the queued deleteLater then ran in teardown on an object Qt had torn down (gdb: ~QObject from a DeferredDelete). Now the _file_loaders set is the one owner; no Qt parent, no deleteLater. tests/test_log_viewer_lifecycle.py: 11 passed (was a segfault at test 5).

🤖 Generated with Claude Code

https://claude.ai/code/session_016gZLdupVQyBzHTmHBC9Cyn

LogFileLoader was created with parent=self (the viewer's Qt children delete it) and its
finished signal also queued deleteLater: two owners of one lifetime. cleanup() waited for the
thread and dropped it, then the queued finished -> deleteLater ran in teardown on an object Qt
had already torn down: segfault in test_visible_log_viewer_discovers_server_started_after_
initial_scan, which failed the 0.10.0 release run. Now the loader set owns it; a finished
loader leaves the set and Python frees it; cleanup waits before clearing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdupVQyBzHTmHBC9Cyn
@trissim
trissim merged commit 568886a into main Nov 17, 2026
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