lelandjansen / fatigue

Pilot fatigue self-assessment app.
https://apps.apple.com/app/fatigue/id1211561428
Apache License 2.0
2 stars 0 forks source link

Questionnaire result sometimes does not count up #85

Closed lelandjansen closed 7 years ago

lelandjansen commented 7 years ago

After completing the questionnaire sometimes the risk score does not count up. Note that the risk score is calculated correctly and is correctly displayed in the risk score history table.

Example response that triggers the bug: (Pilot) 6, 13, 10, Y, 1, N, 5, Y, Y, N, N

Following this sequence once also crashed the emulator (unable to replicate).

2017-07-19 23:11:01.826 fatigue[9862:12047088] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'attempt to scroll to invalid index path: <NSIndexPath: 0x61800003d860> {length = 2, path = 0 - 10}'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000105788b0b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x0000000104b73141 objc_exception_throw + 48
    2   CoreFoundation                      0x00000001057f1625 +[NSException raise:format:] + 197
    3   UIKit                               0x0000000106d30793 -[UICollectionView _contentOffsetForScrollingToItemAtIndexPath:atScrollPosition:] + 216
    4   UIKit                               0x0000000106d311c4 -[UICollectionView scrollToItemAtIndexPath:atScrollPosition:animated:] + 70
    5   fatigue                             0x0000000103e3affe _TFC7fatigue23QuestionnaireController14moveToNextPagefT_T_ + 686
    6   fatigue                             0x0000000103e4036f _TTWC7fatigue23QuestionnaireControllerS_21QuestionnaireDelegateS_FS1_14moveToNextPagefT_T_ + 63
    7   fatigue                             0x0000000103e33767 _TFC7fatigue17YesNoQuestionCell9handleYesfT_T_ + 439
    8   fatigue                             0x0000000103e337c2 _TToFC7fatigue17YesNoQuestionCell9handleYesfT_T_ + 34
    9   UIKit                               0x00000001063edd82 -[UIApplication sendAction:to:from:forEvent:] + 83
    10  UIKit                               0x00000001065725ac -[UIControl sendAction:to:forEvent:] + 67
    11  UIKit                               0x00000001065728c7 -[UIControl _sendActionsForEvents:withEvent:] + 450
    12  UIKit                               0x0000000106571802 -[UIControl touchesEnded:withEvent:] + 618
    13  UIKit                               0x00000001069171f9 _UIGestureEnvironmentSortAndSendDelayedTouches + 5553
    14  UIKit                               0x0000000106912210 _UIGestureEnvironmentUpdate + 1409
    15  UIKit                               0x0000000106911c43 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 484
    16  UIKit                               0x0000000106910e0a -[UIGestureEnvironment _updateGesturesForEvent:window:] + 274
    17  UIKit                               0x000000010645ceea -[UIWindow sendEvent:] + 4092
    18  UIKit                               0x0000000106409a84 -[UIApplication sendEvent:] + 352
    19  UIKit                               0x0000000106bed5d4 __dispatchPreprocessedEventFromEventQueue + 2926
    20  UIKit                               0x0000000106be5532 __handleEventQueue + 1122
    21  CoreFoundation                      0x000000010572ec01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    22  CoreFoundation                      0x00000001057140cf __CFRunLoopDoSources0 + 527
    23  CoreFoundation                      0x00000001057135ff __CFRunLoopRun + 911
    24  CoreFoundation                      0x0000000105713016 CFRunLoopRunSpecific + 406
    25  GraphicsServices                    0x000000010933da24 GSEventRunModal + 62
    26  UIKit                               0x00000001063ec134 UIApplicationMain + 159
    27  fatigue                             0x0000000103e2bde7 main + 55
    28  libdyld.dylib                       0x000000010d0f565d start + 1
    29  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException