Skip to content

[eve7] Clear a scene's output after streaming it to a new connection - #24017

Merged
linev merged 1 commit into
root-project:masterfrom
osschar:reve-connect-stream
Nov 6, 2026
Merged

linev merged 1 commit into
root-project:masterfrom
osschar:reve-connect-stream

Conversation

@osschar

@osschar osschar commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Bug fix, to be backported to 6.42.

REveManager::WindowConnect() streams the world and the mandatory scenes to a new
connection and leaves the output in the scenes. The next change cycle then sends
that full stream to every client once more, and the client reinitializes every
controller via onEveManagerInit(), as if the initial connection were made. The MIR
path that subscribes a viewer to a scene later leaves the output in the same way,
so there the new client receives the stream twice.

The output is now cleared after each direct send, REveScene::ClearOutput(). Three
files, +19 lines.

REveManager::WindowConnect() streams the world and the mandatory scenes
to the new connection with StreamElements() and sends the output to that
connection only, but leaves it in the scene. The next change cycle then
runs SendChangesToSubscribers(), which sends whatever output a scene holds
to every subscriber: every client received the full StreamElements of the
world and of the mandatory scenes once more, re-ran onEveManagerInit(),
rebuilt the summary tree and closed the editor. The same happened in the
MIR path that subscribes a viewer to a scene later, where SendSceneChanges()
follows the direct send immediately, so the new client got the full stream
twice.

Added REveScene::ClearOutput(), which drops fOutputJson, fOutputBinary and
fTotalBinarySize, and call it after each direct send in both paths.
SendChangesToSubscribers() uses it for the clearing it already did.

Verified in the browser on track_set_collection.C: the editor of the track
set stays open across the first MIR after a page load; before the change
the first MIR closed it.

Assisted-by: Claude:Fable 5.1
@osschar
osschar requested a review from linev as a code owner November 5, 2026 22:25
@linev linev added this to the 6.42.00 milestone Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 10h 47m 24s ⏱️
 3 881 tests  3 881 ✅ 0 💤 0 ❌
75 992 runs  75 992 ✅ 0 💤 0 ❌

Results for commit 8911b93.

@linev
linev merged commit 76948cf into root-project:master Nov 6, 2026
30 checks passed
@linev

linev commented Nov 6, 2026

Copy link
Copy Markdown
Member

/backport to 6.42

@root-project-bot

Copy link
Copy Markdown

Preparing to backport PR #24017 to branch 6.42 requested by linev

@root-project-bot

Copy link
Copy Markdown

This PR has been backported to branch 6.42: #24033

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.

3 participants