ios-sdk-examples
ios-sdk-examples copied to clipboard
AnimatedLineExample: deallocated with KVO registered (iOS 10.x tests)
Running the automated UI tests on iOS 10.3 fails after running the AnimatedLineExample. I don’t think this something we’re likely to fix (or need to fix), but, for posterity:
2019-04-02 16:54:52.209 Examples[22774:2307649] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x7fab09790b60 of class AnimatedLineExample was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x61000042fce0> (
<NSKeyValueObservance 0x610000258330: Observer: 0x7fab09790b60, Key path: currentIndex, Options: <New: YES, Old: NO, Prior: NO> Context: 0x10ad30c38, Property: 0x6100002477d0>
)'
*** First throw call stack:
(
0 CoreFoundation 0x000000010c166b0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010bbcb141 objc_exception_throw + 48
2 CoreFoundation 0x000000010c1cf625 +[NSException raise:format:] + 197
3 Foundation 0x000000010b706b53 NSKVODeallocate + 294
4 CoreFoundation 0x000000010c1bd2ad common_removeAllObjects + 189
5 CoreFoundation 0x000000010c09e373 -[__NSArrayM dealloc] + 19
6 libobjc.A.dylib 0x000000010bbdfb8e _ZN11objc_object17sidetable_releaseEb + 202
7 UIKit 0x000000010d111c9d -[UIViewController dealloc] + 1801
8 libobjc.A.dylib 0x000000010bbe02fa _ZN12_GLOBAL__N_119AutoreleasePoolPage3popEPv + 866
9 UIKit 0x000000010d111ca9 -[UIViewController dealloc] + 1813
10 UIKit 0x000000010d13ee60 -[UINavigationController dealloc] + 419
11 UIKit 0x000000010d59f010 -[UISplitViewControllerClassicImpl _willShowCollapsedDetailViewController:inTargetController:] + 72
12 UIKit 0x000000010d51f7e7 -[UISplitViewController _willShowCollapsedDetailViewController:inTargetController:] + 58
13 UIKit 0x000000010d59edcb -[UISplitViewControllerClassicImpl showDetailViewController:sender:] + 532
14 UIKit 0x000000010d51f4fe -[UISplitViewController showDetailViewController:sender:] + 58
15 Examples 0x000000010ac34298 -[ExamplesTableViewController showExample:] + 472
16 Examples 0x000000010ac339a8 -[ExamplesTableViewController tableView:didSelectRowAtIndexPath:] + 184
17 UIKit 0x000000010d0c911d -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1763
18 UIKit 0x000000010d0c9333 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 344
19 UIKit 0x000000010cf7e853 _runAfterCACommitDeferredBlocks + 318
20 UIKit 0x000000010cf6b81c _cleanUpAfterCAFlushAndRunDeferredBlocks + 532
21 UIKit 0x000000010cf9d560 _afterCACommitHandler + 137
22 CoreFoundation 0x000000010c10c717 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
23 CoreFoundation 0x000000010c10c687 __CFRunLoopDoObservers + 391
24 CoreFoundation 0x000000010c0f1720 __CFRunLoopRun + 1200
25 CoreFoundation 0x000000010c0f1016 CFRunLoopRunSpecific + 406
26 GraphicsServices 0x0000000111d49a24 GSEventRunModal + 62
27 UIKit 0x000000010cf72134 UIApplicationMain + 159
28 Examples 0x000000010ac3ff30 main + 112
29 libdyld.dylib 0x0000000110cd465d start + 1
)
I also hit this testing manually.
Skipped this example on <iOS 11 in 567c79cbb87eb7bcddee209d1e9943c112dc3814, over in #278.
Beginning to wonder if this might be part of the cause of #242