#Tracy Instrumentation Failure

4 messages · Page 1 of 1 (latest)

warm crest
#

Tracy errors on my project shortly after starting (<10ms into running):

Instrumentation Failure
Profiling session terminated due to improper instrumentation.
Please correct your program and try again.
Reason: Too many source locations. You cannot have more than 32K static or dynamic source locations.

I am using Bevy 0.14.2 and Tracy Profiler 0.11.0.
I'm not sure what source locations are, in this context.

warm crest
#

I believe the problem has to do with despawn_recursive. Looking at Statistics in Tracy Profiler, it had all the expected systems, but also had 1000's of separate DespawnRecursive systems, each with a count of 1, each with a separate entity.

#

I found the code that was repeatedly despawning entities and switched despawn_recursive to just despawn, and this fixed the issue

#

It seems like its caused by

impl Command for DespawnRecursive {
    fn apply(self, world: &mut World) {
        #[cfg(feature = "trace")]
        let _span = bevy_utils::tracing::info_span!(
            "command",
            name = "DespawnRecursive",
            entity = bevy_utils::tracing::field::debug(self.entity)
        )
        .entered();
        despawn_with_children_recursive(world, self.entity);
    }
}

in bevy_hierarchy/src/hierarchy.rs