Skip to content

fix: macOS player-swap deadlock, stray timeline view flash, CLI EOF exit#544

Merged
FelipeDefensor merged 7 commits into
TimeLineAnnotator:devfrom
azfoo:fix/stray-timeline-view
Jun 23, 2026
Merged

fix: macOS player-swap deadlock, stray timeline view flash, CLI EOF exit#544
FelipeDefensor merged 7 commits into
TimeLineAnnotator:devfrom
azfoo:fix/stray-timeline-view

Conversation

@azfoo

@azfoo azfoo commented May 22, 2026

Copy link
Copy Markdown
Collaborator
  • tilia/media/loader.py — When swapping player types, explicitly call QCoreApplication.sendPostedEvents(None, DeferredDelete). On macOS deferred deletions do not reliably flush (it can block on platform events first); the direct sendPostedEvents call bypasses the platform dispatcher and ensures the old widget — particularly QWebEngineView — is truly destroyed before the new player is created, preventing a macOS deadlock.

  • tilia/ui/timelines/collection/collection.py — Embed TimelineView into the scene before constructing TimelineUI. Prevents an un-parented view from flashing when a timeline's constructor opens a dialog.

  • tilia/ui/cli/ui.py — Treat EOF on stdin as a clean exit (code 0) rather than an error. The CI smoke check now pipes about + quit into the CLI instead of using a background process, and QT_DEBUG_PLUGINS is scoped to the GUI launch only so plugin noise no longer interleaves with CLI output.

azfoo added 4 commits May 21, 2026 14:59
If a TimelineUI has dialogs that open during the creation of the timeline, the un-parented TimelineView flashes temporarily while the dialog is shown. Setting the proxy earlier prevents this.
EOF on stdin is a normal termination signal - exit code 0 rather than 1.
Update the CI smoke check to run the CLI so it exits immediately and cleanly without a misleading warning.
When swapping player types, the old widget's deleteLater() is not
processed by processEvents() reliably on macOS. Use
sendPostedEvents(None, DeferredDelete) instead to directly dispatch
the deferred deletion before the new player is created.

Updates the regression test to exercise the real production path:
load local video, then load YouTube (which triggers the swap), and
assert the update request reaches the new window without crashing.
@azfoo azfoo changed the base branch from main to dev May 22, 2026 21:55
@azfoo azfoo requested a review from FelipeDefensor May 22, 2026 21:58
@azfoo azfoo mentioned this pull request May 25, 2026
@FelipeDefensor FelipeDefensor modified the milestones: 0.6.2, 0.6.3 May 27, 2026
azfoo added 2 commits June 1, 2026 22:42
led to opening to a blank app without a slider tl
QtWebEngineProcess stays alive as an orphan on macOS after
deleteLater() is called, preventing the pytest-xdist worker from
exiting and hanging the CI job for 30 minutes.

Navigate to about:blank and flush the Qt event queue after the
module finishes so the engine cleans up before the worker exits.
@azfoo azfoo force-pushed the fix/stray-timeline-view branch from c575648 to d3100be Compare June 3, 2026 18:32
h = get(Get.TIMELINE, id).get_data("height")
scene = self.create_timeline_scene(id, w, h)
view = self.create_timeline_view(scene)
view.proxy = self.scene.addWidget(view)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is preventing the flashing the only reason why we have the proxy? In any case, we should add a comment explaining its raison d'être.

@FelipeDefensor

FelipeDefensor commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

LGTM, I just need to test this on my Mac before final approval.

P.S.: Thank you for getting rid of the flashing.

@FelipeDefensor

Copy link
Copy Markdown
Collaborator

Can't test this thoroughly before solving #548. Will try to do that today.

@FelipeDefensor FelipeDefensor merged commit 5abe819 into TimeLineAnnotator:dev Jun 23, 2026
11 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.

2 participants