Githawk: EmojiAutocomplete.swift line 32

Created on 2 Mar 2018  路  4Comments  路  Source: GitHawkApp/GitHawk

in EmojiAutocompleteFreetimeAutocompleteType

  • Number of crashes: 1
  • Impacted devices: 1

There's a lot more information about this crash on crashlytics.com:
https://fabric.io/githawk/ios/apps/com.whoisryannystrom.freetime/issues/5a99a2838cb3c2fa632cf303?utm_medium=service_hooks-github&utm_source=issue_impact

馃悰 bug

Most helpful comment

Et voil脿:

(lldb) po results
0 elements

(lldb) po index
21

(lldb) po cell
<Freetime.AutocompleteCell: 0x7fc475195200; baseClass = UITableViewCell; frame = (0 924; 375 44); autoresize = W; layer = <CALayer: 0x60800063c960>>

(lldb) 

All 4 comments

Reported in #1599

Steps to reproduce:

  1. Enter : to bring up emoji autocomplete menu
  2. Start scrolling through the emoji menu
  3. WHILE it is scrolling, select any character that results in no emoji autocomplete results

This is likely because a failure in autocomplete empties the results array, causing the configure method to access an invalid index as the tableView continues to scroll. I have to cook dinner so I can't get to this anytime soon.

Here's a backtrace:

* thread #1, queue = 'com.apple.main-thread', stop reason = Fatal error: Index out of range
    frame #0: 0x0000000109697900 libswiftCore.dylib`_swift_runtime_on_report
    frame #1: 0x00000001096d8181 libswiftCore.dylib`_swift_stdlib_reportFatalError + 113
    frame #2: 0x000000010967438f libswiftCore.dylib`partial apply forwarder for closure #1 (Swift.UnsafeBufferPointer<Swift.UInt8>) -> () in closure #2 (Swift.UnsafeBufferPointer<Swift.UInt8>) -> () in Swift._fatalErrorMessage(Swift.StaticString, Swift.StaticString, file: Swift.StaticString, line: Swift.UInt, flags: Swift.UInt32) -> Swift.Never + 63
    frame #3: 0x000000010939f1eb libswiftCore.dylib`function signature specialization <preserving fragile attribute, Arg[1] = [Closure Propagated : reabstraction thunk helper from @callee_owned (@unowned Swift.UnsafeBufferPointer<Swift.UInt8>) -> () to @callee_owned (@unowned Swift.UnsafeBufferPointer<Swift.UInt8>) -> (@out ()), Argument Types : [@callee_owned (@unowned Swift.UnsafeBufferPointer<Swift.UInt8>) -> ()]> of generic specialization <preserving fragile attribute, ()> of Swift.StaticString.withUTF8Buffer<A>((Swift.UnsafeBufferPointer<Swift.UInt8>) -> A) -> A + 187
    frame #4: 0x00000001096280f1 libswiftCore.dylib`partial apply forwarder for closure #2 (Swift.UnsafeBufferPointer<Swift.UInt8>) -> () in Swift._fatalErrorMessage(Swift.StaticString, Swift.StaticString, file: Swift.StaticString, line: Swift.UInt, flags: Swift.UInt32) -> Swift.Never + 113
    frame #5: 0x000000010939f1eb libswiftCore.dylib`function signature specialization <preserving fragile attribute, Arg[1] = [Closure Propagated : reabstraction thunk helper from @callee_owned (@unowned Swift.UnsafeBufferPointer<Swift.UInt8>) -> () to @callee_owned (@unowned Swift.UnsafeBufferPointer<Swift.UInt8>) -> (@out ()), Argument Types : [@callee_owned (@unowned Swift.UnsafeBufferPointer<Swift.UInt8>) -> ()]> of generic specialization <preserving fragile attribute, ()> of Swift.StaticString.withUTF8Buffer<A>((Swift.UnsafeBufferPointer<Swift.UInt8>) -> A) -> A + 187
    frame #6: 0x0000000109553410 libswiftCore.dylib`function signature specialization <preserving fragile attribute, Arg[2] = Dead, Arg[3] = Dead> of Swift._fatalErrorMessage(Swift.StaticString, Swift.StaticString, file: Swift.StaticString, line: Swift.UInt, flags: Swift.UInt32) -> Swift.Never + 96
    frame #7: 0x000000010937e255 libswiftCore.dylib`Swift._ArrayBuffer._checkInoutAndNativeTypeCheckedBounds(Swift.Int, wasNativeTypeChecked: Swift.Bool) -> () + 261
    frame #8: 0x0000000109395f77 libswiftCore.dylib`Swift.Array.subscript.getter : (Swift.Int) -> A + 103
  * frame #9: 0x00000001023435dc Freetime`EmojiAutocomplete.configure(cell=0x00007fc475195200, index=21, self=0x000060400023a060) at EmojiAutocomplete.swift:32
    frame #10: 0x0000000102344a33 Freetime`protocol witness for AutocompleteType.configure(cell:index:) in conformance EmojiAutocomplete at EmojiAutocomplete.swift:0
    frame #11: 0x00000001023b076a Freetime`IssueCommentAutocomplete.cell(tableView=0x00007fc4749ade00, prefix=":", indexPath=2 indices, self=0x0000604000293420) at IssueCommentAutocomplete.swift:79
    frame #12: 0x00000001024ec18b Freetime`AutocompleteController.tableView(tableView=0x00007fc4749ade00, indexPath=2 indices, self=0x000060400023b020) at AutocompleteController.swift:59
    frame #13: 0x00000001024ec25c Freetime`@objc AutocompleteController.tableView(_:cellForRowAt:) at AutocompleteController.swift:0
    frame #14: 0x00000001051ad484 UIKit`-[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 778
    frame #15: 0x00000001051ada2a UIKit`-[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 74
    frame #16: 0x00000001051731f6 UIKit`-[UITableView _updateVisibleCellsNow:isRecursive:] + 3031
    frame #17: 0x00000001051952e6 UIKit`-[UITableView layoutSubviews] + 176
    frame #18: 0x000000010511da6d UIKit`-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1439
    frame #19: 0x0000000108f0061c QuartzCore`-[CALayer layoutSublayers] + 159
    frame #20: 0x0000000108f047ad QuartzCore`CA::Layer::layout_if_needed(CA::Transaction*) + 401
    frame #21: 0x0000000108e8b86c QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 364
    frame #22: 0x0000000108eb8946 QuartzCore`CA::Transaction::commit() + 500
    frame #23: 0x0000000108e053cc QuartzCore`CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 960
    frame #24: 0x0000000108f45894 QuartzCore`display_timer_callback(__CFMachPort*, void*, long, void*) + 248
    frame #25: 0x0000000108225899 CoreFoundation`__CFMachPortPerform + 169
    frame #26: 0x00000001082257d9 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
    frame #27: 0x0000000108225741 CoreFoundation`__CFRunLoopDoSource1 + 465
    frame #28: 0x000000010821d524 CoreFoundation`__CFRunLoopRun + 2596
    frame #29: 0x000000010821c889 CoreFoundation`CFRunLoopRunSpecific + 409
    frame #30: 0x000000010d9f19c6 GraphicsServices`GSEventRunModal + 62
    frame #31: 0x000000010504c5d6 UIKit`UIApplicationMain + 159
    frame #32: 0x000000010206a147 Freetime`main at AppDelegate.swift:17
    frame #33: 0x0000000109fb8d81 libdyld.dylib`start + 1

Et voil脿:

(lldb) po results
0 elements

(lldb) po index
21

(lldb) po cell
<Freetime.AutocompleteCell: 0x7fc475195200; baseClass = UITableViewCell; frame = (0 924; 375 44); autoresize = W; layer = <CALayer: 0x60800063c960>>

(lldb) 
Was this page helpful?
0 / 5 - 0 ratings

Related issues

BasThomas picture BasThomas  路  3Comments

rizwankce picture rizwankce  路  3Comments

BasThomas picture BasThomas  路  3Comments

rnystrom picture rnystrom  路  3Comments

rnystrom picture rnystrom  路  3Comments