0
시작할 때 내 응용 프로그램이 충돌합니다. 기본 제공 프레임 워크의 메시지 만 스택 추적합니다. 충돌 로그에서 발췌 :시작시 iPhone 응용 프로그램이 충돌 함 내장 된 프레임 워크의 스택 추적 메시지에서만
OS Version: iPhone OS 3.1.3 (7E18)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000e6000
Crashed Thread: 0
Thread 0 Crashed:
0 CoreGraphics 0x339305d8 argb32_image_mark_RGB32 + 704
1 CoreGraphics 0x338dbcd4 argb32_image + 1640
2 libRIP.A.dylib 0x320d99f0 ripl_Mark
3 libRIP.A.dylib 0x320db3ac ripl_BltImage
4 libRIP.A.dylib 0x320cc2a0 ripc_RenderImage
5 libRIP.A.dylib 0x320d5238 ripc_DrawImage
6 CoreGraphics 0x338d7da4 CGContextDelegateDrawImage + 80
7 CoreGraphics 0x338d7d14 CGContextDrawImage + 364
8 UIKit 0x324ee68c compositeCGImageRefInRect
9 UIKit 0x324ee564 -[UIImage(UIImageDeprecated) compositeToRect:fromRect:operation:fraction:]
10 UIKit 0x32556f44 -[UINavigationBar drawBackButtonBackgroundInRect:withStyle:pressed:]
11 UIKit 0x32556b00 -[UINavigationItemButtonView drawRect:]
12 UIKit 0x324ecbc4 -[UIView(CALayerDelegate) drawLayer:inContext:]
13 QuartzCore 0x311cacfc -[CALayer drawInContext:]
14 QuartzCore 0x311cab00 backing_callback
15 QuartzCore 0x311ca388 CABackingStoreUpdate
16 QuartzCore 0x311c978c -[CALayer _display]
17 QuartzCore 0x311c941c -[CALayer display]
18 QuartzCore 0x311c9368 CALayerDisplayIfNeeded
19 QuartzCore 0x311c8848 CA::Context::commit_transaction(CA::Transaction*)
20 QuartzCore 0x311c846c CA::Transaction::commit()
21 QuartzCore 0x311c8318 +[CATransaction flush]
22 UIKit 0x324f5e94 -[UIApplication _reportAppLaunchFinished]
23 UIKit 0x324a7a80 -[UIApplication _runWithURL:sourceBundleID:]
24 UIKit 0x324f8df8 -[UIApplication handleEvent:withNewEvent:]
25 UIKit 0x324f8634 -[UIApplication sendEvent:]
26 UIKit 0x324f808c _UIApplicationHandleEvent
27 GraphicsServices 0x335067dc PurpleEventCallback
28 CoreFoundation 0x323f5524 CFRunLoopRunSpecific
29 CoreFoundation 0x323f4c18 CFRunLoopRunInMode
30 UIKit 0x324a6c00 -[UIApplication _run]
31 UIKit 0x324a5228 UIApplicationMain
32 Journaler 0x000029ac main (main.m:14)
33 Journaler 0x00002948 start + 44
파일 main.m
는 가능한 한 간단하다 :
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil); // line 14
[pool release];
return retVal;
}
무엇 내 원인 응용 프로그램 충돌?
JournalerAppDelegate.h
:
// ...
@interface JournalerAppDelegate : NSObject <UIApplicationDelegate> {
// ...
UINavigationController *navigationController;
AccountsViewController *rootViewController;
// ...
}
JournalerAppDelegate.m
:
// ...
@implementation JournalerAppDelegate
// ...
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// ...
rootViewController = [[AccountsViewController alloc] initWithNibName:@"AccountsViewController" bundle:nil];
navigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController];
NSString *accountKey = // ...;
if (accountKey) {
LJAccount *account = // ...;
if (account) {
[rootViewController view]; // forces to load view
[rootViewController openAccount:account animated:NO];
}
}
[window addSubview:navigationController.view];
[window makeKeyAndVisible];
}
// ...
AccountsViewController.h
:
// ...
@interface AccountsViewController : UIViewController</* ... */> {
// ...
NSMutableDictionary *cacheTabBarControllers;
// ...
}
AccountsViewController.m
:
예, 내 앱이 시작될 때 이전 UI 상태를 복원하려고 할 수 있습니다. 상태는 [JournalerAppDelegate applicationDidFinishLaunching :]에 복원됩니다. –
제 질문에 코드 일부를 추가했습니다. –
이 충돌이 지속적으로 또는 산발적으로 발생합니까? – Jasarien