Closed mschulkind closed 12 years ago
The message about "No JNI_OnLoad" is not an error, its a warning. In general the JNI_OnLoad is where you would cache the VM pointer and do JNI housekeeping, etc.
BTW, I have a full-fledged Android app that uses the spidermonkey static library:
It might be helpful as a how-to.
To find out where the SIGILL is coming from, build in debug mode and use the ndk-stack utility so you can see which line of the code is causing it.
It looks like there are some assert()'s in your code : perhaps one of them is being triggered?
Looks like I spoke to soon. Switching to your spidermonkey version and using a newer emulator fixed it! Thanks for the great work; this will make my life a whole lot easier.
Thanks for the quick response.
It looks like it's just a broken emulator image version. WebView.addJavascriptInterface() is broken as well. If you notice, it's actually a SIGILL while loading the .so that links in libjs_static.a. The line you're looking at is from the gnustl lib. The puzzling part was that it happened inside loading the lib, not executing my code. There wasn't even a stack trace to symbolize in the crash output.
I haven't looked at all your build files etc. so this is just a guess : Perhaps it was the wrong ABI?
http://groups.google.com/group/android-ndk/browse_thread/thread/81f2917d3439d8b3
I was using the ARM 2.3.3 image which didn't work (x86 doesn't even attempt to load the lib for obvious reasons). It works on the 4.0.3 emulator image and my 2.3.7 device, so I don't think it's an ABI thing. Moral of the story is that it works now though :)
On Thu, Apr 12, 2012 at 8:51 PM, folecr < reply@reply.github.com
wrote:
I haven't looked at all your build files etc. so this is just a guess : Perhaps it was the wrong ABI?
Reply to this email directly or view it on GitHub: https://github.com/funkaster/spidermonkey/issues/2#issuecomment-5106427
@folecr maybe you know what I'm doing wrong?
I modified the script for my paths and platforms, you can see the changes here: https://github.com/mschulkind/spidermonkey/commit/2d24ad6bc9c40452bf3addf306929d500935fcbb
This is how I've tried integrating spidermonkey into my own project: https://github.com/mschulkind/cordova-true-native-android/commit/c4c81a322ee616c86be0e9ca86b65bfc3dabe869
No matter what I do, I get this when running the app:
I've also tried using the spidermonkey provided by the couchdb guys with the exact same results.