iTunes에서 충돌 로그를 수신하고 있습니다. 이상하게 보입니다.iPhone 응용 프로그램이 시작될 때 충돌이 발생합니다.
우리는 이전에 ApplicationDidFinishLaunching에서 오랜 시간이 걸리는 데 문제가있었습니다. 이것은 applicationDidFinishLaunching 내부에서 너무 많은 작업을 수행하여 발생했으며 느린 장치에서는 20 초를 초과했습니다.
이 문제를 해결하기 위해 우리는 모든 설치 코드를 ApplicationDidFinishLaunching 밖으로 옮기고 특수 보조 LoadController로 옮겼습니다. 그 위에 우리는 그 컨트롤러 내부의 설정 코드를 별도의 스레드로 옮겼습니다.
그러나 크래시 로그에 [UIApplication _reportAppLaunchFinished]
에 대한 호출이 표시 되더라도 Google 앱이 정상적으로 실행되지 않았다는 오류 로그가 계속 표시됩니다. 나에게 이것은 앱 실행이 완료되었음을 나타내며 설정 코드를 실행하는 동안 언제든지 앱을 가져갈 수 있습니다. 아래는 충돌 로그입니다.
도움을 주셔서 감사합니다.
Incident Identifier: 429360D5-6B02-49BE-9A0F-164DC521BE36
Hardware Model: iPod2,1
Process: XYZ [357]
Path: /var/mobile/Applications/D5038F26-CC5B-48E5-824E-090163B5C0C4/XYZ.app/XYZ
Identifier: XYZ
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2010-09-28 13:35:25.138 -0700
OS Version: iPhone OS 4.0 (8A293)
Report Version: 104
Exception Type: 00000020
Exception Codes: 0x8badf00d
Highlighted Thread: 0
Application Specific Information:
com.xyz.xyz failed to launch in time
elapsed total CPU time (seconds): 20.180 (user 15.910, system 4.270), 100% CPU
elapsed application CPU time (seconds): 10.960, 54% CPU
Thread 0:
0 libobjc.A.dylib 0x3523a50c objc_msgSend + 44
1 CoreFoundation 0x363bf568 -[__NSArrayM addObject:]
2 XYZ 0x0000a152 -[Database fetchDrinks:] + 290
3 XYZ 0x0000677c -[Database getAllDrinks] + 136
4 XYZ 0x0003a164 -[SecondaryLoadingViewController viewDidLoad] + 208
5 UIKit 0x323e582c -[UIViewController view]
6 UIKit 0x323f9628 -[UIViewController viewControllerForRotation]
7 UIKit 0x323f9574 -[UIViewController _visibleView]
8 UIKit 0x323f94fc -[UIViewController rotatingContentViewForWindow:]
9 UIKit 0x3249a514 -[UIClientRotationContext initWithClient:toOrientation:duration:andWindow:]
10 UIKit 0x32499314 -[UIWindow _setRotatableClient:toOrientation:duration:force:]
11 UIKit 0x32497d78 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:]
12 UIKit 0x32497534 -[UIViewController presentModalViewController:withTransition:]
13 UIKit 0x324977fc -[UIViewController _tryRecursivelyPresentModalViewController:withTransition:]
14 UIKit 0x324977c0 -[UIViewController _tryRecursivelyPresentModalViewController:withTransition:]
15 UIKit 0x32496e00 -[UIViewController presentModalViewController:withTransition:]
16 UIKit 0x3249699c -[UIViewController presentModalViewController:animated:]
17 XYZ 0x000044a2 -[HomeViewController viewDidLoad] + 82
18 UIKit 0x323e582c -[UIViewController view]
19 UIKit 0x323fd68c -[UIViewController contentScrollView]
20 UIKit 0x323fd4ac -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:]
21 UIKit 0x323fd358 -[UINavigationController _layoutViewController:]
22 UIKit 0x323fccb8 -[UINavigationController _startTransition:fromViewController:toViewController:]
23 UIKit 0x323fca1c -[UINavigationController _startDeferredTransitionIfNeeded]
24 UIKit 0x323fc90c -[UINavigationController viewWillLayoutSubviews]
25 UIKit 0x323fc43c -[UILayoutContainerView layoutSubviews]
26 UIKit 0x32370ab0 -[UIView(CALayerDelegate) _layoutSublayersOfLayer:]
27 CoreFoundation 0x363c85ba -[NSObject(NSObject) performSelector:withObject:]
28 QuartzCore 0x30c8c61c 0x30c82000 + 42524
29 QuartzCore 0x30c8c2a4 0x30c82000 + 41636
30 QuartzCore 0x30c8bbb0 0x30c82000 + 39856
31 QuartzCore 0x30c8b7d8 0x30c82000 + 38872
32 QuartzCore 0x30c8b684 0x30c82000 + 38532
33 UIKit 0x323d99d4 -[UIApplication _reportAppLaunchFinished]
34 UIKit 0x3251d77c -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:]
35 UIKit 0x323d87b8 -[UIApplication handleEvent:withNewEvent:]
36 UIKit 0x323d7eb4 -[UIApplication sendEvent:]
37 UIKit 0x323d77e8 _UIApplicationHandleEvent
38 GraphicsServices 0x33c4dedc PurpleEventCallback
39 CoreFoundation 0x364142ac __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
40 CoreFoundation 0x364161d6 __CFRunLoopDoSource1
41 CoreFoundation 0x3641718e __CFRunLoopRun
42 CoreFoundation 0x363be0bc CFRunLoopRunSpecific
43 CoreFoundation 0x363bdfca CFRunLoopRunInMode
44 UIKit 0x32363b18 -[UIApplication _run]
45 UIKit 0x32361fb8 UIApplicationMain
46 XYZ 0x00002b20 main + 36
47 XYZ 0x00002af0 start + 32
UPDATE 내가 별도의 스레드의 시간 가져 오기 코드를 소모 (전용 응용 프로그램 업데이트에서 발생) 실행하려고하고 . 나는 AlertView를 사용하여 내장 된 진행 표시 줄을 사용하여 GUI를 업데이트하기 때문에 사용자는 여전히 어떤 일이 일어나고 있음을 알고 있습니다. 우리의 테스트 과정에서 이것은 잘 동작합니다. 아래는 작동하지 않는 스레드 코드입니다. 크래시 로그는 모든 작업이 주 스레드에서 수행되고 있음을 나타냅니다.
if ([database appDidUpdate] == YES) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
dbImportThread = [[NSThread alloc] initWithTarget:self selector:@selector(import) object:nil];
[dbImportThread start];
[pool release];
- (void)import {
//do importing work and update the gui with the progress
}
이 정보는 앱에서 즉시 필요한 정보입니다.게으른로드는 휴대 기기에서 친구 여야합니다. @Jesse Naugher의 +1은 –
입니다. 모바일 앱 디자인에서 앱을 시작하는 동안 사용자가 20 초 이상 서 있어야하는 경우 크래시보다 더 큰 문제가 발생했습니다. 그것은 단지 나쁜 디자인입니다. 즉시 표시 할 데이터 만로드하여 모든 문제를 해결하고 전체적으로 앱을 개선 할 수 있습니다. – TechZen
이 로딩은 실제로 업데이트에서만 발생합니다. 우리는 사용자가 입력 한 많은 데이터를 사용자 기본값으로 저장합니다. 업데이트가 새 데이터베이스와 함께 제공되는 경우 해당 사용자 데이터를 새 db로 가져와야합니다. 따라서이 경우는 너무 자주 발생하지는 않지만 업데이트시 느린 장치를 사용하는 사람들은 항상 문제가 발생합니다. – jmurphy