Comments (1)
ANR
可以参考https://github.com/bugsnag/bugsnag-android 的实现.
SIGSEGV
信号如果是主线程抛出的,是不会回调Java层的callNativeException
方法(JVM阻止了这种调用),同时在信号处理函数中不能调用 non-async-signal-safe functions,但如果是子线程抛出这个信号,又可以回调到Java层,没有深入阅读过JVM的源码,所以不知道JVM是如何处理的
stackoverflow类似的问题https://stackoverflow.com/questions/54203717/callback-into-java-android-application-code-from-jni-after-catching-signal-sigs
因为大部分的代码肯定是在主线程中运行,所以是否应该在 Native
层直接创建一个子线程,或者使用AIDL
的方式,用于监听和处理异常,回调Java层的方法.
from signal.
Related Issues (10)
- 能gradle引入么 HOT 6
- java层堆栈获取 HOT 33
- osstring的缓冲区问题 HOT 3
- 触发native crash后并不会重启 HOT 2
- demo的throwNativeCrash在协程中调用,无法自定义的MyHandler的onCatchSignal无法回调收到异常回调 HOT 2
- onCatchSignal没有调用 HOT 18
- app跑起来没效果啊
- demo运行后直接闪退无任何提示 HOT 2
- Utils中报空指针了
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 signal.