-
Notifications
You must be signed in to change notification settings - Fork 369
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
Panic due to assertion chunk_id_removed.is_some()
#7992
Comments
chunk_id_removed.is_some()
chunk_id_removed.is_some()
The following The crash does not happen on the following (web) versions: The crash does happen on: |
I'll have a look but I'm removing the 0.20 milestone blocker in the meantime: these are just my usual too-paranoid-until-proven-wrong debug assertions, they have no impact on release builds whatsoever.
That's because these are release builds. |
Sounds good—thank you! I have encountered the assertion again in another context, again when logging a second time to an entity that has been statically logged before. The use case of (statically) logging two different archetypes to the same entity came up during #7500, where we need to log nodes and edges. |
Statically logging to the same entity multiple times is perfectly legitimate btw, and even something we encourage in some scenarios (e.g. soft real-time telemetry). Feel free to comment those |
Repro: use std::f32::consts::TAU;
use rerun::demo_util::color_spiral;
const NUM_POINTS: usize = 100;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let rec = rerun::RecordingStreamBuilder::new("rerun_example_dna_abacus").connect_tcp()?;
rec.set_time_seconds("stable_time", 0f64);
for _ in 0..100 {
let (points1, _colors1) = color_spiral(NUM_POINTS, 2.0, 0.02, 0.0, 0.1);
let (points2, colors2) = color_spiral(NUM_POINTS, 2.0, 0.02, TAU * 0.5, 0.1);
rec.log_static("/nodes", &rerun::Points3D::new(points1))?;
rec.log_static(
"/nodes",
&rerun::Points3D::new(points2).with_colors(colors2),
)?;
}
for _ in 0..100 {
let (points1, colors1) = color_spiral(NUM_POINTS, 2.0, 0.02, 0.0, 0.1);
let (points2, _colors2) = color_spiral(NUM_POINTS, 2.0, 0.02, TAU * 0.5, 0.1);
rec.log_static(
"/nodes",
&rerun::Points3D::new(points1).with_colors(colors1),
)?;
rec.log_static("/nodes", &rerun::Points3D::new(points2))?;
}
Ok(())
}
|
…ks (#8020) The assertion was correct 🥳🎈. There was a real memleak in there when dealing with partially dangling static chunks (simplifying a bit: those are static chunks being overwritten for some components but not all, which is a very niche use case, thus why we've never hit it until now). * Fixes #7992 cc @grtlr
Describe the bug
I'm currently working on the graph primitives and I'm encountering a panic when using
log_static
multiple times. Although, of course, there should only ever be a single call tolog_static
for a given entity, having multiple calls should not cause Rerun to crash.To Reproduce
Steps to reproduce the behavior:
I'm on branch #7500, and I'm using the following code:
If it helps, I can also share the complete example, including the unreleased
napkin
crate.Removing the
_static
makes the panic go away. Unortunately, I was not able to create a self-contained example yet, but I'm happy to try some more if it helps.Expected behavior
Rerun should not crash but rather emit an error / warning.
Backtrace
Desktop (please complete the following information):
Rerun version
#7500.
Additional context
The text was updated successfully, but these errors were encountered: