Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] Global recording no longer reachable on current when going out of scope #5077

Open
Wumpf opened this issue Feb 7, 2024 · 0 comments
Open
Labels
🪳 bug Something isn't working 🌊 C++ API C/C++ API specific user-request This is a pressing issue for one of our users

Comments

@Wumpf
Copy link
Member

Wumpf commented Feb 7, 2024

#include <rerun.hpp>

int main() {
    const auto rec = rerun::RecordingStream("rerun_example_0");
    rec.connect().exit_on_failure();

    {
        const auto rec2 = rerun::RecordingStream("rerun_example_1");
        rec2.connect().exit_on_failure();
        rec2.set_global();
    }

    rec.log("recording0", rerun::Points3D({{0.0f, 0.0f, 0.0f}}));
    rerun::RecordingStream::current().log("recording1", rerun::Points3D({{0.0f, 0.0f, 0.0f}}));
}

this will only log to the first recording. This isn't what we documented on set_global:

        /// Replaces the currently active recording for this stream's store kind in the global scope
        /// with this one.
        ///
        /// Afterwards, destroying this recording stream will *not* change the global recording
        /// stream, as it increases an internal ref-count.
        void set_global() const;

TODO: Does this also affect Rust?

@Wumpf Wumpf added 🪳 bug Something isn't working 🌊 C++ API C/C++ API specific user-request This is a pressing issue for one of our users labels Feb 7, 2024
@Wumpf Wumpf added this to the 0.19 - Dataframe and web video milestone Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 🌊 C++ API C/C++ API specific user-request This is a pressing issue for one of our users
Projects
None yet
Development

No branches or pull requests

1 participant