Skip to content

Conversation

@niyid
Copy link

@niyid niyid commented Oct 31, 2025

This build was entirely fashioned by Claude Sonnet 4.5 and I merely guided it. I want that piece of information noted.

@niyid niyid changed the title xmrwallet build based on r29 xmrwallet build based on ndk29 and boost 1.81 Oct 31, 2025
@m2049r
Copy link
Owner

m2049r commented Dec 16, 2025

970 commits? please rebase on master. i think i saw hardcoded paths to your build envirnoment as well

@niyid
Copy link
Author

niyid commented Dec 16, 2025

970 commits? please rebase on master. i think i saw hardcoded paths to your build envirnoment as well

Thanks for getting back and congratulations on all your good work. You already did all the heavy lifting. Kudos. Please do your review so I can make any required/suggested changes.

@m2049r
Copy link
Owner

m2049r commented Dec 18, 2025

thanks & thank you!
i assume boost 1.81 is necessary to compile with ndk29? if not, we should stick as close as possible to the gitian build versions of monero (check out contrib/gitian in monero repo)
no other dependencies need to be updated?

@niyid
Copy link
Author

niyid commented Dec 18, 2025 via email

PROBLEM:
Java class has overloaded methods getSeed() and getSeed(String) but only one
JNI function was implemented, causing parameter mismatch. When getSeed()
(no params) was called, JNI received invalid data, leading to:
'JNI ERROR (app bug): attempt to use stale Global 0x209a (should be 0x2096)'

ROOT CAUSE:
- Missing JNI implementation for overloaded getSeed() method
- JNI name mangling not handled for overloaded native methods
- No validation of JNI references before use

SOLUTION:
Implement both JNI functions with proper name mangling:
- Java_com_m2049r_xmrwallet_model_Wallet_getSeed__ (no params)
- Java_com_m2049r_xmrwallet_model_Wallet_getSeed__Ljava_lang_String_2 (with param)
Add shared internal implementation with safe string extraction,
comprehensive error handling, and thread safety.

CHANGES:
- Added getSeedInternal() shared implementation
- Added extractJString() safe string extraction helper
- Added both JNI functions for overloaded methods
- Updated JNI native method registration
- Added defensive exception clearing and error handling
- Maintained thread safety with mutex protection

IMPACT:
Eliminates crashes during wallet seed retrieval, improves app stability.
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

Successfully merging this pull request may close these issues.

2 participants