Skip to content

Conversation

@deanlee
Copy link
Contributor

@deanlee deanlee commented Dec 1, 2025

Switching streams could freeze the UI because the previous stream object was destroyed synchronously. Its destructor could trigger a BlockingQueuedConnection (see link below), which blocks the main thread and causes Cabana to hang:

replay->onSegmentsMerged = [this]() { QMetaObject::invokeMethod(this, &ReplayStream::mergeSegments, Qt::BlockingQueuedConnection); };

Using deleteLater() defers the destruction to Qt’s event loop, avoiding the blocking call and preventing the hang.

Reproduction steps:

  1. Run: cabana "<route>"
  2. In the File menu, choose Open Stream and open another stream.
  3. The UI may hang at this point.

@github-actions github-actions bot added the tools label Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant