-
Notifications
You must be signed in to change notification settings - Fork 2
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
Error 'use of invalid object' when any attempts ot interacting with activity instance using JNI #3
Comments
I found that I runs armv7 binary on aarch64 OS. Despite the fact that it works this may be one of possible source of problems. When I runs my app on armv7 OS I gets the follow:
So the problem still has. When I run aarch64 on aarch64 I cannot attach to current thread at all due to abort without any message somewhere in libc:
|
android-ndk-rs/android-ndk/src/native_activity.rs Lines 103 to 107 in 28afac8
It seems the unnecessary reference operator here because clazz already is a pointer. jni::objects::JObject::from(self.ptr.as_ref().clazz as *const _ as jni::sys::jobject) |
I don't sure, this problem actually related to android-ndk-sys nor jni crate but it looks very strange for me.
Also I don't quite familiar with JNI, so I may do wrong things here.
My rust code looks like a piece below:
But application failed on last line.
It seems, activity instance object is invalid.
But I understand that it may not be what it seems.
The text was updated successfully, but these errors were encountered: