2009-10-02 233 views
3

當通過Xcode啓動時,我的應用程序在3.0設備和3.1設備上運行良好,但在通過iTunes安裝時運行在3.1設備上時啓動時崩潰。它的葉子沒有崩潰日誌後面,但把這個到控制檯:iPhone應用程序在無崩潰日誌啓動時退出

Thu Oct 1 19:33:36 unknown mobile_installationd[329] <Error>: 00808e00 install_embedded_profile: Skipping the installation of the embedded profile 
Thu Oct 1 19:33:37 unknown SpringBoard[24] <Warning>: Reloading and rendering all application icons. 
Thu Oct 1 19:33:41 unknown com.apple.debugserver-43[342] <Warning>: debugserver-43 for armv6 Copyright (c) 2007-2009 Apple, Inc. All Rights Reserved. 
Thu Oct 1 19:33:41 unknown com.apple.debugserver-43[342] <Warning>: Connecting to com.apple.debugserver service... 
Thu Oct 1 19:33:41 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.companyname.AppName[0x60c]) Spawned and waiting for the debugger to attach before continuing... 
Thu Oct 1 19:33:42 unknown kernel[0] <Debug>: launchd[343] Builtin profile: container (seatbelt) 
Thu Oct 1 19:33:42 unknown kernel[0] <Debug>: launchd[343] Container: /private/var/mobile/Applications/291BFBE4-F5DC-494D-B7E5-81BED01E508B (seatbelt) 
Thu Oct 1 19:33:42 unknown com.apple.debugserver-43[342] <Warning>: 1 [0156/0903]: error: ::task_for_pid (target_tport = 0x0103, pid = 343, task => 0x0000) 0x000001f5/0x000001f5 0x000001f5/0x000001f5 err = (os/kern) failure (0x00000005) 
Thu Oct 1 19:33:42 unknown com.apple.debugserver-43[342] <Error>: error: MachTask::StartExceptionThread(): task invalid, exception thread start failed. 
Thu Oct 1 19:33:42 unknown com.apple.debugserver-43[342] <Warning>: 2 [0156/0903]: error: ::task_for_pid (target_tport = 0x0103, pid = 343, task => 0x0000) 0x000001f5/0x000001f5 0x000001f5/0x000001f5 err = (os/kern) failure (0x00000005) 
Thu Oct 1 19:33:42 unknown com.apple.debugserver-43[342] <Warning>: 3 [0156/0903]: RNBRunLoopLaunchInferior DNBProcessLaunch() returned error: 'DRHT' 
Thu Oct 1 19:33:42 unknown com.apple.debugserver-43[342] <Warning>: error: failed to launch process (null): failed to get the task for process 343 
Thu Oct 1 19:33:42 unknown com.apple.debugserver-43[342] <Warning>: 4 [0156/1603]: error: ::read (7, 0x28091c, 1024) => -1 err = Bad file descriptor (0x00000009) 
Thu Oct 1 19:33:42 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.companyname.AppName[0x60c]) Bug: launchd_core_logic.c:2649 (23909):10 
Thu Oct 1 19:33:42 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.companyname.AppName[0x60c]) Working around 5020256. Assuming the job crashed. 
Thu Oct 1 19:33:42 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.companyname.AppName[0x60c]) Job appears to have crashed: Segmentation fault 
Thu Oct 1 19:33:42 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.companyname.AppName[0x60c]) Throttling respawn: Will start in 2147483647 seconds 
Thu Oct 1 19:33:42 unknown SpringBoard[24] <Warning>: Application 'AppName' exited abnormally with signal 11: Segmentation fault 
Thu Oct 1 19:34:42 unknown SpringBoard[24] <Notice>: MultitouchHID(208ba0) uilock state: 0 -> 1 

應用程序有一個Default.png文件,並顯示了一會兒,但我認爲可以通過跳板/ launchd會/諸如此類的東西被加載,所以我不認爲這是我實際上跑過的跡象。

我創建了同一個盒子第二個項目,並使用相同的證書和證書來構建它,它建立並通過iTunes沒有問題運行。

+0

安裝後,您的應用通常需要多長時間才能啓動?在10個CPU秒的加載時間後,您的應用程序會自動終止。 – jantimon 2009-10-02 08:14:26

+0

在Default.png節目後大約2秒後它似乎退出了。不過,我會看看啓動時發生了什麼。 – TALlama 2009-10-02 19:26:05

回答

3

我把這個版本作爲原始.app文件放在Dropbox上,儘管codesign -vvvv AppName.app在Dropbox的一面工作,但它在到達測試儀時顯然已經發生了某種變化。認證失敗,申請拒絕發佈。

This blog post是發現,這是起因器樂,和this one是在發現該溶液儀器(zipping the app起來使用zip MyApp.zip -r -y MyApp.app)。

2

嘗試通過註釋掉你在裝載運行代碼隔離問題,看看你的應用程序加載至少它的主窗口。然後,逐漸取消註釋代碼,並使用NSLog語句記錄初始化變量的值(使用調試器不會發生問題,所以我猜NSLog可以)。如果您發現應用程序崩潰需要花費太多時間加載所有內容,請嘗試通過啓動專用背景來保持主線程的大量初始化。