在物理设备上运行时,IOS应用程序崩溃,在模拟时运行

时间:2018-04-14 08:45:08

标签: ios swift iphone-x

最近更新了我的iPhone和Xcode,我在物理设备上运行应用时遇到了一些问题。当我在Xcode内置的模拟器上运行它时运行正常,没有戏剧性。

然而,当我在我的物理设备上启动它时,它会崩溃,除了以下内容之外没有错误代码:

线程1:EXC_BAD_ACCESS(代码= 1,地址= 0x0)

Crash Message Example 在崩溃之前输出(通过崩溃,我只是意味着它继续降落在空白页上):

2018-04-14 20:34:17.840760+1200 MPM[1520:450438] 4.11.0 - [Firebase/Analytics][I-ACS023007] Firebase Analytics v.40100000 started
2018-04-14 20:34:17.840831+1200 MPM[1520:450438] 4.11.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see ...)
2018-04-14 20:34:18.603581+1200 MPM[1520:450344] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2018-04-14 20:34:18.605545+1200 MPM[1520:450344] [MC] Reading from public effective user settings.
2018-04-14 20:34:18.635084+1200 MPM[1520:450442] TIC Read Status [3:0x0]: 1:57
2018-04-14 20:34:18.635136+1200 MPM[1520:450442] TIC Read Status [3:0x0]: 1:57
2018-04-14 20:34:18.848190+1200 MPM[1520:450455] TIC Read Status [1:0x0]: 1:57
2018-04-14 20:34:18.848245+1200 MPM[1520:450455] TIC Read Status [1:0x0]: 1:57
2018-04-14 20:34:19.214792+1200 MPM[1520:450438] TIC Read Status [5:0x0]: 1:57
2018-04-14 20:34:19.214887+1200 MPM[1520:450438] TIC Read Status [5:0x0]: 1:57
2018-04-14 20:34:19.224559+1200 MPM[1520:450438] TIC Read Status [4:0x0]: 1:57
2018-04-14 20:34:19.224638+1200 MPM[1520:450438] TIC Read Status [4:0x0]: 1:57
2018-04-14 20:34:29.910232+1200 MPM[1520:450344] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
2018-04-14 20:34:29.914038+1200 MPM[1520:450445] TIC Read Status [6:0x0]: 1:57
2018-04-14 20:34:29.914066+1200 MPM[1520:450445] TIC Read Status [6:0x0]: 1:57
2018-04-14 20:34:30.533306+1200 MPM[1520:450442] TIC Read Status [7:0x0]: 1:57
2018-04-14 20:34:30.533410+1200 MPM[1520:450442] TIC Read Status [7:0x0]: 1:57
2018-04-14 20:34:30.659726+1200 MPM[1520:450619] TIC Read Status [8:0x0]: 1:57
2018-04-14 20:34:30.659861+1200 MPM[1520:450619] TIC Read Status [8:0x0]: 1:57
2018-04-14 20:34:31.336759+1200 MPM[1520:450551] TIC Read Status [9:0x0]: 1:57
2018-04-14 20:34:31.336833+1200 MPM[1520:450551] TIC Read Status [9:0x0]: 1:57
2018-04-14 20:34:35.499882+1200 MPM[1520:450551] TIC Read Status [10:0x0]: 1:57
2018-04-14 20:34:35.499977+1200 MPM[1520:450551] TIC Read Status [10:0x0]: 1:57
2018-04-14 20:34:37.613908+1200 MPM[1520:450619] TIC Read Status [2:0x1d416ff00]: 1:57
2018-04-14 20:34:37.613974+1200 MPM[1520:450619] TIC Read Status [2:0x1d416ff00]: 1:57
(lldb) 

这里有任何想法吗?在这一点上,我完全被难倒了。甚至可以找到更详细的崩溃消息!

管理以在重新启动物理设备并再次运行后获得此输出

018-04-14 20:49:32.065664+1200 MPM[259:6493] 4.11.0 - [Firebase/Analytics][I-ACS023007] Firebase Analytics v.40100000 started
2018-04-14 20:49:32.065727+1200 MPM[259:6493] 4.11.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see ...)
2018-04-14 20:49:32.313875+1200 MPM[259:6335] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2018-04-14 20:49:32.314851+1200 MPM[259:6335] [MC] Reading from public effective user settings.
2018-04-14 20:49:32.629858+1200 MPM[259:6496] TIC Read Status [1:0x0]: 1:57
2018-04-14 20:49:32.629930+1200 MPM[259:6496] TIC Read Status [1:0x0]: 1:57
2018-04-14 20:49:32.769607+1200 MPM[259:6496] TIC Read Status [2:0x0]: 1:57
2018-04-14 20:49:32.769667+1200 MPM[259:6496] TIC Read Status [2:0x0]: 1:57
2018-04-14 20:49:36.901270+1200 MPM[259:6496] [] tcp_timers tcp[3] retransmit SYN 3
2018-04-14 20:49:36.983026+1200 MPM[259:6496] [] tcp_timers tcp[3] retransmit SYN 4
2018-04-14 20:49:37.065395+1200 MPM[259:6496] [] tcp_timers tcp[3] retransmit SYN 5
2018-04-14 20:49:37.144244+1200 MPM[259:6496] [] tcp_timers tcp[3] retransmit SYN 6
2018-04-14 20:49:37.305612+1200 MPM[259:6496] [] tcp_timers tcp[3] retransmit SYN 7
2018-04-14 20:49:37.620292+1200 MPM[259:6496] [] tcp_timers tcp[3] retransmit SYN 8
2018-04-14 20:49:38.213878+1200 MPM[259:6335] [Warning] Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<SFAuthenticationViewController: 0x13c870600>)
2018-04-14 20:49:42.662630+1200 MPM[259:6496] TIC Read Status [3:0x0]: 1:57
2018-04-14 20:49:42.662738+1200 MPM[259:6496] TIC Read Status [3:0x0]: 1:57
2018-04-14 20:49:43.125171+1200 MPM[259:6521] [] tcp_timers tcp[4] retransmit SYN 3
2018-04-14 20:49:43.207601+1200 MPM[259:6521] [] tcp_timers tcp[4] retransmit SYN 4
2018-04-14 20:49:43.290081+1200 MPM[259:6521] [] tcp_timers tcp[4] retransmit SYN 5
2018-04-14 20:49:43.369637+1200 MPM[259:6521] [] tcp_timers tcp[4] retransmit SYN 6
2018-04-14 20:49:43.530976+1200 MPM[259:6521] [] tcp_timers tcp[4] retransmit SYN 7
2018-04-14 20:49:43.846252+1200 MPM[259:6521] [] tcp_timers tcp[4] retransmit SYN 8
2018-04-14 20:49:44.475763+1200 MPM[259:6521] [] tcp_timers tcp[4] retransmit SYN 9
2018-04-14 20:49:47.529539+1200 MPM[259:6493] [] tcp_timers tcp[5] retransmit SYN 3
2018-04-14 20:49:47.603154+1200 MPM[259:6493] [] tcp_timers tcp[5] retransmit SYN 4
2018-04-14 20:49:47.679578+1200 MPM[259:6493] [] tcp_timers tcp[5] retransmit SYN 5
2018-04-14 20:49:47.756423+1200 MPM[259:6493] [] tcp_timers tcp[5] retransmit SYN 6
2018-04-14 20:49:47.905496+1200 MPM[259:6493] [] tcp_timers tcp[5] retransmit SYN 7
2018-04-14 20:49:48.257627+1200 MPM[259:6491] TIC Read Status [4:0x0]: 1:57
2018-04-14 20:49:48.257731+1200 MPM[259:6491] TIC Read Status [4:0x0]: 1:57
2018-04-14 20:49:49.175122+1200 MPM[259:6491] TIC Read Status [5:0x0]: 1:57
2018-04-14 20:49:49.175221+1200 MPM[259:6491] TIC Read Status [5:0x0]: 1:57
2018-04-14 20:50:13.674495+1200 MPM[259:6702] TIC Read Status [6:0x0]: 1:57
2018-04-14 20:50:13.674595+1200 MPM[259:6702] TIC Read Status [6:0x0]: 1:57
2018-04-14 20:50:21.735145+1200 MPM[259:6736] TIC Read Status [9:0x0]: 1:57
2018-04-14 20:50:21.735254+1200 MPM[259:6736] TIC Read Status [9:0x0]: 1:57
2018-04-14 20:50:22.448789+1200 MPM[259:6335] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
2018-04-14 20:50:22.449513+1200 MPM[259:6335] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
2018-04-14 20:50:23.017697+1200 MPM[259:6493] TIC Read Status [10:0x0]: 1:57
2018-04-14 20:50:23.017805+1200 MPM[259:6493] TIC Read Status [10:0x0]: 1:57
2018-04-14 20:50:28.214627+1200 MPM[259:6491] TIC Read Status [11:0x0]: 1:57
2018-04-14 20:50:28.214717+1200 MPM[259:6491] TIC Read Status [11:0x0]: 1:57
2018-04-14 20:50:28.718297+1200 MPM[259:6335] [Snapshotting] Snapshotting a view (0x13f01c400, UIKeyboardImpl) that is not in a visible window requires afterScreenUpdates:YES.
2018-04-14 20:50:33.931411+1200 MPM[259:6335] +[CATransaction synchronize] called within transaction
2018-04-14 20:50:33.931806+1200 MPM[259:6335] +[CATransaction synchronize] called within transaction
2018-04-14 20:50:33.932168+1200 MPM[259:6335] +[CATransaction synchronize] called within transaction
2018-04-14 20:50:33.932495+1200 MPM[259:6335] +[CATransaction synchronize] called within transaction
2018-04-14 20:50:33.932496+1200 MPM[259:6521] TIC Read Status [8:0x1cc16f180]: 1:57
2018-04-14 20:50:33.932609+1200 MPM[259:6521] TIC Read Status [8:0x1cc16f180]: 1:57
(lldb) 

在Xcode给我输出之后我相信它与我试图加载视图控制器视图的方式有关吗?

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    //Configure Firebase
    FirebaseApp.configure()
    FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
    //Create window and assign root view controller, since not using storyboard
    window = UIWindow()
    let vc = MainTabBarController()
    window?.rootViewController = vc
    window?.makeKeyAndVisible()
    return true
}

在遵循添加断点的建议后,我能够发现应用程序永远不会超过下面的第171行:

code with breakpoints where error ocurrs

干杯

0 个答案:

没有答案