一般都要符号化crash日志,但是低内存奔溃却没有堆栈日志

A Low Memory report differs from other crash reports in that there are no backtraces in this type of report. When a low memory crash happens, you must investigate your memory usage patterns and your responses to low memory warnings. This document points to you several memory management references that you might find useful.

  内存低的崩溃日志,有一个进程表,列有几种原因。如果没有,可能就不是内存低导致的崩溃,请使用VM Tracker工具来检查。

  • [per-process-limit]: The process crossed its system-imposed memory limit. Per-process limits on resident memory are established by the system for all applications. Crossing this limit makes the process eligible for termination.

    Note: Extensions have much lower per-process memory limit. Certain technologies, such as map views and SpriteKit, carry a high baseline memory cost and may be unsuitable for use in an extension.

  • [vm-pageshortage]/[vm-thrashing]/[vm]: The process was killed due to memory pressure.

  • [vnode-limit]: Too many files are open.

    Note: The system avoids killing the frontmost app when vnodes are nearly exhausted. This means that your application, when in the background, may be terminated even if it is not the source of excess vnode usage.

  • [highwater]: A system daemon crossed its high water mark for memory usage.

  • [jettisoned]: The process was jettisoned for some other reason.

一般来说,xcode都会自动化符号化,如果没有(比如是从itunes上下载dSYM),可以手动符号化

xcrun dsymutil -symbol-map
xcrun dsymutil -symbol-map ~/Library/Developer/Xcode/Archives/2017-11-23/MyGreatApp\ 11-23-17\,\ 12.00\ PM.xcarchive/BCSymbolMaps ~/Downloads/dSYMs/3B15C133-88AA-35B0-B8BA-84AF76826CE0.dSYM

xcode符号化需要三种条件

1. APP二进制文件和dSYM

2. 自定义的framework对应的二进制与dSYM

3. 与APP崩溃是的运行OS对应的符号,符号表是与OS相关的。

缺少一个都导致无法完全符号化。

第三方的framework,需要第三方提供作者创建的dSYM文件。

  • The binaries and dSYM files for all custom frameworks that the application links against. For frameworks that were built from source with the application, their dSYM files are copied into the archive alongside the application's dSYMfile. For frameworks that were built by a third-party, you will need to ask the author for the dSYM file.

没有符号化就要使用atos

Symbolicating Crash Reports With atos

The atos command converts numeric addresses to their symbolic equivalents. If full debug symbol information is available then the output of atos will include file name and source line number information. The atos command can be used to symbolicate individual addresses in the backtrace of an unsymbolicated, or partially symbolicated, crash report. To symbolicate a part of a crash report using atos:

根据Binary Image的UUID找到对应的dSYM

1. 在崩溃日志里面,使用命令行快速找到UUID这一行。

$ grep --after-context= "Binary Images:" <Path to Crash Report> | grep <Binary Name>

2. 32位的UUID转换格式为 8-4-4-4-12 (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX). 全部为大写字母。

3. 使用mfind寻找dSYM文件,其中格式是包括尖括号的

$ mdfind "com_apple_xcode_dsym_uuids == <UUID>"

如果找到对应的dSYM文件,xcode不能解析,这个就是xcode的bug。

如果找不到对应的dSYM文件,检查是否下载对了文件。使用命令行查看Binary Image的UUID

xcrun dwarfdump --uuid <Path to dSYM file>

这个是一个使用例子:

1. 打开xcode

2. 获取APP

  ljydeMacBook-Pro:~ admin$ cd /Users/admin/Library/Developer/Xcode/DerivedData/rcpi-hcfcbslblbqkydeyajzrmaoddwou/Bui         ld/Products/Debug-iphoneos
         ljydeMacBook-Pro:Debug-iphoneos admin$ ls
         ProtocolBuffers.framework    cwf.framework            iwf.framework.dSYM        xxx.app
         ProtocolBuffers.framework.dSYM    iwf.framework            libjscocos2d iOS.a        xxx.swiftmodule

确保APP的架构版本是跟崩溃的APP的是一样的。

3. 确定版本, 找到你的应用XXX.app文件 通过应用“终端、Terminal” 查看其UUID

在命令行输入“dwarfdump --uuid XXX.app/XXX”

4.定位错误
      直接在终端中输入以下命令“atos -o XXX.app/XXX -arch arm64 xxxxxxxx ”

ljydeMacBook-Pro:Debug-iphoneos admin$ atos -o rcpi.app/rcpi -arch arm64 0x0000000100e57fb0 0x0000000100e7e374 0x0000000100e7da38 0x0000000100e7b1d8
tx_ABGRToUVRow_C (in rcpi) +
-[TXLiveBeauty addBeautyTarget] (in rcpi) +
txrtmp_soundtouch::TDStretch::seekBestOverlapPositionQuick(short const*) (in rcpi) +
-[TXLivePushSingleton createPixelBufferAt:width:height:pixelFormatType:] (in rcpi) +

定位crash的问题的更多相关文章

  1. 利用.dSYM跟.app文件准确定位Crash位置

     本文转载至  http://blog.csdn.net/lvxiangan/article/details/28102629       利用.dSYM和.app文件准确定位Crash位置首先,确保 ...

  2. Xcode如何快速定位crash的位置?

    最近发现经常有人程序崩掉后不知道怎么定位crash的位置 如何快速定位crash的位置? 选择右箭头 选择Add Exception Breakpoint 这样如果你的app再crash就会自动定位到 ...

  3. iOS crash 追终 ,iOS 如何定位crash 位置

    https://developer.apple.com/library/ios/technotes/tn2151/_index.html 错误分析是基于设备中的crash log 与 编译文件时生成的 ...

  4. 【转】 利用.dSYM和.app文件准确定位Crash位置

    http://blog.csdn.net/jinzhu117/article/details/20615991 首先,确保在release(Ad Hoc或者App Store)一个版本时,保存了对应的 ...

  5. Linux内核crash/Oops异常定位分析方法

    在内核开发的过程中,经常会碰到内核崩溃,比如空指针异常,内存访问越界.通常我们只能靠崩溃之后打印出的异常调用栈信息来定位crash的位置和原因.总结下分析的方法和步骤. 通常oops发生之后,会在串口 ...

  6. ios系统crash文件分析

    分析crash文件必备条件:crash文件的uuid,app的uuid,dsym文件的uuid必须一致 1> crash文件的uuid为Binary Images:0x4000 - 0x1173 ...

  7. 【转】调试Release发布版程序的Crash错误

    http://www.cppblog.com/Walker/archive/2012/11/08/146153.html http://blog.sina.com.cn/s/blog_48f93b53 ...

  8. 调试Release发布版程序的Crash错误

    http://www.cppblog.com/Walker/archive/2012/11/08/146153.html http://blog.sina.com.cn/s/blog_48f93b53 ...

  9. 调试Release发布版程序的Crash错误(转)

    http://blog.sina.com.cn/s/blog_48f93b530100fsln.html 在Windows平台下用C++开发应用程序,最不想见到的情况恐怕就是程序崩溃,而要想解决引起问 ...

随机推荐

  1. MySQL-记一次备份失败的排查过程

                山竹来临,窝在家里整理个人文档.        本篇文章主要讲解排查问题的思路,涉及linux 删除文件的原理.实例误删数据恢复.MySQL实例初始化参数优先级别等,虽然涉及知 ...

  2. discuz 忘记安全密码的处理方式 修改pre_common_setting表的数据,

    一定要记住不要清空pre_common_setting表的数据,会给你带来烦恼的!!!!!只修改siteuniqueid 这条数据的密码就行!!!! 也可以先用我这条密码系统自动加密后:[DXRGYC ...

  3. 异常could not retrieve snapshot

    前两天项目升级,项目部署到生产上之后,报错: could not retrieve snapshot 上网查的结果是: “.hbm.xml中的字段没有与数据库中一样,就是说有些字段在文件中有,但是在数 ...

  4. 品尝阿里云容器服务:5个2核4G节点使用情况记载

    使用5台2核4G非IO优化的ECS作为节点创建集群,节点操作系统是Ubuntu 16.04.2 LTS.创建后3个为mananger节点,2个为worker节点,每个节点默认会运行7个容器,其中3个s ...

  5. Codeforces 1132C - Painting the Fence - [前缀和优化]

    题目链接:https://codeforces.com/contest/1132/problem/C 题意: 栅栏有 $n$ 个节,有 $q$ 个人可以雇佣来涂栅栏,第 $i$ 个人可以涂第 $l_i ...

  6. python中的argv使用

    sys.argv[]说白了就是一个从程序外部获取参数的桥梁,这个“外部”很关键,所以那些试图从代码来说明它作用的解释一直没看明白.因为我们从外部取得的参数可以是多个,所以获得的是一个列表(list), ...

  7. 常用css属性

    一.常用css属性 (1) *block(区块) 行高 line-height:数值 | inherit | normal;字间距 letter-spacing: 数值 | inherit | nor ...

  8. [math][mathematica] archlinux 下 mathematica 的安装 (科学计算软件 mathematica/matlab/sagemath)

    ONLINE: http://www.wolframalpha.com/ GPL: segamath: http://www.sagemath.org/ famous and not free: ma ...

  9. 剑指Offer题解(Python版)

    https://blog.csdn.net/tinkle181129/article/details/79326023# 二叉树的镜像    链表中环的入口结点    删除链表中重复的结点    从尾 ...

  10. 【实战】Docker 入门实战一:ubuntu 和 centos 安装Docker

    Docker是什么 Docker 是一个开源的应用容器引擎,基于 Go 语言 并遵从Apache2.0协议开源.Docker 可以让开发者打包他们的应用以及依赖包到一个轻量级.可移植的容器中,然后发布 ...