Crash app when scroll to bottom of tableView: "Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 450]"
dieptx opened this issue · 1 comments
dieptx commented
i'm adding collageView to UITableViewCell. In layoutSubViews
function, i called collageView.frame = contentView.bounds
Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 450]'
*** First throw call stack:
(
0 CoreFoundation 0x00000001097ce6fb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010824dac5 objc_exception_throw + 48
2 CoreFoundation 0x00000001097ce555 +[NSException raise:format:] + 197
3 QuartzCore 0x00000001071382ae _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 140
4 QuartzCore 0x000000010712768b -[CALayer setPosition:] + 57
5 QuartzCore 0x0000000107127de3 -[CALayer setFrame:] + 560
6 UIKitCore 0x000000010e46f2f3 -[UIView(Geometry) setFrame:] + 336
7 CollageView 0x0000000104bc2154 $s11CollageViewAAC14layoutSubviewsyyF + 804
8 CollageView 0x0000000104bc3024 $s11CollageViewAAC14layoutSubviewsyyFTo + 36
9 UIKitCore 0x000000010e48d9c1 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1417
10 QuartzCore 0x000000010712deae -[CALayer layoutSublayers] + 173
11 QuartzCore 0x0000000107132b88 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 396
12 UIKitCore 0x000000010e478985 -[UIView(Hierarchy) layoutBelowIfNeeded] + 646
13 UIKitCore 0x000000010e47fa19 +[UIView(Animation) performWithoutAnimation:] + 90
14 UIKitCore 0x000000010e1f885b -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 1323
15 UIKitCore 0x000000010e1f8b65 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 73
16 UIKitCore 0x000000010e1c0d20 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2870
17 UIKitCore 0x000000010e1e0e37 -[UITableView layoutSubviews] + 165
18 UIKitCore 0x000000010e48d9c1 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1417
19 QuartzCore 0x000000010712deae -[CALayer layoutSublayers] + 173
20 QuartzCore 0x0000000107132b88 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 396
21 QuartzCore 0x000000010713eee4 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 72
22 QuartzCore 0x00000001070ae3aa _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 328
23 QuartzCore 0x00000001070e5584 _ZN2CA11Transaction6commitEv + 608
24 QuartzCore 0x00000001070e5ede _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 76
25 CoreFoundation 0x00000001097350f7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
26 CoreFoundation 0x000000010972f5be __CFRunLoopDoObservers + 430
27 CoreFoundation 0x000000010972fc31 __CFRunLoopRun + 1505
28 CoreFoundation 0x000000010972f302 CFRunLoopRunSpecific + 626
29 GraphicsServices 0x00000001111742fe GSEventRunModal + 65
30 UIKitCore 0x000000010dfbfba2 UIApplicationMain + 140
Plz, help me to fix this problem
ahmetkgunay commented
ok i will implement a demo which is using collageview in tableview cell