younatics / ExpandableCell

✨ Awesome expandable, collapsible tableview cell for iOS written in Swift 5
MIT License
770 stars 124 forks source link

App Crashing on expandableTableView(_:expandedCellsForRowAt:) #84

Open bebslab opened 3 years ago

bebslab commented 3 years ago

Firebase report a non recurrent crash. It appears randomly.

This is the crashlytics report:

Fatal Exception: NSRangeException *** -[_NSArrayM objectAtIndexedSubscript:]: index 18446744073709551615 beyond bounds [0 .. 9] Controller.expandableTableView(:expandedCellsForRowAt:)

Fatal Exception: NSRangeException 0 CoreFoundation 0x18ab5986c exceptionPreprocess 1 libobjc.A.dylib 0x19fb72c50 objc_exception_throw 2 CoreFoundation 0x18abc9e1c -[NSCFString characterAtIndex:].cold.1 3 CoreFoundation 0x18aa47e8c -[NSDictionaryI objectForKeyedSubscript:] 4 Souffleur de Rêves 0x102a428e4 AudioListController.expandableTableView(:expandedCellsForRowAt:) + 1218 (AudioListController.swift:1218) 5 ExpandableCell 0x103197a20 ExpandableTableView.open(indexPath:delegate:) + 111 (ExpandableTableView.swift:111) 6 ExpandableCell 0x103197280 ExpandableTableView.handleRowExpansion(at:) + 91 (ExpandableTableView.swift:91) 7 ExpandableCell 0x103196f00 ExpandableTableView.tableView(:didSelectRowAt:) + 65 (ExpandableTableView.swift:65) 8 ExpandableCell 0x103197358 @objc ExpandableTableView.tableView(_:didSelectRowAt:) () 9 UIKitCore 0x18d721830 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:isCellMultiSelect:] 10 UIKitCore 0x18d7213d8 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] 11 UIKitCore 0x18d721b98 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] 12 UIKitCore 0x18d9f7544 -[_UIAfterCACommitBlock run] 13 UIKitCore 0x18d51f00c _runAfterCACommitDeferredBlocks 14 UIKitCore 0x18d50d9a0 _cleanUpAfterCAFlushAndRunDeferredBlocks 15 UIKitCore 0x18d541bb4 _afterCACommitHandler 16 CoreFoundation 0x18aad4358 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION 17 CoreFoundation 0x18aace5c4 CFRunLoopDoObservers 18 CoreFoundation 0x18aaceb74 __CFRunLoopRun 19 CoreFoundation 0x18aace21c CFRunLoopRunSpecific 20 GraphicsServices 0x1a2698784 GSEventRunModal 21 UIKitCore 0x18d50eee8 -[UIApplication _run] 22 UIKitCore 0x18d51475c UIApplicationMain 23 Souffleur de Rêves 0x1029f6b74 main + 32 (UIColor+Set.swift:32) 24 libdyld.dylib 0x18a78e6b0 start

An undefined index is applied.

If someone can help me to solve this crash issue. Thank you