-
Notifications
You must be signed in to change notification settings - Fork 36
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
Passing Integer from Java to Rust panics #41
Comments
Thanks for the report. Do you have any logs to share? Is the panic visible in logcat? |
Yes! They're visible. Here is the logcat file, the panic starts on line 243. Here's a screenshot of android studio debugger in case it's useful: |
It seems that the primitive Here are some questions that could be helpful to resolve your issue:
As a workaround, you could use the |
Ok I can confirm using Regarding your questions:
[build]
rustflags = "-L native=/Users/agustin/work/coinfabrik/expo-multi-party-ecdsa/rust/android/gmp/arm64-v8a"
[env]
CC_aarch64-linux-android = "/Users/agustin/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android30-clang"
AR = "/Users/agustin/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android-ar"
[target.aarch64-linux-android]
ar = "/Users/agustin/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android-ar"
linker = "/Users/agustin/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android30-clang" I tried changing my NDK to the latest version available (25.1.8937393) but the AR BTW I really apprecciate you helping me debug this, I know it might not have anything to do with your library but you're doing it anyway so thanks. |
OK it seems I was using the ndk v21 because rust has issues with higher versions (rust-lang/rust#85806). I'll also try to change the project name (and library) because it was called |
Changing the project name did nothing. So if you think of anything else I'm happy to try. |
Thanks for the info. I will try to reproduce it and will comment any findings |
Ok I was able to reproduce it using Java 11, android-ndk-r22b and aarch64. It seems that there was a behavior change somewhere between and the |
After the last commit, my tests run successfully in Android. Can you please verify in your environment as well before closing this? Thanks |
It's working now! Thank you for the help and quick debugging. |
Good! Thanks for reporting |
Hi! I'm having an issue with the library (which is great btw). I'm unable to pass
Integer
from Java to Rust, as it panics. I'm running this on Android btw, in an emulator on a Macbook Pro m1, with Java 11.This are some simplified versions of the code I'm using:
Something interesting that happens is that if I pass it as an array
int[]
it works.If you have any further thing I can try or if you need any other information I'm all ears. Thanks!
The text was updated successfully, but these errors were encountered: