Help diagnosing an unhandled exception dequeuing a table view cell

I ran a modest sized iOS project through Swift 3 conversion and I have been working through compiler errors and unit test failures. The app now launches and it appears to be generally stable. However, there is one new problem instantiating a table view cell at runtime, and I'm looking for advice on what to do or try next.


The failure is "libc++abi.dylib: terminating with uncaught exception of type NSException". The debugger console output does not indicate anything else regarding the exception. If I enable breakpoints for all exceptions, the call stack at the time of the throw is:


#0 0x00000001122f12ee in objc_exception_throw ()

#1 0x000000011186fd39 in -[NSException raise] ()

#2 0x000000011124d0c3 in -[NSObject(NSKeyValueCoding) setValue:forKey:] ()

#3 0x000000010f7ec21b in -[UIView(CALayerDelegate) setValue:forKey:] ()

#4 0x000000010fb21522 in -[UIRuntimeOutletConnection connect] ()

#5 0x0000000111815f30 in -[NSArray makeObjectsPerformSelector:] ()

#6 0x000000010fb1fe9c in -[UINib instantiateWithOwner:options:] ()

#7 0x000000010f8803b1 in -[UITableView _dequeueReusableViewOfType:withIdentifier:] ()

#8 0x000000010e7ddddc in MyViewController.tableView(UITableView, cellForRowAt : IndexPath) -> UITableViewCell at /[snipped]/MyViewController.swift:149

#9 0x000000010e7de627 in @objc MyViewController.tableView(UITableView, cellForRowAt : IndexPath) -> UITableViewCell ()

#10 0x000000010f893b26 in -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] ()

#11 0x000000010f893c5c in -[UITableView _createPreparedCellForGlobalRow:willDisplay:] ()

#12 0x000000010f867faf in -[UITableView _updateVisibleCellsNow:isRecursive:] ()

#13 0x000000010f89c882 in -[UITableView _performWithCachedTraitCollection:] ()

#14 0x000000010f883b47 in -[UITableView layoutSubviews] ()

#15 [snipped]

#27 0x000000010f72ae8b in UIApplicationMain ()

#28 0x000000010e6fd94f in main at /[snipped]/MyAppDelegate.swift:15


My interpretation is the cell instantiation is attempting to connect a runtime outlet, but I don't know which one. I inspected the storyboard containing the view controller, table view and cell, and the outlets for the cell and views appear to be OK (no exclamation points). The storyboard, to my knowledge, has not been modified since it was working under Xcode 7. The cell subclass and its views don't have any custom runtime attributes, or any IBInspectable attributes. Is there a way to "see" the name to the outlet connection, property name or anything else regarding key value coding?

Replies

have you checked also the cell identifier of the Table View Cell is OK ?