符号化

1.首先分析一下crash文件:

 

130433_3XR5_2621781.jpeg

1.a  Incident Identifier : 是崩溃报告的唯一标识符

CrashReporter Key: 是与设备标识相对应的唯一键值。虽然它不是真正的设备标识符,但也是一个非常有用的情报:如果你看到100个崩溃日志的CrashReporter Key值都是相同的,或者只有少数几个不同的CrashReport值,说明这不是一个普遍的问题,只发生在一个或少数几个设备上。

Hardware Model :标识设备类型。 如果很多崩溃日志都是来自相同的设备类型,说明应用只在某特定类型的设备上有问题。上面的日志里,崩溃日志产生的设备是iPhone 4s。

Process:对项目的操作权限,上面的是可读可写

Path:崩溃文件的路径

Identifier:项目标识符,就是Bundle Id

Version:版本号

。。。。。。。

2.a 这部分给出了一些基本信息,包括闪退发生的日期Date/Time和时间Launch Time,设备的iOS版本OS Version等。

3.a Exception Type:异常的类型。
Exception Codes :异常错误码
Termination Reason:闪退的原因,比如常见的数组越界啊,什么的。
Triggered by Thread:出现问题在哪个线程,这个比较重要,首先确定在哪个线程中出了问题,然后再去定位。

4.a 这部分提供应用中所有线程的回溯日志。 线程调用的一些,堆栈信息,压根看不懂,所有需要进行符号化处理。

 

 

2.如何将文件一一对应(检查dsym和app以及crash文件是否一致)

AppName代表app的名字,.app文件需要将ipa文件显示包内容,.app文件在payload文件夹下

 

dSYM

$ dwarfdump --uuid AppName.app.dSYM/
UUID: 8FFE6FA9-5DC6-3D54-8C16-4D267AA315A5 (arm64) AppName.app.dSYM/Contents/Resources/DWARF/AppName
  •  

.app

$ dwarfdump --uuid AppName.app/AppName
UUID: 8FFE6FA9-5DC6-3D54-8C16-4D267AA315A5 (arm64) AppName.app/AppName
  •  

.crash 文件

$ grep "AppName arm64" t.crash
0x100020000 - 0x10123bfff AppName arm64  <8ffe6fa95dc63d548c164d267aa315a5> /var/containers/Bundle/Application/A9D19DFA-9553-412B-A124-F07B0DEE01CF/AppName.app/AppName

 

3.符号化crash文件

注:如果有.xcarchive文件(打包时从包列表进入文件寻找)直接拖入设备即可

注:如果应用ipa包就是在自己的机器上打的,直接把.crash文件拖进Devices -> view device log 即可

find  /Applications/Xcode.app -name symbolicatecrash -type f

方法1:

需要使用Xcode符号化 crash log,你需要下面所列的3个文件:

1. crash报告(.crash文件)

2. 符号文件 (.dsymb文件)

3. 应用程序文件 (appName.app文件,把IPA文件后缀改为zip,然后解压,Payload目录下的appName.app文件), 这里的appName是你的应用程序的名称。

 

把这3个文件放到同一个目录下,打开Xcode的Window菜单下的organizer,然后点击Devices tab,然后选中左边的Device Logs。

 

然后把.crash文件拖到Device Logs或者选择下面的import导入.crash文件。

 

这样你就可以看到crash的详细log了

 

方法2:使用命令行工具symbolicatecrash

find /Applications/Xcode.app -name symbolicatecrash -type f 

设置环境:export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"  

先用这个命令找到symbolicatecrash位置:/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash

把crash文件和dysm文件以及app文件放到一起执行:

/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash acrash.crash AppName.app > out .log 即可以

/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash acrash.crash AppName.app.dSYM >n.crash也可以

 

 

 

 

转载于:https://my.oschina.net/HeroOneHY/blog/1569976

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SAX符号化序列范例源码 -------------------- timeseries2symbol.m: -------------------- This function takes in a time series and convert it to string(s). There are two options: 1. Convert the entire time series to ONE string 2. Use sliding windows, extract the subsequences and convert these subsequences to strings For the first option, simply enter the length of the time series as "N" ex. We have a time series of length 32 and we want to convert it to a 8-symbol string, with alphabet size 3: timeseries2symbol(data, 32, 8, 3) For the second option, enter the desired sliding window length as "N" ex. We have a time series of length 32 and we want to extract subsequences of length 16 using sliding windows, and convert the subsequences to 8-symbol strings, with alphabet size 3: timeseries2symbol(data, 16, 8, 3) Input: data is the raw time series. N is the length of sliding window (use the length of the raw time series instead if you don't want to have sliding windows) n is the number of symbols in the low dimensional approximation of the sub sequence. alphabet_size is the number of discrete symbols. 2 <= alphabet_size > mindist_demo sax_version_of_A = 3 4 2 1 1 3 4 2 sax_version_of_B = 1 1 3 4 3 1 1 4 euclidean_distance_A_and_B = 10.9094 ans = 5.3600 ---> This is the mindist ----------------- symbolic_visual.m ----------------- This demo presents a visual comparison between SAX and PAA and shows how SAX can represent data in finer granularity while using the same, if not less, amount of space as PAA. The input parameter [data] is optional. The default # of PAA segments is 16, and the alphabet size is 4. -------- Examples: -------- You can type this up in your matlab: Recall that there are two options for timeseries2symbol. The first option is demonstrated in sax_demo.m Now here is an example of the latter. We are going to convert time series of length 50, with a sliding window of 32, into 8 symbols, with and alphabet size of 3. >> [symbolic_data, pointers] = timeseries2symbol(long_time_series,32,8,alphabet_size) symbolic_data = 1 1 3 3 3 3 1 1 1 2 3 3 3 2 1 1 1 3 3 3 3 1 1 1 2 3 3 3 2 1 1 1 3 3 3 3 1 1 1 1 3 3 3 2 1 1 1 2 3 3 3 1 1 1 1 3 3 3 2 1 1 1 2 3 3 3 1 1 1 1 3 3 3 2 1 1 1 2 3 3 pointers = 1 2 5 6 9 10 13 14 17 18 Note that each row corresponds to a subsequence (with overlap) The SAX word at 3 and 4 were omitted, since they where the same as the word at 2, same for 7 and 8, which were the same as 6 etc (look at the pointers) It might be helpful to view the data this way >> [pointers symbolic_data ] ans = 1 1 1 3 3 3 3 1 1 2 1 2 3 3 3 2 1 1 5 1 3 3 3 3 1 1 1 6 2 3 3 3 2 1 1 1 9 3 3 3 3 1 1 1 1 10 3 3 3 2 1 1 1 2 13 3 3 3 1 1 1 1 3 14 3 3 2 1 1 1 2 3 17 3 3 1 1 1 1 3 3 18 3 2 1 1 1 2 3 3 So the first word is (1 1 3 3 3 3 1 1) , the 9th word is (3 3 3 3 1 1 1 1) , the 14 word is (3 3 2 1 1 1 2 3)

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值