del*_*rox 5 ios uicollectionview uicollectionviewlayout
我从 Apple 的 UICollectionViewFlowLayout 布局代码深处收到崩溃,我不知道如何解决这些问题(下面的堆栈跟踪)。任何建议将不胜感激。
细节:
#0. Crashed: com.apple.main-thread
0  libsystem_platform.dylib       0x1879490d4 __bzero + 36
1  UIKit                          0x18e824e40 -[UICollectionViewData _updateItemCounts] + 544
2  UIKit                          0x18e824e40 -[UICollectionViewData _updateItemCounts] + 544
3  UIKit                          0x18e8e67e0 -[UICollectionViewData numberOfSections] + 28
4  UIKit                          0x18f086bc0 -[UICollectionViewFlowLayout _getSizingInfosWithExistingSizingDictionary:] + 612
5  UIKit                          0x18f088834 -[UICollectionViewFlowLayout _fetchItemsInfoForRect:] + 152
6  UIKit                          0x18e8e66b4 -[UICollectionViewFlowLayout prepareLayout] + 224
7  UIKit                          0x18e7cf574 -[UICollectionViewData _prepareToLoadData] + 164
8  UIKit                          0x18e7ceb5c -[UICollectionViewData validateLayoutInRect:] + 100
9  UIKit                          0x18e7ce55c -[UICollectionView layoutSubviews] + 212
10 UIKit                          0x18e76fa80 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1196
11 QuartzCore                     0x18bc1d9d8 -[CALayer layoutSublayers] + 148
12 QuartzCore                     0x18bc124cc CA::Layer::layout_if_needed(CA::Transaction*) + 292
13 QuartzCore                     0x18bc1238c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
14 QuartzCore                     0x18bb8f3e0 CA::Context::commit_transaction(CA::Transaction*) + 252
15 QuartzCore                     0x18bbb6a68 CA::Transaction::commit() + 512
16 QuartzCore                     0x18bbb7488 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 120
17 CoreFoundation                 0x18886a0c0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
18 CoreFoundation                 0x188867cf0 __CFRunLoopDoObservers + 372
19 CoreFoundation                 0x188868180 __CFRunLoopRun + 1024
20 CoreFoundation                 0x1887962b8 CFRunLoopRunSpecific + 444
21 GraphicsServices               0x18a24a198 GSEventRunModal + 180
22 UIKit                          0x18e7dd7fc -[UIApplication _run] + 684
23 UIKit                          0x18e7d8534 UIApplicationMain + 208
24 AppName Mobile                 0x1000333e8 main (main.m:16)
25 libdispatch.dylib              0x1877795b8 (Missing)
我们终于找到了这个。这不是许多其他卡上报告的 PerformBatchUpdates 问题。根本原因是我们的数据源会返回负数的项目计数。SDK 使用无符号整数,因此设置负翻转,并尝试分配数十亿个单元(34 GB 虚拟内存并计数)。它最终会崩溃。
| 归档时间: | 
 | 
| 查看次数: | 2000 次 | 
| 最近记录: |