我對我的應用程序有一個奇怪的反應。 我的應用程序在近10種不同的設備中工作正常,並且已通過測試並且在線。但是有一位擁有iOS 5的iPhone 5的朋友有一個問題。當他試圖進入一個表格視圖時,我通過alamofire和swiftyjson的API調用將項目附加到表格視圖中。該應用程序崩潰。從crashlytics我得到這個奇怪的錯誤iPhone上的Wierd Crash應用程序
Crashed: com.apple.main-thread
0 Events Near Me 0x1000a532c specialized listMapViewController.tableView(UITableView, cellForRowAtIndexPath : NSIndexPath) -> UITableViewCell (listMapViewController.swift:196)
1 Events Near Me 0x1000a3c94 @objc listMapViewController.tableView(UITableView, cellForRowAtIndexPath : NSIndexPath) -> UITableViewCell (listMapViewController.swift)
2 UIKit 0x18a37220c -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 688
3 UIKit 0x18a372364 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 80
4 UIKit 0x18a3617b8 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2440
5 UIKit 0x18a376f0c -[UITableView _performWithCachedTraitCollection:] + 104
6 UIKit 0x18a10f22c -[UITableView layoutSubviews] + 176
7 UIKit 0x18a01f7ac -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 644
8 QuartzCore 0x18981eb58 -[CALayer layoutSublayers] + 148
9 QuartzCore 0x189819764 CA::Layer::layout_if_needed(CA::Transaction*) + 292
10 QuartzCore 0x189819624 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
11 QuartzCore 0x189818cc0 CA::Context::commit_transaction(CA::Transaction*) + 252
12 QuartzCore 0x189818a08 CA::Transaction::commit() + 512
13 QuartzCore 0x1898120f8 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 80
14 CoreFoundation 0x184a47bd0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
15 CoreFoundation 0x184a45974 __CFRunLoopDoObservers + 372
16 CoreFoundation 0x184a45da4 __CFRunLoopRun + 928
17 CoreFoundation 0x184974ca0 CFRunLoopRunSpecific + 384
18 GraphicsServices 0x18fbb0088 GSEventRunModal + 180
19 UIKit 0x18a08cffc UIApplicationMain + 204
20 Events Near Me 0x100095eec main (AppDelegate.swift:15)
21 libdyld.dylib 0x199da28b8 start + 4
並在管線196這是代碼
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as! locationEventsTableViewCell
var dict = arrRes[indexPath.row]
cell.eventTitle.text = dict["eventName"] as? String //here is the issue
所以要解釋你一點,用這個程序,你取決於你的位置靠近你的一些事件。我有一個保護,如果沒有事件有消息。但是我們離開了幾個街區,我可以通過cell.eventTitle獲得活動......但是我的朋友的iPhone通過它崩潰。
有什麼想法?
P.S.我現在將iOS 9.1下載到我的模擬器。另一個與iPhone 5的朋友沒有這個問題。
我沒有猜測它爲什麼會崩潰,但既然你知道這個人,也許你可以把你朋友的電話連接到Xcode,看看你是否遇到異常斷點? – ghostatron
@conarch Crashlytics報告告訴你有一個例外的確切位置。這就是爲什麼我好奇...即使iPhone 5越獄沒有崩潰...甚至iPod touch 2! –
我建議直接連接,主要是因爲,如果您可以觸發異常斷點,則可以檢查應用程序的狀態以查看與朋友的手機有什麼關係。而不是刺傷堆棧痕跡,你實際上可以看到它。如果我是你,我會利用這一點。 – ghostatron