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
Java.cast resulting in JNI DETECTED ERROR IN APPLICATION: use of deleted global reference #637
Comments
Have a look at: Error: abort was called during instance cast |
Yes, I have seen that. That is why I have tried what you did: |
Well, you say it worked in the injected mode. I'm not exactly sure but it might be related to this. |
Yeah, I saw that the same error as yours would happen if classes failed to load early and frida tried to access them. So what happens if you invoke other methods on the casted instance? |
Weirdly enough, they all work!
But getText() results in the access violation error. Any ideas? Stefaan |
I tried a different phone, and same result. OS's tried:
|
It's probably that frida fails at processing the returned value of type |
Should be fixed now, see this. |
Yes indeed, that fixes the issue! |
Hi,
I have a problem with using a Java.cast inside an onButtonClick event overwrite in Android.
This is my hooking code:
I am using frida-gadget-12.2.5 inserted in a test application. Other hooks are working, but not this one. This hook has worked before, using frida-server on a rooted phone.
The error I get in logcat is
JNI DETECTED ERROR IN APPLICATION: use of deleted global reference
and frida crashes withError: abort was called
. I understand that the Garbage collector has cleared something before I can cast the object, but I do not know how to fix it.I also tried with
var pwd = Java.cast(this.val$pwd1.value, EditText);
This no longer results in a crash of frida when doing the
Java.cast
, but it does crash when usingpwd.getText()
with a frida error{'type': 'error', 'description': 'Error: access violation accessing 0x3358b000', 'stack': 'Error: access violation accessing 0x3358b000\n at frida/node_modules/frida-java/lib/env.js:351\n at frida/node_modules/frida-java/lib/env.js:918\n at frida/node_modules/frida-java/lib/class-factory.js:2505\n at input:1\n at [anon] (/script1.js:22)\n at input:1', 'fileName': 'frida/node_modules/frida-java/lib/env.js', 'lineNumber': 351, 'columnNumber': 1}
What is going wrong? How can I fix it?
Thanks,
Stefaan
The text was updated successfully, but these errors were encountered: