Fix RSITimerTest::noPopupBreak
ClosedPublic

Authored by wojnilowicz on Mar 30 2020, 3:06 PM.

Details

Summary

m_shortInputCounter is initialized in RSITimer::suggestBreak only.
Non-null m_shortInputCounter is needed in RSITimer::timeout in case of
TimerState::Resting.
In no pop-up mode RSIBreak goes to RSITimer::timeout omitting
RSITimer::suggestBreak which results in trying to tick uninitialized
m_shortInputCounter.
This patch makes sure that m_shortInputCounter is always initialized.

Diff Detail

Repository
R368 RSIBreak
Branch
fix-tests
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24476
Build 24494: arc lint + arc unit
wojnilowicz requested review of this revision.Mar 30 2020, 3:06 PM
wojnilowicz created this revision.
aacid added a comment.Mar 30 2020, 9:12 PM

Is this an actual problem with the app or just a test fix (i.e. do i need to make a release to fix a potential crash?)

src/rsitimer.cpp
318

So you change this from 2,2,1 to 2,1,1

that ok?

wojnilowicz marked an inline comment as done.Mar 31 2020, 5:48 AM

Is this an actual problem with the app or just a test fix (i.e. do i need to make a release to fix a potential crash?)

Yes, it will crash in certain configuration (showing popup disabled). I think, you need to make a new release.

src/rsitimer.cpp
318

Yes. Number in the middle has no other meaning than to indicate, that this counter got activated and it does that by showing any positive and non-zero value.

wojnilowicz marked an inline comment as done.Mar 31 2020, 5:49 AM
This revision was not accepted when it landed; it landed in state Needs Review.Apr 4 2020, 2:44 PM
Closed by commit R368:4a52ca7bc582: Fix crash when not using popup (authored by wojnilowicz, committed by aacid). · Explain Why
This revision was automatically updated to reflect the committed changes.