我一直在尝试在Xcode9中使用symobolicatecrash来表示用户提供的OS崩溃日志。根据我的研究,它的用法似乎很简单。然而,我不能忽略这个错误:
Unsupported crash log version: 12 at .../symbolicatecrash line 619当我检查日志文件时,我发现它确实是Report版本12。当我在Xcode中打开symbolicatecrash时,我发现了有问题的代码:
if(! $is_spindump_report) {
if($report_version == 102 || $report_version == 103) { # Leopard GM
$pat = '
^\s* (\w+) \s* \- \s* (\w+) \s* (?# the range base and extent [1,2] )
(\+)? (?# the application may have a + in front of the name [3] )
(.+) (?# bundle name [4] )
\s+ .+ \(.+\) \s* (?# the versions--generally "??? [???]" )
\<?([[:xdigit:]]{32})?\>? (?# possible UUID [5] )
\s* (\/.*)\s*$ (?# first fwdslash to end we hope is path [6] )
';
%captures = ( 'base' => \$1, 'extent' => \$2, 'plus' => \$3,
'bundlename' => \$4, 'uuid' => \$5, 'path' => \$6);
}
elsif($report_version == 104 || $report_version == 105) { # Kirkwood
# 0x182155000 - 0x1824c6fff CoreFoundation arm64 <f0d21c6db8d83cf3a0c4712fd6e69a8e> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
$pat = '
^\s* (\w+) \s* \- \s* (\w+) \s* (?# the range base and extent [1,2] )
(\+)? (?# the application may have a + in front of the name [3] )
(.+) (?# bundle name [4] )
\s+ ('.$architectures.') \s+ (?# the image arch [5] )
\<?([[:xdigit:]]{32})?\>? (?# possible UUID [6] )
\s* (\/.*)\s*$ (?# first fwdslash to end we hope is path [7] )
';
%captures = ( 'base' => \$1, 'extent' => \$2, 'plus' => \$3,
'bundlename' => \$4, 'arch' => \$5, 'uuid' => \$6,
'path' => \$7);
}
else {
die "Unsupported crash log version: $report_version";
}
}据我所知,OS崩溃日志目前是版本12,而较早的报告是版本11、10、9……我不是PERL专家,但是看起来使用这段代码,symbolicatecrash永远不会起作用。它似乎在寻找报告版本102、103、104或105。我找到了一些关于如何使用symbolicatecrash的教程/指南,所以它似乎对某些人很有效。
有没有人能帮我弄清楚到底是怎么回事。我注意到代码的版权是2008-2015,所以这可能是一个旧版本,但我在Xcode 9.4.1中发现了这一点。或者也许symbolicatecrash只适用于iOS崩溃日志?
发布于 2019-07-14 22:24:33
看起来在iOS模拟器上不支持使用此脚本进行符号化。如果您查看从设备获取的崩溃日志,则版本为105
OS Version: iOS 13.0 (17A5522g)
Report Version: 105它映射到perl脚本:
elsif($report_version == 104 || $report_version == 105) { # Kirkwood
在iOS模拟器中,报告版本为
OS Version: Mac OS X 10.14.4 (18E226)
Report Version: 12这是令人沮丧的,因为崩溃日志发生在单元测试和ui测试期间,其中没有附加调试器。因此,iOS模拟器的符号化将会很好
https://stackoverflow.com/questions/51994834
复制相似问题