I’m nearly at the end of the Checklists Tutorial at page 252 (version 5), just finished adding the Date Picker and I’m getting a crash when I click on the Date Picker in the Simulator.
At first I thought there was some “Thread 1 Breakpoint” error so I thought it was an accidental breakpoint. I clicked on a button that said disable breakpoints, but then I consistently get a crash with the error on the App Delegate swift up the top with the class line highlighted saying “Thread 1: signal SIGABRT”.
My debug console text has this in it:
"2018-06-27 21:33:10.693447+1000 Checklists[5131:141931] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don’t want.
Try this:
(1) look at each constraint and try to figure out which you don’t expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
“<NSLayoutConstraint:0x600000288610 UILabel:0x7fa899f266e0.height == 21 (active)>”,
“<NSLayoutConstraint:0x600000288750 V:[UILabel:0x7fa899f266e0]-(11.5)-| (active, names: ‘|’:UITableViewCellContentView:0x7fa899c0c480 )>”,
“<NSLayoutConstraint:0x6000002887f0 V:|-(11)-[UILabel:0x7fa899f266e0] (active, names: ‘|’:UITableViewCellContentView:0x7fa899c0c480 )>”,
“<NSLayoutConstraint:0x600000288c00 ‘UIView-Encapsulated-Layout-Height’ UITableViewCellContentView:0x7fa899c0c480.height == 43.6667 (active)>”
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000288610 UILabel:0x7fa899f266e0.height == 21 (active)>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2018-06-27 21:33:10.705097+1000 Checklists[5131:141931] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don’t want.
Try this:
(1) look at each constraint and try to figure out which you don’t expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
“<NSLayoutConstraint:0x604000282940 UILabel:0x7fa899c0d630.height == 21 (active)>”,
“<NSLayoutConstraint:0x6040002828f0 V:[UILabel:0x7fa899c0d630]-(11.5)-| (active, names: ‘|’:UITableViewCellContentView:0x7fa899c0d150 )>”,
“<NSLayoutConstraint:0x604000282b70 V:|-(11)-[UILabel:0x7fa899c0d630] (active, names: ‘|’:UITableViewCellContentView:0x7fa899c0d150 )>”,
“<NSLayoutConstraint:0x604000282ee0 ‘UIView-Encapsulated-Layout-Height’ UITableViewCellContentView:0x7fa899c0d150.height == 43.6667 (active)>”
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x604000282940 UILabel:0x7fa899c0d630.height == 21 (active)>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2018-06-27 21:33:15.632108+1000 Checklists[5131:141931] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/tongrd/Library/Developer/CoreSimulator/Devices/D9691320-1157-4E7A-89B5-B7A2E1E1A48A/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2018-06-27 21:33:15.633365+1000 Checklists[5131:141931] [MC] Reading from private effective user settings.
2018-06-27 21:33:16.194031+1000 Checklists[5131:141931] [Warning] Warning once only: Detected a case where constraints ambiguously suggest a height of zero for a tableview cell’s content view. We’re considering the collapse unintentional and using standard height instead.
2018-06-27 21:33:16.225631+1000 Checklists[5131:141931] [Common] _BSMachError: port 7603; (os/kern) invalid capability (0x14) “Unable to insert COPY_SEND”
2018-06-27 21:33:18.793543+1000 Checklists[5131:141931] *** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3698.54.4/UITableView.m:1771
2018-06-27 21:33:18.798700+1000 Checklists[5131:141931] *** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘attempt to insert row 2 into section 1, but there are only 2 rows in section 1 after the update’
*** First throw call stack:
(
0 CoreFoundation 0x00000001107c51e6 __exceptionPreprocess + 294
1 libobjc.A.dylib 0x000000010fe5a031 objc_exception_throw + 48
2 CoreFoundation 0x00000001107ca472 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010f8fd652 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
4 UIKit 0x0000000110d617d4 -[UITableView _endCellAnimationsWithContext:] + 9360
5 UIKit 0x0000000110d7ed33 -[UITableView _updateRowsAtIndexPaths:withUpdateAction:rowAnimation:usingPresentationValues:] + 1383
6 UIKit 0x0000000110d7ee06 -[UITableView insertRowsAtIndexPaths:withRowAnimation:] + 118
7 Checklists 0x000000010f51891d _T010Checklists24ItemDetailViewControllerC14showDatePickeryyF + 525
8 Checklists 0x000000010f5170dc _T010Checklists24ItemDetailViewControllerC05tableD0ySo07UITableD0C_10Foundation9IndexPathV14didSelectRowAttF + 604
9 Checklists 0x000000010f51716c _T010Checklists24ItemDetailViewControllerC05tableD0ySo07UITableD0C_10Foundation9IndexPathV14didSelectRowAttFTo + 92
10 UIKit 0x0000000110d80e89 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1813
11 UIKit 0x0000000110d810a4 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 344
12 UIKit 0x0000000110c4d4b3 _runAfterCACommitDeferredBlocks + 318
13 UIKit 0x0000000110c3c71e _cleanUpAfterCAFlushAndRunDeferredBlocks + 388
14 UIKit 0x0000000110c6aea5 _afterCACommitHandler + 137
15 CoreFoundation 0x0000000110767607 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
16 CoreFoundation 0x000000011076755e __CFRunLoopDoObservers + 430
17 CoreFoundation 0x000000011074bb81 __CFRunLoopRun + 1537
18 CoreFoundation 0x000000011074b30b CFRunLoopRunSpecific + 635
19 GraphicsServices 0x000000011634ba73 GSEventRunModal + 62
20 UIKit 0x0000000110c42057 UIApplicationMain + 159
21 Checklists 0x000000010f525ea7 main + 55
22 libdyld.dylib 0x0000000114c91955 start + 1
23 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) "
Help! I’m so close to finishing this tutorial!!