Hello,欢迎来到我的主页。
我目前是一名android程序猿,Android GDE(谷歌开发者专家),也是稀土掘金的签约作者【Pika】,博客分享主要在掘金!当然,你也可以在一些分享活动也能看到我!目前主要方向是android性能优化,NDK开发,compose,flutter等,欢迎点赞我的仓库!!
目前活跃情况:
- 不定期更新个人仓库
- 会对一些大厂仓库进行pr贡献,比如shadow,Relinker,Koom等
library for android which can observe signal from native crash or ANR
Hello,欢迎来到我的主页。
我目前是一名android程序猿,Android GDE(谷歌开发者专家),也是稀土掘金的签约作者【Pika】,博客分享主要在掘金!当然,你也可以在一些分享活动也能看到我!目前主要方向是android性能优化,NDK开发,compose,flutter等,欢迎点赞我的仓库!!
目前活跃情况:
在c++方法中raise了SIGSEGV,使用Signal后性能平台确实收不到Crash上报了,但是Handler中的onCatchSignal没有调用,请问可能是什么原因呢
JAVA层的日志太少,需要优化
demo的throwNativeCrash在协程中调用,自定义的MyHandler的onCatchSignal无法回调收到异常回调
有的会重启,有的不会,例如红米
demo的anr是一个死循环,由于系统机制不一定会立马产生anr,可以点击按钮后再点击回退键去尽快触发!
一开始只想着给使用者抛出native堆栈,java层堆栈可通过回调去抛出throwable获取,但是现在看来,还是加上比较好,避免有些朋友不知道呀
java.lang.NullPointerException: it must not be null
Utils.getLogcatByBufferName(Utils.kt:65)
while (br.readLine().also { line = it } != null)
不能拦截到,日志也不会打印,就直接crash了,你们难道不是吗?
设备:小米 max3
系统:Android 10
现象描述:下载 demo 后直接运行,点击首页按钮直接闪退
log日志:
2023-01-02 00:24:54.825 10412-10412/com.example.signal I/hi_signal: 11 catch
2023-01-02 00:24:54.825 10412-10412/com.example.signal I/hi_signal: crash info pid:10412
2023-01-02 00:24:54.827 10412-10412/com.example.signal D/AndroidRuntime: Shutting down VM
--------- beginning of crash
2023-01-02 00:24:54.828 10412-10412/com.example.signal E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.signal, PID: 10412
java.lang.StackOverflowError: stack size 8192KB
at com.example.signal.MainActivity.throwNativeCrash(Native Method)
at com.example.signal.MainActivity.onCreate$lambda-0(MainActivity.kt:23)
at com.example.signal.MainActivity.$r8$lambda$__atZomnwlT46HKNaZgatRAAqwU(Unknown Source:0)
at com.example.signal.MainActivity$$ExternalSyntheticLambda0.onClick(Unknown Source:2)
at android.view.View.performClick(View.java:7185)
at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:1194)
at android.view.View.performClickInternal(View.java:7162)
at android.view.View.access$3500(View.java:819)
at android.view.View$PerformClick.run(View.java:27678)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7562)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
--------- beginning of system
2023-01-02 00:24:54.838 10412-10412/com.example.signal I/Process: Sending signal. PID: 10412 SIG: 9
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.