Comments (15)
感谢反馈。我刚刚试了3次,都能正常打印,能否提供更多细节
from godeye.
点击Singal Crash
的 cell 导致崩溃之后,不能在Crash
日志里面看到崩溃的信息,这个是原来就这样的还是?
from godeye.
原来就是可以正常打印=。=,我试了几次也能正常打印,好奇怪
from godeye.
我是直接下的源码跑真机的
from godeye.
对了,crash相关的你不能连着Xcode的debugger,Xcode的debugger优先级比较高,会导致crash监控被debugger吃掉😂
from godeye.
装完拔掉线重新打开app测试的,🤔
from godeye.
在ConsoleController+Eye.swift
文件中:
//MARK: - CrashEye
extension ConsoleController: CrashEyeDelegate {
/// god's crash eye callback
func crashEyeDidCatchCrash(with model:CrashModel) {
let model = CrashRecordModel(model: model)
model.insertSync(complete: { [unowned self] (success:Bool) in
self.addRecord(model: model)
})
}
}
你用Log4G
打印几条日志输出下CrashModel看
from godeye.
没发现有打印什么= =
from godeye.
extension ConsoleController: CrashEyeDelegate {
/// god's crash eye callback
func crashEyeDidCatchCrash(with model:CrashModel) {
let model = CrashRecordModel(model: model)
model.insertSync(complete: { [unowned self] (success:Bool) in
self.addRecord(model: model)
})
Log4G.log("😈CrashModel: \(model)")
}
}
from godeye.
放在第一行:
func crashEyeDidCatchCrash(with model:CrashModel) {
Log4G.log("😈CrashModel: \(model)")
let model = CrashRecordModel(model: model)
model.insertSync(complete: { [unowned self] (success:Bool) in
self.addRecord(model: model)
})
}
因为系统在crash的时候留给app做处理的时间极短,而这边又需要将crash数据保存到数据库中,需要一些I/O,因此你放后面可能就执行不到了。。。
from godeye.
不过照你的说法Exception Crash后会把之前的Signle日志打印出来,至少能说明crash数据当时是正常保存的
from godeye.
- 刚刚重装试了一下只点击
Exception Crash
, 但是只出现了Signal
的日志 - 清除所有打印日志,bug日志 之后再次尝试点击
Signal Crash
,没有打印出结果😈 - 再次清除所有日志,点击
Exception Crash
,有log日志😈,但是没有bug日志
😂 😂 😂 😂 😂
from godeye.
找到原因了,在Swift的代码Crash的Signal Crash都是通过SIGTRAP信号往上抛的,我没监听这个信号,所以你没看到crash堆栈,(奇怪的是在模拟器是通过SIGILL信号往上抛,所以模拟器能捕获到)。
参考http://stackoverflow.com/questions/36325140/how-to-catch-a-swift-crash-and-do-some-logging
然后,迷惑的来了,在Swift中OC的类Crash,也就是Exception Crash的同时会抛出一个SIGABRT信号,所以当你点击Exception Crash后发现,可以看到SIGNAL Crash的堆栈,其实并不是之前的堆栈,而是一个新的堆栈、、这个问题我暂时没想到完美的方式把这个SIGNAL屏蔽掉,等后续观察再看,不影响主功能。
我下班后把这个问题解决一下,结合之前修复的几个小问题再发布一个小版本
感谢反馈~
from godeye.
不明觉厉,我说怎么有时候打印两个,一个或者不打印
from godeye.
fixed in CrashEye
from godeye.
Related Issues (20)
- No such module when release scheme HOT 1
- Network模块没有数据 HOT 3
- dyld: Library not loaded HOT 3
- carthage error HOT 6
- 按照提示demo没有跑起来~~
- Swift4 compatible? HOT 2
- Demo 运行不起来 HOT 2
- 不维护了么? HOT 4
- cocopods 导入报错,ESPullToRefresh 问题 HOT 2
- 大佬,请问您的iOS监控编程哪里获取? HOT 1
- 没有oc版本的么??? HOT 2
- 监控卡顿 HOT 1
- CPU超过100%问题 HOT 1
- 为什么不更新了,在swfit4下用不了? HOT 1
- 再好的东西失去了维护也变成了垃圾 HOT 1
- Xcode 14 support
- Can we get the english version of your book?
- 平台工具链支持
- xcode 14 error
- Xcode 14 incompatibility
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godeye.