-
Notifications
You must be signed in to change notification settings - Fork 217
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
Access violation when tracing with parameters = true #557
Comments
Hello I have the same problem on my side |
toString() {
try{
return this.isNull() ? "null" : this.method("ToString", 0).invoke().content ?? "null";
}
finally{
return "Failed to get value"
}
} Replacing Il2Cpp.Object's toString() method with this does prevent the error. It is obviously a cheap hack, I'm hoping a cleaner fix will come in future versions. |
@UnknownAPI that makes sense, I think you should contribute a PR for this. |
@UnknownAPI Thanks for reporting - we need to investigate this a little further I think. It's unusual that attempting to get What are the app name and platform? (PS: we definitely need to attach some context when exception occurs! So that we know that |
@vfsfitvnm I encountered the exception when tracing Assembly-CSharp on Avakin Life on android. Here's some code you can try to reproduce the exception import "frida-il2cpp-bridge";
Il2Cpp.perform(() => {
Il2Cpp.trace(true)
.assemblies(Il2Cpp.domain.assembly("Assembly-CSharp"))
.and()
.attach();
}); |
frida-il2cpp-bridge/src/tracer.ts Line 304 in a28fa2e
not much unrelated but think it still count as tracer issue , wouldnt this fail if return value is 0x0? on that game 0x0 System.Collections.IEnumerator.get_Current <InitialiseHelpshift>d__31 System.Object false true console.warn(returnValue,method.name,method.class.name,method.returnType,(returnValue == void 0),returnValue == 0x0)
class HelpshiftHandler.<InitialiseHelpshift>d__31 : System.Object, System.Collections.Generic.IEnumerator<System.Object>, System.Collections.IEnumerator, System.IDisposable
{
System.Int32 <>1__state; // 0x8
System.Object <>2__current; // 0xc
HelpshiftHandler <>4__this; // 0x10
System.Void .ctor(System.Int32 <>1__state); // 0x0220ffa4
System.Void System.IDisposable.Dispose(); // 0x0220ffc0
System.Boolean MoveNext(); // 0x0220ffc4
System.Object System.Collections.Generic.IEnumerator<System.Object>.get_Current(); // 0x022105dc
System.Void System.Collections.IEnumerator.Reset(); // 0x022105e4
System.Object System.Collections.IEnumerator.get_Current(); // 0x02210630
} |
Thank you a lot! This saved me!!!! |
…m#557 issue vfsfitvnm#557 workaround from UnknownAPI
credits to @UnknownAPI here you go: the original workaround always returns "failed to get value" for strings. added this to pr: /** */
toString(): string {
try {
return this.isNull() ? "null" : this.method<Il2Cpp.String>("ToString", 0).invoke().content ?? "null";
} catch (error) {
return "Error: ToString failed";
}
} |
Maybe it should be changed so that top layer user can add a custom serializer for values. (I've had much better and consistent result using System.Convert or Newtonsoft for object serialization). While the proposed fix effectively prevents the trace from crashing, it still fails to get a lot of the values. |
This is a good feature to add 💇♀️ And it should be very easy for a |
When tracing specific assemblies (or all at once) with parameters to true I get an access violation error.
my code:
error with stack trace trace:
Is there some way to ignore parameters that cause this access violation or to prevent it at all?
The text was updated successfully, but these errors were encountered: