You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Native.register() fails on android with a null pointer exception in Native.getCallingClass(). It looks like the SecurityManager class on android only exists so people can try to call it and get null values (used to be functional, but functionality was removed at some point), so the call to SecurityManager.getClassContext() in getCallingClass() does just that.
I was a little surprised that I didn't see anything about this around here - did I miss something or am I more likely just doing something wrong, or has this not really come up before?
The text was updated successfully, but these errors were encountered:
Maybe no one's been using direct mapping? It'd be easy enough to provide a register variant that explicitly provides the class.
I ran some tests on a simulator, maybe that has a different security manager implementation?
On Apr 15, 2013, at 12:09 PM, Matt Lanting wrote:
Native.register() fails on android with a null pointer exception in Native.getCallingClass(). It looks like the SecurityManager class on android only exists so people can try to call it and get null values (used to be functional, but functionality was removed at some point), so the call to SecurityManager.getClassContext() in getCallingClass() does just that.
I was a little surprised that I didn't see anything about this around here - did I miss something or am I just doing something wrong, or has this not really come up before?
—
Reply to this email directly or view it on GitHub.
Avoid error “The SecurityManager implementation on this platform is broken; you must explicitly provide the class to register” due to stub SecurityManager on Android as described in java-native-access/jna#218 .
Native.register() fails on android with a null pointer exception in Native.getCallingClass(). It looks like the SecurityManager class on android only exists so people can try to call it and get null values (used to be functional, but functionality was removed at some point), so the call to SecurityManager.getClassContext() in getCallingClass() does just that.
I was a little surprised that I didn't see anything about this around here - did I miss something or am I more likely just doing something wrong, or has this not really come up before?
The text was updated successfully, but these errors were encountered: