You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
App crash: Insulin momentum and prediction values can be calculated to become NaN #351
In the work for PR #349, I've noticed that it's possible for insulin momentum and prediction values to be calculated so that isNaN is true. It seems to be whenever there is a gap in the sensor data due to an error such as a SensorWeakSignal. I don't know enough to track this down to a root cause, but I have several stack traces that I will add in subsequent comments. I have not seen this particular error when using a G5 sensor, so at this point I'm assuming it's something that the x22 enlite code is doing that is causing the unexpected calculations.
That sounds like a good place to look next. I'll take a look and report findings back here. Would momentum calculations be thrown off if there are duplicate entries of the same value for the same time?
Yes, that could result in a divide-by-zero when calculating slope. There isn't a valid reason to have duplicate entries, though, right?
You're not using NaN as a sentinel anywhere, right?
Correct. Based on my current understanding, there's only valid sgv entries going in, but there may be duplicates that I'm not accounting for adequately.
I added a filter by date for the entries being added to the GlucoseStore to make sure that no duplicates are added, and the app did not crash during a sensor weak status like it did before the change. @loudnate thanks for pointing me in the right direction.
Activity
tmecklem commentedon Dec 31, 2016
Crash in DiagnosticLogger.addLoopStatus
tmecklem commentedon Dec 31, 2016
Crash in StatusChartManager
loudnate commentedon Dec 31, 2016
It sounds like you might be sending invalid or repeat glucose entries into GlucoseStore.
tmecklem commentedon Dec 31, 2016
That sounds like a good place to look next. I'll take a look and report findings back here. Would momentum calculations be thrown off if there are duplicate entries of the same value for the same time?
loudnate commentedon Dec 31, 2016
Yes, that could result in a divide-by-zero when calculating slope. There isn't a valid reason to have duplicate entries, though, right?
You're not using NaN as a sentinel anywhere, right?
tmecklem commentedon Dec 31, 2016
Correct. Based on my current understanding, there's only valid sgv entries going in, but there may be duplicates that I'm not accounting for adequately.
tmecklem commentedon Dec 31, 2016
I added a filter by date for the entries being added to the GlucoseStore to make sure that no duplicates are added, and the app did not crash during a sensor weak status like it did before the change. @loudnate thanks for pointing me in the right direction.
[LOOP-2385] Update the display of glucose values when unit changes (#351