应用程序意外退出,但在与xcode连接时运行顺畅

时间:2014-09-19 11:17:43

标签: ios xcode xcode-organizer

我正面临一个奇怪的错误,我的应用程序在启动后立即崩溃与xcode断开连接但是当我运行此应用程序与xcode连接它工作正常。我的设备日志外观是

 Incident Identifier: 1C4813
CrashReporter Key:   c3535f303c4f4448be66e3cdefaf61a1b63074ca
Hardware Model:      iPad2,1
Process:             Depilex [1295]
Path:                /var/mobile/Applications/22CA706F-5055-47AE-8F7C-A3A1558AF6C1/Depilex.app/Depilex
Identifier:          com.ARR.depilex
Version:             1.2 (1.2)
Code Type:           ARM (Native)
Parent Process:      launchd [1]

Date/Time:           2014-09-19 16:34:54.972 +0500
OS Version:          iOS 7.1 (11D167)
Report Version:      104

Exception Type:  00000020
Exception Codes: 0x000000008badf00d
Highlighted Thread:  0

Application Specific Information:
com.ARR.depilex failed to launch in time

Elapsed total CPU time (seconds): 4.100 (user 4.100, system 0.000), 6% CPU 
Elapsed application CPU time (seconds): 1.121, 2% CPU

Thread 0:
0   libsystem_kernel.dylib          0x3953eaa8 semaphore_wait_trap + 8
1   libdispatch.dylib               0x3947e23c _dispatch_semaphore_wait_slow + 172
2   CFNetwork                       0x2e06a8c8 CFURLConnectionSendSynchronousRequest + 264
3   Foundation                      0x2ee3d51e +[NSURLConnection sendSynchronousRequest:returningResponse:error:] + 110
4   Foundation                      0x2ee0d666 -[NSData(NSData) initWithContentsOfURL:] + 182
5   Foundation                      0x2ee0d596 +[NSData(NSData) dataWithContentsOfURL:] + 38
6   Depilex                         0x0012c09a -[Controller slideImagesByStk] (Controller.m:141)
7   Depilex                         0x0012b27a -[Controller viewDidLoad] (Controller.m:64)
8   UIKit                           0x30ccc4c6 -[UIViewController loadViewIfRequired] + 514
9   UIKit                           0x30d76bfc -[UINavigationController _layoutViewController:] + 28
10  UIKit                           0x30d76b12 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 226
11  UIKit                           0x30d760ee -[UINavigationController _startTransition:fromViewController:toViewController:] + 74
12  UIKit                           0x30d75e18 -[UINavigationController _startDeferredTransitionIfNeeded:] + 568
13  UIKit                           0x30d75b88 -[UINavigationController __viewWillLayoutSubviews] + 40
14  UIKit                           0x30d75b20 -[UILayoutContainerView layoutSubviews] + 180
15  UIKit                           0x30cc7d74 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 376
16  QuartzCore                      0x30945626 -[CALayer layoutSublayers] + 138
17  QuartzCore                      0x30940e36 CA::Layer::layout_if_needed(CA::Transaction*) + 346
18  QuartzCore                      0x3096fcd8 -[CALayer layoutIfNeeded] + 136
19  UIKit                           0x30d4417e -[UIViewController window:setupWithInterfaceOrientation:] + 238
20  UIKit                           0x30d4279e -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 3494
21  UIKit                           0x30d419ee -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 42
22  UIKit                           0x30d41976 -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 90
23  UIKit                           0x30d4190e -[UIWindow _setRotatableViewOrientation:duration:force:] + 38
24  UIKit                           0x30d39f84 __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 104
25  UIKit                           0x30cce124 -[UIWindow _updateToInterfaceOrientation:duration:force:] + 380
26  UIKit                           0x30d4165c -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 692
27  UIKit                           0x30d41120 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 160
28  UIKit                           0x30cd3060 -[UIWindow addRootViewControllerViewIfPossible] + 456
29  UIKit                           0x30cd0842 -[UIWindow _setHidden:forced:] + 298
30  UIKit                           0x30d3a358 -[UIWindow makeKeyAndVisible] + 56
31  Depilex                         0x000938f4 -[AppDelegate application:didFinishLaunchingWithOptions:] (AppDelegate.m:48)
32  UIKit                           0x30d375a2 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 270
33  UIKit                           0x30d36ef6 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1606
34  UIKit                           0x30d31586 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 710
35  UIKit                           0x30ccd704 -[UIApplication handleEvent:withNewEvent:] + 3536
36  UIKit                           0x30ccc86c -[UIApplication sendEvent:] + 68
37  UIKit                           0x30d30cc4 _UIApplicationHandleEvent + 612
38  GraphicsServices                0x332daaea _PurpleEventCallback + 606
39  GraphicsServices                0x332da6d2 PurpleEventCallback + 30
40  CoreFoundation                  0x2e476ab4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
41  CoreFoundation                  0x2e476a4e __CFRunLoopDoSource1 + 342
42  CoreFoundation                  0x2e475222 __CFRunLoopRun + 1394
43  CoreFoundation                  0x2e3dff4a CFRunLoopRunSpecific + 518
44  CoreFoundation                  0x2e3dfd2e CFRunLoopRunInMode + 102
45  UIKit                           0x30d2feec -[UIApplication _run] + 756
46  UIKit                           0x30d2b168 UIApplicationMain + 1132
47  Depilex                         0x000e9678 main (main.m:16)
48  libdyld.dylib                   0x3949bab4 start + 0

Thread 1:
0   libsystem_kernel.dylib          0x3953e808 kevent64 + 24
1   libdispatch.dylib               0x39480078 _dispatch_mgr_invoke + 228
2   libdispatch.dylib               0x3947fdfe _dispatch_mgr_thread$VARIANT$mp + 34

Thread 2:
0   libsystem_kernel.dylib          0x39551c70 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x395b8bda _pthread_wqthread + 306
2   libsystem_pthread.dylib         0x395b8a94 start_wqthread + 4

Thread 3:
0   libsystem_kernel.dylib          0x39551c70 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x395b8bda _pthread_wqthread + 306
2   libsystem_pthread.dylib         0x395b8a94 start_wqthread + 4

Thread 4 name:  com.apple.NSURLConnectionLoader
Thread 4:
0   libsystem_kernel.dylib          0x3953ea58 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x3953e854 mach_msg + 44
2   CoreFoundation                  0x2e476896 __CFRunLoopServiceMachPort + 150
3   CoreFoundation                  0x2e474fbc __CFRunLoopRun + 780
4   CoreFoundation                  0x2e3dff4a CFRunLoopRunSpecific + 518
5   CoreFoundation                  0x2e3dfd2e CFRunLoopRunInMode + 102
6   Foundation                      0x2ee1f082 +[NSURLConnection(Loader) _resourceLoadLoop:] + 314
7   Foundation                      0x2ee94a5a __NSThread__main__ + 1058
8   libsystem_pthread.dylib         0x395ba916 _pthread_body + 138
9   libsystem_pthread.dylib         0x395ba886 _pthread_start + 98
10  libsystem_pthread.dylib         0x395b8aa0 thread_start + 4

Thread 5 name:  com.apple.CFSocket.private
Thread 5:
0   libsystem_kernel.dylib          0x39551434 __select + 20
1   CoreFoundation                  0x2e47a758 __CFSocketManager + 480
2   libsystem_pthread.dylib         0x395ba916 _pthread_body + 138
3   libsystem_pthread.dylib         0x395ba886 _pthread_start + 98
4   libsystem_pthread.dylib         0x395b8aa0 thread_start + 4

Thread 6:
0   libsystem_kernel.dylib          0x39551c70 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x395b8bda _pthread_wqthread + 306
2   libsystem_pthread.dylib         0x395b8a94 start_wqthread + 4

Thread 7:
0   libsystem_kernel.dylib          0x39551c70 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x395b8bda _pthread_wqthread + 306
2   libsystem_pthread.dylib         0x395b8a94 start_wqthread + 4

No thread state (register information) available
Binary Images:
0x72000 - 0x1a9fff Depilex armv7  <fef57930a219369daa2723b873d1815f> /var/mobile/Applications/22CA706F-5055-47AE-8F7C-A3A1558AF6C1/Depilex.app/Depilex

1 个答案:

答案 0 :(得分:3)

当您在AppDelegate的应用程序中花费太多时间时会发生这种情况:didFinishLaunching方法。如果您做了很多设置工作(加载文件,可能下载或上传某些内容),您必须在后台线程上执行此操作而不是阻止应用程序:didFinishLaunching。

崩溃日志告诉你('com.ARR.depilex未能及时启动'),它还告诉你显然需要这么长时间('0x2ee3d51e + [NSURLConnection sendSynchronousRequest:returningResponse:error:] + 110' )。