这是我在布料上的堆栈跟踪:
Crashed: com.apple.main-thread.
EXC_BREAKPOINT 0x0000000100b9ac64
Crashed: com.apple.main-thread
0 ABC 0x100b9ac64 specialized GameItemViewController.init(coder : NSCoder) -> GameItemViewController? (GameItemViewController.swift:5)
1 ABC 0x100b952f0 @objc GameItemViewController.init(coder : NSCoder) -> GameItemViewController? (GameItemViewController.swift)
2 UIKit 0x18cb6dedc -[UIClassSwapper initWithCoder:] + 248
3 UIKit 0x18cccf628 UINibDecoderDecodeObjectForValue + 688
4 UIKit 0x18cccf360 -[UINibDecoder decodeObjectForKey:] + 312
5 UIKit 0x18cb6db84 -[UIRuntimeConnection initWithCoder:] + 188
6 UIKit 0x18cb6e31c -[UIRuntimeEventConnection initWithCoder:] + 64
7 UIKit 0x18cccf628 UINibDecoderDecodeObjectForValue + 688
8 UIKit 0x18cccf7a0 UINibDecoderDecodeObjectForValue + 1064
9 UIKit 0x18cccf360 -[UINibDecoder decodeObjectForKey:] + 312
10 UIKit 0x18cb6ced4 -[UINib instantiateWithOwner:options:] + 1164
11 UIKit 0x18ce79d88 -[UIStoryboard instantiateViewControllerWithIdentifier:] + 196
12 UIKit 0x18ce86610 -[UIStoryboardSegueTemplate instantiateOrFindDestinationViewControllerWithSender:] + 92
13 UIKit 0x18ce8686c -[UIStoryboardSegueTemplate _perform:] + 56
14 UIKit 0x18c99f4d0 -[UIViewController performSegueWithIdentifier:sender:] + 108
15 ABC 0x100b66788 GamesViewController.gameTapped(Any) -> () (GamesViewController.swift:225)
16 ABC 0x100b66a84 @objc GamesViewController.gameTapped(Any) -> () + 4300515972
17 UIKit 0x18c65a6c8 -[UIApplication sendAction:to:from:forEvent:] + 96
18 UIKit 0x18c77b8a4 -[UIControl sendAction:to:forEvent:] + 80
19 UIKit 0x18c66077c -[UIControl _sendActionsForEvents:withEvent:] + 440
20 UIKit 0x18c7961dc -[UIControl touchesEnded:withEvent:] + 572
21 UIKit 0x18c6dda48 -[UIWindow _sendTouchesForEvent:] + 2428
22 UIKit 0x18c6d28f8 -[UIWindow sendEvent:] + 3160
23 UIKit 0x18c6d1238 -[UIApplication sendEvent:] + 340
24 UIKit 0x18ceb2c0c __dispatchPreprocessedEventFromEventQueue + 2340
25 UIKit 0x18ceb51b8 __handleEventQueueInternal + 4744
26 UIKit 0x18ceae258 __handleHIDEventFetcherDrain + 152
27 CoreFoundation 0x1828d3404 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
28 CoreFoundation 0x1828d2c2c __CFRunLoopDoSources0 + 276
29 CoreFoundation 0x1828d079c __CFRunLoopRun + 1204
30 CoreFoundation 0x1827f0da8 CFRunLoopRunSpecific + 552
31 GraphicsServices 0x1847d3020 GSEventRunModal + 100
32 UIKit 0x18c7d178c UIApplicationMain + 236
33 ABC 0x100b28f60 main (GamesViewModel.swift:11)
34 libdyld.dylib 0x182281fc0 start + 4
当我在GamesViewController和GameItemViewController之间发生冲突时发生崩溃。
我的IBAction逻辑中没有任何异步任务,我开始实际的segue。我只检查3种不同的布尔值并分别启动不同的ViewControllers。
@IBAction func gameTapped(_ sender: Any) {
if x {
performSegue(withIdentifier: "x", sender: nil)
} else if y {
performSegue(withIdentifier: "y", sender: nil)
} else {
performSegue(withIdentifier: "showGameItem", sender: nil)
}
}
崩溃指向的这一行(GameItemViewController.swift:5)是视图控制器声明,如下所示:
import UIKit
import RxSwift
import RxCocoa
class GameItemViewController: UIViewController {
}
我还没有覆盖
init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?
OR
required init?(coder aDecoder: NSCoder)
我无法重新创建此功能,但是我可以看到多个设备遇到问题的崩溃问题日志。