背景
在iOS 9 的日志里面会出现重复的 ParsecSubscriptionServiceSupport 或 AssetCacheServices , 这导致苹果提供的symbolicatecrash转换时出现卡死。
原因
这是由于xcode提供的symbolicatecrash对于重复image的日志会出现死循环。
解决方法:
在 XCode目录,找到 symbolicatecrash 文件:
/Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash
使用编辑器进行编辑,
将以下代码:
# add ourselves to that chain
$images{$nextIDKey}{nextID} = $image{base};
# and store under the key we just recorded
$bundlename = $bundlename . $image{base};
替换为:
if ($image{uuid} ne $images{$bundlename}{uuid}) {
# add ourselves to that chain
$images{$nextIDKey}{nextID} = $image{base};
# and store under the key we just recorded
$bundlename = $bundlename . $image{base};
}
懒人的解决方法:
在命令行输入如下脚本,可修改默认的xcode的symbolicatecrash 文件(可能需要输入管理员密码):
curl -o /tmp/t.patch https://raw.githubusercontent.com/zqxiaojin/OptSymbolicatecrash/master/fix_dead_loop.patch && cd `xcode-select -p`/../SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/ && sudo patch symbolicatecrash /tmp/t.patch && cd -