0
使用我的iPad應用程序時,我得到了一系列警告(3月18日11:18:06內核[0]:IOSurface警告:緩衝區分配失敗。 X 606 FMT:42475241大小:2387968字節爲單位)在短短20秒,應用程序超過50次開車撞以下報告:「IOSurface警告:緩衝區分配失敗」導致應用程序崩潰
Mar 18 11:18:35 ReportCrash[1428] <Notice>: Formulating crash report for process eDetail[1353]
Mar 18 11:18:35 ReportCrash[1428] <Error>: libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system version dictionary
Mar 18 11:18:35 ReportCrash[1428] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/eDetail_2013-03-19-111833_iPad.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Mar 18 11:18:35 com.apple.launchd[1] <Warning>: (UIKitApplication:com.****.profile***[0x1024]) Job appears to have crashed: Segmentation fault: 11
Mar 18 11:18:35 backboardd[26] <Warning>: Application 'UIKitApplication:com.****.profile***[0x1024]' exited abnormally with signal 11: Segmentation fault: 11
任何人可以幫我找出這個問題的根源並解決它好。
編輯:這已經顯示出警告在這一點上的代碼太:
NSString *docsDir;
NSArray *dirPaths;
filemgr = [NSFileManager defaultManager];
// Get the documents directory
dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
docsDir = [dirPaths objectAtIndex:0];
// Build the path to the data file
dataFilePath = [[NSString alloc] initWithString: [docsDir stringByAppendingPathComponent: @"data.archive"]];
// Check if the file already exists
if ([filemgr fileExistsAtPath: dataFilePath]){
NSMutableDictionary *dataDict = [NSKeyedUnarchiver unarchiveObjectWithFile: dataFilePath];
if ([dataDict count] != 0) {
m_cUserName.text = [dataDict objectForKey:@"UserName"];
m_cPassword.text = @"";
if([[dataDict objectForKey:@"AccountType"] isEqualToString:@"Specialty"]){
m_cBgImage.image = [UIImage imageNamed:@"specialityloginbg.png"];
}else {
m_cBgImage.image = [UIImage imageNamed:@"infusionloginbg"];
}
}
}
希望這可以幫助。
不,沒有人可以幫助你,因爲你沒有給我們任何關於你的應用在做什麼的線索。也許你陷入了一個快速分配IOSurface的循環?我們無法知道。 – borrrden 2013-03-19 06:18:16
目前我試圖展示一堆圖片,當它給我這個報告。之後,我非常頻繁地收到此錯誤,並且沒有加載任何圖像。 – execv 2013-03-19 06:25:48
然後顯示該代碼。 – borrrden 2013-03-19 06:26:37