todo.txt-ios
todo.txt-ios copied to clipboard
Application crashes on selecting done with no items within context menus
Within the Edit Task screen, if you bring up one of the context menus which have no items populated within them and select the Done button the application will crash. Within the application logs you see the following exception.
2014-10-19 23:49:04.401 Todo.txt[8318:244782] Picker: <ActionSheetStringPicker: 0x7fd8fa5c6d70>
2014-10-19 23:49:04.402 Todo.txt[8318:244782] Selected Index: 0
2014-10-19 23:49:04.402 Todo.txt[8318:244782] Selected Value: (null)
2014-10-19 23:49:04.405 Todo.txt[8318:244782] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(
0 CoreFoundation 0x0000000108ece3f5 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000108b37bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000108dc65be -[__NSArrayI objectAtIndex:] + 190
3 Todo.txt 0x00000001064e75b7 -[TaskEditViewController projectWasSelected:element:] + 215
4 Todo.txt 0x00000001064e8dab __57-[TaskEditViewController keyboardAccessoryButtonPressed:]_block_invoke_2403 + 203
5 Todo.txt 0x00000001064d4410 -[ActionSheetStringPicker notifyTarget:didSucceedWithAction:origin:] + 544
6 Todo.txt 0x00000001064a9e92 -[AbstractActionSheetPicker actionPickerDone:] + 162
7 UIKit 0x00000001075aa9ee -[UIApplication sendAction:to:from:forEvent:] + 75
This does not happen when you select the Cancel button.
Should be resolved with pull request https://github.com/ginatrapani/todo.txt-ios/pull/236