SkeletonView: Crash when pushing view controller with date picker on top of view controller with skeleton started and stopped
What did you do?
tried to push a view controller with a DatePickerView with mode set to .time when there was a view controller with skeletonable views in the navigation controller stack
What did you expect to happen?
The view controller will be pushed and I will be able to see the DatePickerView
What happened instead?
The app crashed on appDelegate start
Call Stack
0 CoreFoundation 0x00000001176578db __exceptionPreprocess + 331
1 libobjc.A.dylib 0x0000000116640ac5 objc_exception_throw + 48
2 CoreFoundation 0x00000001175a5fac _CFThrowFormattedException + 194
3 CoreFoundation 0x00000001175824e2 -[__NSArrayM objectAtIndex:] + 178
4 UIKitCore 0x000000011bb40d70 -[UIPickerView selectedRowInComponent:] + 76
5 UIKitCore 0x000000011bb289c1 -[_UIDatePickerMode_Time _shouldEnableValueForRow:inComponent:calendarUnit:] + 234
6 UIKitCore 0x000000011bb268b9 -[_UIDatePickerMode _shouldEnableValueForRow:column:] + 68
7 UIKitCore 0x000000011bb2646d -[_UIDatePickerMode viewForRow:inComponent:reusingView:] + 942
8 UIKitCore 0x000000011bb32086 -[_UIDatePickerView pickerView:viewForRow:forComponent:reusingView:] + 60
9 UIKitCore 0x000000011bb4149c -[UIPickerView tableView:cellForRowAtIndexPath:] + 620
10 UIKitCore 0x000000011bb34a06 -[UIPickerColumnView tableView:cellForRowAtIndexPath:] + 168
11 UIKitCore 0x000000011bde5f60 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 764
12 UIKitCore 0x000000011bde6499 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 73
13 UIKitCore 0x000000011bdae654 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2870
14 UIKitCore 0x000000011bdc2c28 -[UITableView _visibleCellsUsingPresentationValues:] + 518
15 SkeletonView 0x00000001152ba663 $sSo11UITableViewC08SkeletonB0E010subviewsToC0SaySo6UIViewCGvg + 35
16 SkeletonView 0x00000001152ba5f5 $sSo11UITableViewC08SkeletonB0E010subviewsToC0SaySo6UIViewCGvgTo + 53
17 SkeletonView 0x00000001152ba2d6 $sSo6UIViewC12SkeletonViewE21subviewsSkeletonablesSayABGvg + 54
18 SkeletonView 0x00000001152ba255 $sSo6UIViewC12SkeletonViewE21subviewsSkeletonablesSayABGvgTo + 53
19 SkeletonView 0x00000001152cb0d6 $sSo6UIViewC12SkeletonViewE02isB6ActiveSbvg + 182
20 SkeletonView 0x00000001152b71b3 $sSo6UIViewC12SkeletonViewE32skeletonTraitCollectionDidChangeyySo07UITraitF0CSgF + 131
21 SkeletonView 0x00000001152b7294 $sSo6UIViewC12SkeletonViewE32skeletonTraitCollectionDidChangeyySo07UITraitF0CSgFTo + 68
22 UIKitCore 0x000000011c0144b2 -[UIScrollView traitCollectionDidChange:] + 73
23 UIKitCore 0x000000011bdb9bd0 -[UITableView traitCollectionDidChange:] + 74
24 UIKitCore 0x000000011c05f27a -[UIView _traitCollectionDidChangeInternal:] + 780
25 UIKitCore 0x000000011c05f341 -[UIView _wrappedProcessTraitCollectionDidChange:forceNotification:] + 137
26 UIKitCore 0x000000011c05f44e -[UIView _wrappedProcessTraitCollectionDidChange:forceNotification:] + 406
27 UIKitCore 0x000000011c05f44e -[UIView _wrappedProcessTraitCollectionDidChange:forceNotification:] + 406
28 UIKitCore 0x000000011bfc12b7 -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 104
29 UIKitCore 0x000000011c05f654 -[UIView _processDidChangeRecursivelyFromOldTraits:toCurrentTraits:forceNotification:] + 129
30 UIKitCore 0x000000011c072bdc __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 733
31 Foundation 0x0000000110f94f46 -[NSISEngine withBehaviors:performModifications:] + 110
32 UIKitCore 0x000000011c072890 -[UIView(Hierarchy) _postMovedFromSuperview:] + 822
33 UIKitCore 0x000000011c082ae5 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1948
34 UIKitCore 0x000000011bb3eb5c __30-[UIPickerView layoutSubviews]_block_invoke + 5320
35 UIKitCore 0x000000011c07aec1 +[UIView(Animation) performWithoutAnimation:] + 90
36 UIKitCore 0x000000011bb3d665 -[UIPickerView layoutSubviews] + 119
37 UIKitCore 0x000000011bb32397 -[_UIDatePickerView layoutSubviews] + 101
38 UIKitCore 0x000000011bb40d51 -[UIPickerView selectedRowInComponent:] + 45
39 UIKitCore 0x000000011bb3bc09 -[UIPickerView _updateSelectedRows] + 135
40 UIKitCore 0x000000011bb3bca3 -[UIPickerView didMoveToWindow] + 101
41 UIKitCore 0x000000011c07ff9d -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1817
42 UIKitCore 0x000000011c07fb47 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 707
43 UIKitCore 0x000000011b5ffde4 -[UIControl _didMoveFromWindow:toWindow:] + 67
44 UIKitCore 0x000000011c07fb47 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 707
45 UIKitCore 0x000000011c07fb47 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 707
46 UIKitCore 0x000000011c07fb47 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 707
47 UIKitCore 0x000000011c07fb47 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 707
48 UIKitCore 0x000000011c072996 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 151
49 Foundation 0x0000000110f94f46 -[NSISEngine withBehaviors:performModifications:] + 110
50 UIKitCore 0x000000011c072890 -[UIView(Hierarchy) _postMovedFromSuperview:] + 822
51 UIKitCore 0x000000011c082ae5 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1948
52 UIKitCore 0x000000011bdb05d3 -[UITableView _addSubview:positioned:relativeTo:] + 124
53 UIKitCore 0x000000011c01e24d -[UIScrollView(UIScrollViewInternal) _addContentSubview:atBack:] + 564
54 UIKitCore 0x000000011bdb032c -[UITableView _addContentSubview:atBack:] + 256
55 UIKitCore 0x000000011bdd3ca2 __53-[UITableView _configureCellForDisplay:forIndexPath:]_block_invoke + 2476
56 UIKitCore 0x000000011c07aec1 +[UIView(Animation) performWithoutAnimation:] + 90
57 UIKitCore 0x000000011bdd320f -[UITableView _configureCellForDisplay:forIndexPath:] + 237
58 UIKitCore 0x000000011bde5ff3 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 911
59 UIKitCore 0x000000011bde6499 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 73
60 UIKitCore 0x000000011bdae654 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2870
61 UIKitCore 0x000000011bdc2c28 -[UITableView _visibleCellsUsingPresentationValues:] + 518
62 SkeletonView 0x00000001152ba663 $sSo11UITableViewC08SkeletonB0E010subviewsToC0SaySo6UIViewCGvg + 35
63 SkeletonView 0x00000001152ba5f5 $sSo11UITableViewC08SkeletonB0E010subviewsToC0SaySo6UIViewCGvgTo + 53
64 SkeletonView 0x00000001152ba2d6 $sSo6UIViewC12SkeletonViewE21subviewsSkeletonablesSayABGvg + 54
65 SkeletonView 0x00000001152ba255 $sSo6UIViewC12SkeletonViewE21subviewsSkeletonablesSayABGvgTo + 53
66 SkeletonView 0x00000001152cb0d6 $sSo6UIViewC12SkeletonViewE02isB6ActiveSbvg + 182
67 SkeletonView 0x00000001152b71b3 $sSo6UIViewC12SkeletonViewE32skeletonTraitCollectionDidChangeyySo07UITraitF0CSgF + 131
68 SkeletonView 0x00000001152b7294 $sSo6UIViewC12SkeletonViewE32skeletonTraitCollectionDidChangeyySo07UITraitF0CSgFTo + 68
69 UIKitCore 0x000000011c0144b2 -[UIScrollView traitCollectionDidChange:] + 73
70 UIKitCore 0x000000011bdb9bd0 -[UITableView traitCollectionDidChange:] + 74
71 UIKitCore 0x000000011c05f27a -[UIView _traitCollectionDidChangeInternal:] + 780
72 UIKitCore 0x000000011c05f341 -[UIView _wrappedProcessTraitCollectionDidChange:forceNotification:] + 137
73 UIKitCore 0x000000011c05f44e -[UIView _wrappedProcessTraitCollectionDidChange:forceNotification:] + 406
74 UIKitCore 0x000000011bfc12b7 -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 104
75 UIKitCore 0x000000011c05f654 -[UIView _processDidChangeRecursivelyFromOldTraits:toCurrentTraits:forceNotification:] + 129
76 UIKitCore 0x000000011c088e01 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1313
77 QuartzCore 0x00000001130a5d22 -[CALayer layoutSublayers] + 173
78 QuartzCore 0x00000001130aa9fc _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 396
79 QuartzCore 0x00000001130b6d58 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 72
80 QuartzCore 0x000000011302624a _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 328
81 QuartzCore 0x000000011305d606 _ZN2CA11Transaction6commitEv + 610
82 QuartzCore 0x0000000112f928a7 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 951
83 QuartzCore 0x00000001130615a9 _ZL22display_timer_callbackP12__CFMachPortPvlS1_ + 297
84 CoreFoundation 0x0000000117593266 __CFMachPortPerform + 150
85 CoreFoundation 0x00000001175bf5e9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
86 CoreFoundation 0x00000001175bec4b __CFRunLoopDoSource1 + 459
87 CoreFoundation 0x00000001175b91da __CFRunLoopRun + 2490
88 CoreFoundation 0x00000001175b84d2 CFRunLoopRunSpecific + 626
89 GraphicsServices 0x000000011e7602fe GSEventRunModal + 65
90 UIKitCore 0x000000011bba9fc2 UIApplicationMain + 140
91 Koinz 0x000000010d1adc3b main + 75
92 libdyld.dylib 0x00000001190de541 start + 1
93 ??? 0x0000000000000007 0x0 + 7
Steps to reproduce the behavior
- Push a view controller with skeletonable views(isSkeletonable = true and the skeleton started and then it was stopped)
- Push on it a new view controller with a DateTimePicker with mode set to .Time Note: it works on ios13 but crashes on lower than ios13
SkeletonView Environment
SkeletonView version: 1.8.5 Xcode version: 11.3.1 Swift version: Swift 5
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 30 (5 by maintainers)
Commits related to this issue
- add PR #259 in the CHANGELOG file — committed to BurhanDewantara/SkeletonView by wsalim1610 4 years ago
- Merge pull request #275 from BurhanDewantara/259 Fix Issue #259: Prevent isSkeletonActive to be called when isSkeletonable is false — committed to Juanpe/SkeletonView by Juanpe 4 years ago
Hi all, version 1.8.7 has been released 😃 sorry for the delay
That PR fixed the issue for me.
The best solution for now used version 1.8.2 @byMohamedali
Hai, I experienced the same thing on iOS 12 @Juanpe . After I tracked it, this happened in version 1.8.3. Thanks
the crash not existing on 1.8.7
@trekirkman The fix was merged to master, but not released. It is not in 1.8.6. I configured cocoapods to use the git URL as source rather than the version number tag. Not sure what’s holding up a minor/patch bump.