2012-07-24 128 views
-1

我有一個應用程序,發佈並獲取數據使用webservice它工作正常,但在測試應用程序嚴格崩潰的消息應用程序退出異常與信號9(殺死)iPhone應用程序在連接到遠程服務器時隨機崩潰?

Mon Jul 16 21:07:55 unknown MyApp[167] <Warning>: NVVC Dealloc 
     Mon Jul 16 21:08:23 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.company.MyApp[0xe271]) Bug: launchd_core_logic.c:2688 (24132):10 
     Mon Jul 16 21:08:23 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.company.MyApp[0xe271]) Working around 5020256. Assuming the job crashed. 
     Mon Jul 16 21:08:23 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.company.MyApp[0xe271]) Job appears to have crashed: Segmentation 
     fault 
     Mon Jul 16 21:08:23 unknown SpringBoard[29] <Warning>: Application 'MyApp' exited abnormally with signal 11: Segmentation fault 
     Mon Jul 16 21:09:04 unknown lockdownd[20] <Error>: (0x403000) handle_connection: Could not receive USB message #7 from Xcode. Killing connection 
     Mon Jul 16 22:00:39 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.apple.mobilemail[0x55fb]) Exited: Killed 
     Mon Jul 16 22:00:39 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.apple.mobilephone[0xa13c]) Exited: Killed 
     Mon Jul 16 22:00:39 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.MyApp.app[0x137]) Exited: Killed 
     Mon Jul 16 22:00:39 unknown com.apple.launchd[1] <Notice>: (com.apple.accessoryd) Exited: Killed 
     Mon Jul 16 22:00:41 unknown SpringBoard[29] <Warning>: Application 'Mail' exited abnormally with signal 9: Killed 
     Mon Jul 16 22:00:41 unknown SpringBoard[29] <Warning>: Memory level is not normal (15%). Delaying auto-relaunch of 'Mail' for 30 seconds. Mon Jul 16 22:00:41 unknown SpringBoard[29] <Warning>: Application 'app' exited abnormally with signal 9: Killed 
     Mon Jul 16 22:00:42 unknown SpringBoard[29] <Warning>: Application 'Phone' exited abnormally with signal 9: Killed 

我googled左右,但我找不到任何解決方案或殺死app.please的原因幫我解決問題。

編輯#2 在這裏,我添加了一些代碼,我在我的應用程序崩潰。

@try { 

    [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; 

    NSUserDefaults *defaults2 = [NSUserDefaults standardUserDefaults]; 

    NSString *string = [NSString stringWithFormat:URL]; 

       NSURL *url = [NSURL URLWithString:string]; 
      NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL: url]; 
       // NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:synStr]]; 
      NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; 
      [connection start]; 
      [connection release]; 
      if(label != nil){ 
     progressView = [[ProgressView showHUDAddedTo:self.tabBarController.view animated:YES]retain]; 
     progressView.labelText = label; 
     } 

     [request release]; 
      } 
    @catch (NSException * e) { 
    } 
+0

很難說沒有看你的代碼。 – janusbalatbat 2012-07-24 11:23:39

+0

爲什麼你發佈這個問題兩次,還有很多其他人發佈了相同的崩潰日誌。從那些舊的問題答案和提示開始,看看你能否更好地發現問題。 – rckoenes 2012-07-24 11:37:15

+0

親愛的janusfidel,請參閱我的第二次編輯代碼,這裏是我懷疑崩潰的代碼片段。 – Srinivas4iPhone 2012-07-24 12:23:11

回答

0

您錯誤地使用了NSURLConnection。如果你看看here,你可以看到你正在開始異步連接。看起來您在連接對象完成之前釋放連接對象,這導致了分段錯誤。