2019独角兽企业重金招聘Python工程师标准>>>

EXC_BAD_ACCESS

An EXC_BAD_ACCESS occurs whenever you try to access or send a message to a deallocated object. The most common cause of EXC_BAD_ACCESS is when you initialize a variable in one of your initializer methods but use the wrong ownership qualifier, which results in deallocation of your object. For example, you create an NSMutableArray of elements for your UITableViewController in the viewDidLoad method but set the ownership qualifier of the list to unsafe_unretained or assign instead of strong. Now in cellForRowAtIndexPath:, when you try to access the deallocated object, you'll crash with a EXC_BAD_ACCESS. Debugging EXC_BAD_ACCESS is made easy with the NSZombiesEnabled environment variable.

SIGSEGV

A signal segment fault(SIGSEGV) is a more serious issue that the operating system raises. It occurs when there is a hardware failure or when you try to access a memory address that cannot be read or when you try to write to a protected address.

The first case, a hardware failure, is uncommon. When you try to read data stored in RAM and the RAM hardware at that location is faulty, you get a SIGSEGV. But more often than not, a SIGSEGV occurs for the latter two reasons. By default, code pages are protected from being written into and data pages are protected from being executed. When one of your pointers in your application points to a code page and tries to alter the value pointed to, you get a SIGSEGV. You also get a SIGSEGV when  you try to read the value of a pointer that was initialized to a garbage value pointing to an address that is not a valid memory location.

SIGSEGV faults are more tedious to debug, and the most common case reason a SIGSEGV happens is an incorrect typecast. Avoid hacking around with pointers or trying to a read a private data structure by advancing the pointer manually. When you do that and don't advance the pointer to take care of the memory alignment or padding, you get a SIGSEGV.

SIGBUS

A signal bus(SIGBUS) error is a kind of bad memory access where the memory you tried to access is an invalid memory address. That is, the address pointed to is not a physical memory address at all. Both SIGSEGV and SIGBUS are subtypes of EXC_BAD_ACCESS.

SIGTRAP

SIGTRAP stands for signal trap. This is not really a crash signal. It's sent when the processor executes a trap instruction. The LLDB debugger usually handles this signal and stops at a specified breakpoint. If you get a SIGTRAP for no apparent reason, a clean build will usually fix it.

EXC_ARITHMETIC

divide zero.

SIGILL

SIGILL stands for SIGNAL ILLEGAL INSTRUCTION. This happens when you try to execute an illegal instruction on the processor. You execute an illegal instruction when you're trying to pass a function pointer to another function, but for one reason or other, the function pointer is corrupted and is pointing to a deallocated memory or a data segment. Sometimes you get an EXC_BAD_INSTRUCTION instead of SIGILL, and through both are synonymous, EXC_* are machine-independent equivalents of this signal.

SIGABRT

SIGABRT stands for SIGNAL ABORT. This is a more controlled crash where the operating system has detected a condition that is not safe and asks the process to perform cleanup if any is needed. There is no one silver bullet to help you debug the underlying error for this signal. Frameworks like cocos2d or UIKit often call the C function abort when certain preconditions are not met or when something really bad happens. When a SIGABRT occurs, the console usually has a wealth of information about what went wrong. Since it's controlled crash, you can print the backtrace by typing bt into the LLDB console.

转载于:https://my.oschina.net/u/566401/blog/174370

iOS Crash类别总结相关推荐

  1. iOS实录15:浅谈iOS Crash

    导语:在当前的iOS开发中,虽然ARC为开发者解决了手动内存管理时代 的许多麻烦,但是内存方面的问题依然是产生iOS Crash的元凶之一,本文介绍内存方面,有关僵尸对象.野指针.内存泄漏.废弃内存这 ...

  2. ios category类别的使用

    ios category类别的使用 ios category类别的使用 Objective-C提供了一个非常灵活的类(Class)扩展机制-类别(Category).类别用于对一个已经存在的类添加方法 ...

  3. iOS Crash文件的解析(一)

    iOS Crash文件的解析(一) 2015-01-22 11:45 编辑: suiling 分类:iOS开发 来源:一片枫叶的博客 0 3913 iOS开发应用管理Crash文件进程调试 招聘信息: ...

  4. IOS Crash信息收集

    IOS Crash信息收集 领导安排收集App Crash信息,我通过苹果提供的NSSetUncaughtExceptionHandler和对信号的监听来实现.它可以获取大部分奔溃信息,但是对于比较复 ...

  5. 了解和分析iOS Crash

    作者:孟嵩,腾讯高级开发工程师  商业转载请联系腾讯WeTest获得授权,非商业转载请注明出处. 原文链接:wetest.qq.com/lab/view/40- WeTest 导读 北京时间凌晨一点, ...

  6. 了解和分析iOS Crash Report

    翻译自苹果官方文档:Understanding and Analyzing Application Crash Reports nimo: 这篇长达1w多字的文章,大概前后翻译了一个月,"写 ...

  7. iOS crash 定位方式

    文章目录 iOS crash 定位方式 1. symbolicatecrash 定位 2. atos 定位 iOS crash 定位方式 1. symbolicatecrash 定位 在iOS 中系统 ...

  8. iOS crash 问题分析汇总

    在这里插入图片描述 iOS crash 问题分析 iOS crash 常用分析工具 IOS 崩溃日志 iOS crash 原因分析 1.调用悬浮指针 2.数组越界访问 3.调用了未实现的方法 4.调用 ...

  9. iOS Crash日志分析必备:符号化系统库方法

    如果你有过分析iOS崩溃日志的经验,一定经常看到日志里出现很多<redacted>的字段.这篇文章就是帮助开发者将这些字段符号化为对应的系统库方法名. 如果你已经掌握了这方面的知识,就直接 ...

  10. iOS Crash 杀手排名

    2019独角兽企业重金招聘Python工程师标准>>> 随着公司嘟嘟牛app用户数量多了起来,崩溃的问题也多了起来,最近这几天终于得空,集中时间处理了一下崩溃的问题,现总结一下,希望 ...

最新文章

  1. 批评“古风”歌词“狗屁不通”就是不尊重?我们又都成了“垃圾听众”
  2. JAVA CXF、XFIRE、AXIS webservice获取客户端IP
  3. python sklearn 归一化_数据分析|Python特征工程(5)
  4. 127.0.0.1与localhost的区别
  5. c语言if判断文件_例8:C语言实现输入一个数,输出相应result
  6. tde数据库加密_如何将TDE加密的用户数据库添加到Always On可用性组
  7. 尽善尽美之作《Python Qt GUI与数据可视化编程》
  8. mapgis 6.7视频教程
  9. 【机器学习基础】常用激活函数(激励函数)理解与总结
  10. 如何将经典算法与人工智能结合?NeurIPS 2021
  11. 网页做服务器的监控界面,服务器监控页面
  12. Python —— 数据科学的手段 (第2版)配套代码
  13. python欢迎你、某某某同学_python __xx__的定义和用处
  14. 中国咖啡机市场运行现状调研及投资战略分析报告2022-2027年
  15. mac markdown_适用于Mac的最佳Markdown编辑器
  16. 电脑键盘没反应?有可能是趴着睡觉时按了它
  17. 电机FOC中的坐标变换(CLARK+PARK+公式推导+仿真+C语言实现)
  18. 大数据入门-什么是Kudu
  19. 2019年7月勒索病毒疫情分析
  20. centos 查看内存大小 cpu 硬盘等信息

热门文章

  1. python 绘制堆积柱状图
  2. 移动宽带连接不上mysql_MySQL Workbench 6.2.4 下载 因为移动网络打不开官方也可能是国内网络问题 备用自己...
  3. 日均百亿级日志处理:微博基于 Flink 的实时计算平台建设
  4. 17年,寻找出路的一年
  5. Android Multimedia框架总结(十三)CodeC部分之OpenMAX框架初识及接口与适配层实现
  6. springcloud 微服务鉴权_推荐 1w+ 星标的 SpringCloud 微服务项目,开发脚手架
  7. mumu模拟器点击无响应_常用安卓模拟器介绍?PC模拟器哪个好用
  8. 手工画图和计算机画图的内在联系,浅谈计算机绘图有关的论文(2)
  9. linux brew 安装mysql_mac下通过brew安装mysql
  10. python循环语句打印矩形_pycharm软件python的一些循环语句的用法