Привет всем Я просматриваю удаленные изображения в ячейке tableview. Пока я прокручивал изображения, удалял один из них и перезагружал их, мое приложение вышло, показывая это предупреждающее сообщение.Ошибка, Putpkt write failed
Ignoring packet error, continuing...
gdb stack trace at 'putpkt: write failed':
0 gdb-arm-apple-darwin
0x0019026b remote_backtrace_self + 54
recent remote packets prior to 'putpkt: write failed':
Код для сотовых изображений Tableview является
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *[email protected]"cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:celltype];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"] autorelease];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.backgroundColor=[UIColor clearColor];
//cell.textLabel.text=[[resultarray objectAtIndex:indexPath.row] valueForKey:@"Service"];
/*UIImage *indicatorImage = [UIImage imageNamed:@"indicator.png"];
cell.accessoryView =
[[[UIImageView alloc]
initWithImage:indicatorImage]
autorelease];*/
/*NSThread *thread=[[NSThread alloc]initWithTarget:self selector:@selector() object:nil];
[thread setStackSize:44];
[thread start];*/
cell.backgroundView=[[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"cell.png"]]autorelease];
// [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"back.png"]] autorelease];
cell.selectionStyle=UITableViewCellSelectionStyleNone;
}
UIImageView *imageView= [[UIImageView alloc] initWithFrame:CGRectMake(19, 15, 75, 68)];
imageView.contentMode = UIViewContentModeScaleToFill;
frameImagePath= [NSString stringWithFormat:@"http://XYZplayz.com/snapit/products/%@",[[productInfoArray objectAtIndex:indexPath.row]valueForKey:@"Image"]];
[imageView setImageWithURL:[NSURL URLWithString:frameImagePath]placeholderImage:[UIImage imageNamed:@"no_image.png"]];
[cell.contentView addSubview:imageView];
[imageView release];
imageView = nil;
return cell;
}
И метод я называю, чтобы перезагрузить данные в таблице после удаления является
-(void)viewWillAppear:(BOOL)animated
{
spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
spinner.center = self.view.center;
[self.view addSubview:spinner];
[spinner startAnimating];
[[SnapItParsing sharedInstance]assignSender:self];
[[SnapItParsing sharedInstance]startParsingForShowProducts:appDel.userIdString];
}
Вы можете показать исходный код, который мог вызвать эту ошибку. – Robin
Это произошло. Однажды со мной после обновления изображений в tableviewcell с сервера. Посмотрите обновленный код, но я не думаю, что это происходит из-за этого кода. , код в порядке. Есть что-то еще, что я забываю – Sabby
@sabby ни один из кода, который вы отправили, выглядит некорректно. Призывы к объекту '[SnapItParsing sharedInstance]' являются единственными вещами, которые выглядят неуместными. Что происходит с этим объектом? –