設置我的應用程序可以這樣運行:的UIImagePickerController EXC_BAD_ACCESS錯誤
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:
[[UIScreen mainScreen] bounds]];
UIImagePickerController* picker = [[UIImagePickerController alloc] init];
self.viewController = picker;
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
後出現圖片選擇器,我選擇,例如,「相機膠捲」。之後,我按下後退按鈕(標題爲「照片」)。應用程序崩潰導致EXC_BAD_ACCESS錯誤。 當我啓用殭屍對象時,我收到「EXC_ARM_BREAKPOINT(subcode = 0xdefe)」錯誤,並顯示以下日誌。或者:
[UIView willRemoveSubview:]: message sent to deallocated instance 0x2088ea20
,或者如果我繼續進行圖像選擇:
-[PLImageScrollView willRemoveSubview:]: message sent to deallocated instance 0x1d82c910
,如果我創建一個新項目。另一方面,把只說代碼中的AppDelegate,代碼工作,因爲它應該 - 沒有錯誤。
現在,我開始一個新項目,我將複製我之前項目中的內容,以便找出問題所在。如果有人有想法,爲什麼會出現這些錯誤,請分享您的想法。
是ARC項目嗎? – Durgaprasad