Repository navigation
[AIPROFVIS-704] Show a message instead of a runaway spacer when a table filter matches nothing - #1219
Merged
Merged
Conversation
dhingora-amd
requested review from
a team,
Sajeeth-Wimalasuriyan,
amokiche-amd,
drchen-amd and
tomk-amd
as code owners
November 23, 2026 17:29
dhingora-amd
temporarily deployed
to
legacy-nightly
November 23, 2026 17:29 — with
GitHub Actions
Inactive
Security scan found no critical or high findings on lines changed by this pull requestView the security scan run for complete reports. “New” means the finding is located in a changed file on an added or modified line; it is not a base-versus-head findings delta. |
drchen-amd
reviewed
Nov 27, 2026
dhingora-amd
temporarily deployed
to
legacy-nightly
November 27, 2026 16:03 — with
GitHub Actions
Inactive
drchen-amd
approved these changes
Nov 27, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
When a table filter matched no rows, the table kept its header and filter row but drew a bottom spacer of
(total_row_count - (end_row + 1)) * row_height. Withtotal_row_count == 0that unsigned subtraction underflows, so the spacer was about 1.8e19 rows tall and pushed the layout cursor to ~5.7e20 px. ImGui then truncates the content size throughint, which overflows (undefined behaviour). On Linux the content height comes out at -9.2e18 and scrolling clamps to 0, but the result depends on the platform. The table also showed no message, because the no-data text is only drawn when there is no header.Technical Details
InfiniteScrollTable::Renderonly adds the bottom spacer when rows remain below the loaded window, so the subtraction can't underflow.total_row_count - 1in the fetch-more check can't underflow: it only runs when there are at least 2 rows.sys_event_table_empty_filter_scrollfills the Event Table from one track, filtersduration < 0, and checks for 0 rows and a laid-out table height of just the header and filter row.InfiniteScrollTableTestPeer(friended fromInfiniteScrollTable) to set a column filter and read the widget name, andAnalysisViewTestPeer::EventTablePtr().mainwith only the test added, the new test fails. With the fix, it passes. The rest of the trace UI suite has the same 5 failures on both builds.