*** -[S3PutObjectoperation_Internal respondsToSelector:]: message sent to deallocated instance 0x43c18fd0
我不太了解ZombIEs检查员的堆栈跟踪,我不确定这是否告诉我任何我可以解决的问题:
# Address category Event Type RefCt Timestamp Size Responsible library Responsible Caller0 0xc071f60 S3PutObjectoperation_Internal Malloc 1 00:14.903.021 48 MyApp -[S3TransferManager upload:]1 0xc071f60 S3PutObjectoperation_Internal Retain 2 00:14.903.032 0 Foundation ____addOperations_block_invoke_02 0xc071f60 S3PutObjectoperation_Internal Release 1 00:14.903.036 0 MyApp -[S3TransferManager upload:]3 0xc071f60 S3PutObjectoperation_Internal Retain 2 00:14.904.154 0 libsystem_sim_blocks.dylib _Block_object_assign4 0xc071f60 S3PutObjectoperation_Internal Retain 3 00:14.904.163 0 libsystem_sim_blocks.dylib _Block_object_assign5 0xc071f60 S3PutObjectoperation_Internal Release 2 00:14.904.164 0 Foundation __destroy_helper_block_4746 0xc071f60 S3PutObjectoperation_Internal Retain 3 00:14.906.549 0 MyApp -[S3PutObjectoperation_Internal start]7 0xc071f60 S3PutObjectoperation_Internal Release 2 00:14.906.554 0 MyApp -[S3PutObjectoperation_Internal start]8 0xc071f60 S3PutObjectoperation_Internal Release 1 00:14.907.624 0 MyApp __destroy_helper_block_9 0xc071f60 S3PutObjectoperation_Internal Retain 2 00:15.243.299 0 MyApp -[S3PutObjectoperation_Internal finish]10 0xc071f60 S3PutObjectoperation_Internal Retain 3 00:15.243.302 0 MyApp -[S3PutObjectoperation_Internal finish]11 0xc071f60 S3PutObjectoperation_Internal Release 2 00:15.243.307 0 MyApp -[S3PutObjectoperation_Internal finish]12 0xc071f60 S3PutObjectoperation_Internal Release 1 00:15.243.330 0 MyApp -[S3PutObjectoperation_Internal finish]13 0xc071f60 S3PutObjectoperation_Internal Release 0 00:15.244.420 0 Foundation __release_object_op14 0xc071f60 S3PutObjectoperation_Internal ZombIE -1 00:15.386.107 0 MyApp -[S3Response connection:dIDSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:]
应用程序上传照片时会发生此错误. Photo对象使用并实现以下方法:
-(voID)request:(AmazonServiceRequest *)request dIDSendData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite{ NSLog(@"dIDSendData called: %d - %d / %d",bytesWritten,totalBytesWritten,totalBytesExpectedToWrite); self.transferProgress += bytesWritten; float p = (float) self.transferProgress / self.uploadSize; self.uploadProgress = [NSNumber numberWithfloat:p];}-(voID)request:(AmazonServiceRequest *)request dIDCompleteWithResponse:(AmazonServiceResponse *)response{ NSLog(@"dIDCompleteWithResponse called.");}-(voID)request:(AmazonServiceRequest *)request dIDFailWithError:(NSError *)error{ NSLog(@"dIDFailWithError called: %@",error);}
据我所知,这是应用程序中唯一一个S3请求与任何其他对象/实例通信的点.知道是什么导致了这个错误吗?
解决方法 我认为这是AWS SDK中的一个错误.我不确定错误的确切位置,但是如果响应是服务异常(并且可能只与S3TransferManager结合使用),它会被请求重试触发.我不想禁用所有重试,所以我通过强制不重试服务异常来修复此问题.您可以使用AmazonS3ClIEnt的子类来覆盖一个方法,如下所示:
- (BOol)shouldRetry:(AmazonServiceResponse *)response exception:(NSException *)exception{ // There is some kind of BUG that is triggered on request retrIEs when S3 requests // return an explicit service exception (e.g.,auth token expired). In these cases // we force no retry to avoID the BUG. NSException *exceptionHolder = response.exception; if(exceptionHolder == nil) { exceptionHolder = exception; } if([exceptionHolder isKindOfClass:[AmazonServiceException class]]) { return NO; } return [super shouldRetry:response exception:exception];}总结
以上是内存溢出为你收集整理的iOS Amazon S3 SDK:发送到解除分配的实例的消息全部内容,希望文章能够帮你解决iOS Amazon S3 SDK:发送到解除分配的实例的消息所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)