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

Fix enum plot crashes #1673

Merged
merged 1 commit into from
Mar 7, 2025
Merged

Fix enum plot crashes #1673

merged 1 commit into from
Mar 7, 2025

Conversation

knoellle
Copy link
Contributor

@knoellle knoellle commented Mar 7, 2025

Why? What?

On main twix crashes reliably when an enum plot panel is open, twix is set to automatically connect to localhost and a replayer is started.
The root cause is that the subscription goes through before the replayer replays the first frame, causing the response to the subscription request to contain data from the Default element of the buffered_watch channel, which is a default database timestamped at SystemTime::UNIX_EPOCH.

Since the enum plot panel has to calculate the range for its X-axis, mixing unix epoch timestamps with about now timestamps breaks the f32 resolution used for the range calculation.
A proper fix would require rethinking what data should be transmitted by the communication server, which probably would result in some major changes in communication. This PR is just a hotfix to filter the bad updates on the client side.

Fixes #

ToDo / Known Issues

Ideas for Next Iterations (Not This PR)

How to Test

  • Start a replayer
  • Open twix with an enum plot panel and a valid subscription and connect to replayer
  • Close replayer and open it again
  • Twix should no longer crash

@knoellle knoellle added tools:Debug Tooling Related to twix et.al. is:Bugfix labels Mar 7, 2025
@knoellle knoellle enabled auto-merge March 7, 2025 15:56
Copy link
Member

@schmidma schmidma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, probably the best we can do for now

@knoellle knoellle added this pull request to the merge queue Mar 7, 2025
Merged via the queue into HULKs:main with commit ec6769a Mar 7, 2025
32 checks passed
@knoellle knoellle deleted the enum-plot-fix branch March 7, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:Bugfix tools:Debug Tooling Related to twix et.al.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants