J'utilise une vue de table dans mon projet, les rapports de crashlytics montrent un crash dans ma fonction cellForRowAtIndexPath sur les accolades exactement ce qui ne m'aide pas à trouver le bug. Je ne suis pas capable de reproduire ce bug sur mon appareil ou sur les simulateurs. La trace de la pile est ci-dessous et le code cellForRowAtIndexPath est joint en tant qu'image.CellForRowAtIndexPath plantant sur des accolades
Crashlytics Stack trace
Crashed: com.apple.main-thread
0 Synkers 0x104407d20 specialized HomeScreenViewController.tableView(UITableView, cellForRowAt : IndexPath) -> UITableViewCell (HomeScreenViewController.swift:208)
1 Synkers 0x104404134 @objc HomeScreenViewController.tableView(UITableView, cellForRowAt : IndexPath) -> UITableViewCell (HomeScreenViewController.swift)
2 UIKit 0x18a421474 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 668
3 UIKit 0x18a4219d8 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 80
4 UIKit 0x18a401670 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2140
5 UIKit 0x18a1bcf10 -[UITableView layoutSubviews] + 140
6 UIKit 0x18a0e9000 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1256
7 QuartzCore 0x184cb90b4 -[CALayer layoutSublayers] + 184
8 QuartzCore 0x184cbd194 CA::Layer::layout_if_needed(CA::Transaction*) + 332
9 QuartzCore 0x184c2bf24 CA::Context::commit_transaction(CA::Transaction*) + 336
10 QuartzCore 0x184c52340 CA::Transaction::commit() + 540
11 UIKit 0x18a0de884 _afterCACommitHandler + 256
12 CoreFoundation 0x180c838b8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
13 CoreFoundation 0x180c81270 __CFRunLoopDoObservers + 412
14 CoreFoundation 0x180c8182c __CFRunLoopRun + 1292
15 CoreFoundation 0x180ba22d8 CFRunLoopRunSpecific + 436
16 GraphicsServices 0x182a33f84 GSEventRunModal + 100
17 UIKit 0x18a14f880 UIApplicationMain + 208
18 Synkers 0x104215ba4 main (main.m:14)
19 libdyld.dylib 0x1806c656c start + 4
Pls ajouter votre code et non l'image du code. Et mentionnez à quelle ligne votre application est plantée. –
Je suppose que votre code est désynchronisé avec celui déployé sur l'appareil. – luk2302
J'ai ajouté l'image pour montrer les lignes de code; L'application s'est plantée à la ligne 208. @dahiya_boy –