解决报错libc++abi.dylib: terminate_handler unexpectedly threw an exception
来源:互联网 发布:vmware mac os补丁 编辑:程序博客网 时间:2024/05/29 16:50
libc++abi.dylib是一个动态库,动态错误一般是由动态错误引起。for(NSMutableDictionary *downloadInfo in downloadingArray) { if ([[downloadInfo objectForKey:kMZDownloadKeyFileName] isEqual:s9id]) { NSURLSessionDownloadTask *downloadTask = [downloadInfo objectForKey:kMZDownloadKeyTask]; NSString *downloadingStatus = [downloadInfo objectForKey:kMZDownloadKeyStatus]; NSInteger indexOfObject = [downloadingArray indexOfObject:downloadInfo]; if([downloadingStatus isEqualToString:RequestStatusDownloading]) { [downloadTask suspend]; [downloadInfo setObject:RequestStatusPaused forKey:kMZDownloadKeyStatus]; [downloadInfo setObject:[NSDate date] forKey:kMZDownloadKeyStartTime]; [downloadingArray replaceObjectAtIndex:indexOfObject withObject:downloadInfo]; }}}以上是我在运行过程中崩溃的地方,在遍历的过程中数据突然发生变化产生的错误,要把参照数据源和要修改的数据源分开才不会发生异常,
解决如下:
NSMutableArray *tempArray = [downloadingArray copy]; for(NSMutableDictionary *downloadInfo in tempArray) { if ([[downloadInfo objectForKey:kMZDownloadKeyFileName] isEqual:s9id]) { NSURLSessionDownloadTask *downloadTask = [downloadInfo objectForKey:kMZDownloadKeyTask]; NSString *downloadingStatus = [downloadInfo objectForKey:kMZDownloadKeyStatus]; NSInteger indexOfObject = [tempArray indexOfObject:downloadInfo]; if([downloadingStatus isEqualToString:RequestStatusDownloading]) { [downloadTask suspend]; [downloadInfo setObject:RequestStatusPaused forKey:kMZDownloadKeyStatus]; [downloadInfo setObject:[NSDate date] forKey:kMZDownloadKeyStartTime]; [downloadingArray replaceObjectAtIndex:indexOfObject withObject:downloadInfo]; }}}
0 0
- libc++abi.dylib: terminate_handler unexpectedly threw an exception 报错
- 解决报错libc++abi.dylib: terminate_handler unexpectedly threw an exception
- 解决libc++abi.dylib: terminate_handler unexpectedly threw an exception(1)
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误解决方案
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误小结
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误
- libc++abi.dylib: terminate_handler unexpectedly threw an exception
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误小结
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误小结
- libc++abi.dylib: terminate_handler unexpectedly threw an exception 问题解决
- iOS libc++abi.dylib: terminate_handler unexpectedly threw an exception
- 151128libc++abi.dylib: terminate_handler unexpectedly threw an exception错误
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误小结
- libc++abi.dylib: terminate_handler unexpectedly threw an exception
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误
- UIActionSheet :libc++abi.dylib: terminate_handler unexpectedly threw an exception
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误小结
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误小结
- Android网络编程之使用HttpClient批量上传文件
- KVC和点语法的性能
- C++primer plus第六版课后编程练习答案8.7
- WEB前端CSS框架“垒砖”介绍
- 用AU3在招商银行网上银行页面自动输入卡号和密码
- 解决报错libc++abi.dylib: terminate_handler unexpectedly threw an exception
- virtual box vbox centos linux 学习记录
- html5介绍及历史
- iOS开发中那些高效常用的宏
- Windows DLL搜索顺序
- Apache中内存分配子的分配和释放函数分析
- iOS开发的52个要点纪要之五
- 你是不是只会敲代码?
- 对于百度查询接口模拟提交后结果的过滤