Skip to content

Infinite loop if trace is too short in time #18

Description

@Axel-Reactor

For very short traces, TimelineModel::UpdateMemoryGraph sets bucket_step to <1:
double bucket_step = duration / (double)kNumBuckets;

This then gets cast into an uint64_t and truncated to just 0 when passed to RmtDataTimelineCreateHistogram which then asserts:
RMT_ASSERT_MESSAGE(bucket_width_in_rmt_cycles > 0, "Parameter bucketWidthInCycles must be larger than 0 cycles.");

And then later CreateHistogramJob just loops forever here:
for (int32_t current_series_index = 0; current_series_index < input_parameters->timeline->series_count; ++current_series_index)

Activity

  1. ahosier commented on Jun 16, 2025

    @ahosier
    Contributor

    Hi Axel-Reactor,

    Thank you for spotting this. RMV wasn't really designed for very short traces. However, this is a bug and should be fixed. We'll aim to get a fix into a future release and will update this issue when the fix is public.

    Thanks for you interest in RMV,
    Tony.

  2. ahosier commented on Jul 10, 2025

    @ahosier
    Contributor

    Hi Axel-Reactor,

    With respect to this issue, if you could provide an rmv trace file showing this issue, it would be extremely useful.

    Thanks,
    Tony.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions