Skip to content

Conversation

@excaliburtb
Copy link
Contributor

@excaliburtb excaliburtb commented Dec 16, 2025

Fixes #2015

@excaliburtb excaliburtb marked this pull request as draft December 16, 2025 22:37
@coveralls
Copy link

coveralls commented Dec 16, 2025

Coverage Status

coverage: 55.709% (+0.09%) from 55.624%
when pulling c90850b on excaliburtb:2015-datalog_run_time_set_cycle_isnt_robust
into d49130d on nasa:master.

@ddj116
Copy link
Contributor

ddj116 commented Jan 16, 2026

@excaliburtb I lost track of this one over the holiday, I can't recall were you waiting on us to test this branch out in ramtares?

long long cycle_tics = (long long)round(rate_in * Trick::JobData::time_tic_value);
rate_in_tics = cycle_tics;
next_cycle_in_tics= exec_get_time_tics();
if((curr_tic % cycle_tics) != 0)
Copy link
Contributor

@ddj116 ddj116 Feb 6, 2026

Choose a reason for hiding this comment

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

I found an instance of Ramtares users calling dr_group.set_cycle(0.0) in the input file today. It ends up throwing a floating point exception. Will fix on our end but it'd be a nice update to have a check for this to prevent the divide by zero. Not sure what the Trick way of handling this is but an ALL CAPS FLASHING RED TEXT ALERT IS NOT NEARLY ENOUGH.

Image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lol. sorry that FPE's aren't severe enough of a signal to not do that. I'll add some code to dox the user and have hitman-looking person stop by user's houses.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's a good ask. i'll try to include it in this PR

@excaliburtb excaliburtb force-pushed the 2015-datalog_run_time_set_cycle_isnt_robust branch from 28e4670 to 7d15a78 Compare February 6, 2026 15:12
@excaliburtb excaliburtb marked this pull request as ready for review February 7, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

datalog run-time set_cycle isn't robust

3 participants