-
Notifications
You must be signed in to change notification settings - Fork 383
JNI DETECTED ERROR IN APPLICATION: JNI ERROR (app bug): jclass is an invalid global reference: 0x25afa (deleted reference at index 4823) #1260
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
Comments
Can you provide a minimal reproducible example? |
Unfortunately it doesn't always happen. I throw a lot of http requests at once on cronet that's basically all.
Am 11. Juli 2024, 19:29 +0100 schrieb Hossein Yousefi ***@***.***>:
… Can you provide a minimal reproducible example?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I think I have some ideas based on the logs you provided. The method assert(
Jni.env.IsInstanceOf(reference.pointer, type.jClass.reference.pointer),
'The object must be of type "${type.signature}".',
); This method is used internally in the generated bindings as well. Now somehow I will make this change. In the mean time I don't think you have to worry about the issue in release mode, because it's something extra we do to help with debugging. |
Awesome, yeah, I wasn't be able to create it in release mode. I hope the report helps fixing it
Am 11. Juli 2024, 19:49 +0100 schrieb Hossein Yousefi ***@***.***>:
… > Unfortunately it doesn't always happen. I throw a lot of http requests at once on cronet that's basically all. Am 11. Juli 2024, 19:29 +0100 schrieb Hossein Yousefi @.>:
> …
> Can you provide a minimal reproducible example? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>
I think I have some ideas based on the logs you provided.
The method JObject.castTo has this assertion to help prevent bugs in debug mode (of course assertions are not run in release mode):
assert(
Jni.env.IsInstanceOf(reference.pointer, type.jClass.reference.pointer),
'The object must be of type "${type.signature}".',
);
This method is used internally in the generated bindings as well. Now somehow type.jClass.reference.pointer is null. I could detach the native finalizer from jClass to be sure that gc does not delete it (which is odd, I would assume it shouldn't).
I will make this change. In the mean time I don't think you have to worry about the issue in release mode, because it's something extra we do to help with debugging.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Yeah. Thanks a lot for the report! I have published new versions of jni and jnigen, and will soon make a PR to land the fixes here. |
Uh oh!
There was an error while loading. Please reload this page.
Sometimes my app crashes with this output:
cronet V 1.3.1
Cronet version: 126.0.6452.4, arch: aarch64
Flutter version 3.22.1
So far it only happened while debugging
full output in attachment
cronet_jni_crash.txt
The text was updated successfully, but these errors were encountered: