IPad应用程序在设备上崩溃

IPad应用程序在设备上崩溃,ipad,uitableview,ios4,Ipad,Uitableview,Ios4,我正在为IPad开发一个应用程序,其中包含UITableView。该应用程序在模拟器上运行良好,但在安装并首次运行时会在设备上崩溃。当我第二次尝试运行应用程序时,它工作正常。我不知道问题出在哪里。 同样的代码在IPhone上运行良好,但在IPad上崩溃。 我正在为表使用以下代码 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { stat

我正在为IPad开发一个应用程序,其中包含
UITableView
。该应用程序在模拟器上运行良好,但在安装并首次运行时会在设备上崩溃。当我第二次尝试运行应用程序时,它工作正常。我不知道问题出在哪里。 同样的代码在IPhone上运行良好,但在IPad上崩溃。 我正在为表使用以下代码

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

static NSString *MythoViewCellIdentifier = @"MythoViewCellIdentifier ";

UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:MythoViewCellIdentifier];



if (cell==nil)
{
    cell=[[[UITableViewCell alloc] initWithFrame:CGRectZero] autorelease];        
}

[self getMythoData];


UIImageView *imgLogo =[[UIImageView alloc] initWithFrame:CGRectMake(-1,0,37,35)];
imgLogo.backgroundColor =[UIColor clearColor];
imgLogo.image=[UIImage imageNamed:@"bullet_swastik.png"];
[cell.contentView addSubview:imgLogo];



UITextView *txtDetails =[[UITextView alloc] initWithFrame:CGRectMake(37,34,740,200)];
txtDetails.backgroundColor =[UIColor clearColor];
txtDetails.editable=NO;
txtDetails.font=[UIFont systemFontOfSize:25.0];
[cell.contentView addSubview:txtDetails];



//    adding details to the cell
txtDetails.text = [NSString stringWithFormat:@"%@",[FinalmythoData objectAtIndex:indexPath.row]];
cell.selectionStyle = UITableViewCellSelectionStyleNone;


[txtDetails release];

return cell;
}




 I'm getting the following error

Exception Type:  EXC_BAD_ACCESS (SIGSEGV) Exception Codes:
KERN_INVALID_ADDRESS at 0x00000000 Crashed Thread:  0




    Thanks 
该应用程序在模拟器上运行良好,但在安装并首次运行时会在设备上崩溃。当我第二次尝试运行应用程序时,它工作正常


从模拟器中删除应用程序,清理项目,重建,然后再次运行应用程序。很可能它也会在模拟器上崩溃。

确认您的应用程序没有加载任何可能导致崩溃的重数据(图像等)


在设备上运行您的应用程序,并使用Instrument或任何其他工具确认它没有在内存不足的情况下运行。

它到底在哪里崩溃?它在哪一行崩溃?调试器应该能够告诉您这一点。如果调试器没有告诉您,您如何知道它在上面的代码中?因为应用程序在包含表的任何位置都会崩溃。不包含表的视图使用finearray count即[FinalMyToData count];奇怪。然后将您得到的输出发布到控制台或崩溃日志.exe\u bad\u access(sigsegv)上。我得到了这个结果你肯定还有更多。。。什么是堆栈跟踪,等等。请将其粘贴在问题的末尾…它不会在模拟器和设备上显示任何内存不足警告