Skip to content
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

Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR) with Kotlin Android #2328

Open
Brooooooklyn opened this issue Nov 22, 2024 · 0 comments
Open

Comments

@Brooooooklyn
Copy link

Brooooooklyn commented Nov 22, 2024

I'm setting up the uniffi for my application: https://github.com/toeverything/AFFiNE/blob/11-14-feat_android_native_module/packages/frontend/mobile-native/src/lib.rs

The basic FFI implementation works fine here: https://github.com/toeverything/AFFiNE/blob/965132593b4fcba8e35776730029d1c600013d89/packages/frontend/apps/android/App/app/src/main/java/app/affine/pro/MainActivity.kt#L11-L20

CleanShot 2024-11-22 at 18 43 30@2x

However, the uniffi call causes a SIGSEGV

After some debugging, I found the RustBuffer() call here https://github.com/toeverything/AFFiNE/blob/11-14-feat_android_native_module/packages/frontend/apps/android/App/app/src/main/java/uniffi/affine_mobile_native/affine_mobile_native.kt#L246 is causing the SIGSEGV

  • Kotlin version 2.0.21 (JRE 23.0.1)
  • rustc 1.82.0 (f6e511eec 2024-10-15)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant