Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

occur crash #53

Open
xalexchen opened this issue Dec 1, 2015 · 4 comments
Open

occur crash #53

xalexchen opened this issue Dec 1, 2015 · 4 comments

Comments

@xalexchen
Copy link

1.when i hook a method which inside has try-catch blocked,when catch blocked raise will lead app directly crash.
2. if inside call back method beforeHookMethod we create a exception object (new Exception()) also will cause app directly crash.it's any way to avoid or fixed it ?

@hwjump
Copy link
Contributor

hwjump commented Dec 2, 2015

@xalexchen
Copy link
Author

what i means is if the target method has try-catch blocked. will directly crash VM

example :

protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
String a = null;
try {
a.toString();
} catch (Exception e) {
e.printStackTrace();
}
Log.i("dexposed", "before");
}
as you can see,we already try-catch null point exception.but when VM try to fillStackTrace will lead VM directly crashed. make sense and any help ?
and the Crash log like this :

backtrace:
12-22 14:32:55.134 I/DEBUG ( 424): #00 pc 002324ee /system/lib/libart.so (art::CountStackDepthVisitor::VisitFrame()+297)
12-22 14:32:55.134 I/DEBUG ( 424): #1 pc 0022da3d /system/lib/libart.so (art::StackVisitor::WalkStack(bool)+272)
12-22 14:32:55.135 I/DEBUG ( 424): #2 pc 002388d9 /system/lib/libart.so (_jobject* art::Thread::CreateInternalStackTrace(art::ScopedObjectAccessAlreadyRunnable const&) const+76)

@hwjump
Copy link
Contributor

hwjump commented Dec 23, 2015

Could you tell me your phone type,and the android verison?

@xalexchen
Copy link
Author

nexus 5 . android 5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants