Android: java.lang.reflect.UndeclaredThrowableException from Unable to create Content

Tor Lillqvist tml at
Fri Mar 30 08:48:29 PDT 2012

Argh, I think I know the problem. My own mistake...

I forgot to execute the run-time binary patching of a bug in the NDK's
shared GNU C++ library... without that patch, catching exceptions
thrown in another shared object doesn't work.

I am experimenting with
, which unlike the unit test stuff in android/qa/sc does not use a
subclass of Android's NativeActivity (or of our Bootstrap class,,
which is a subclass of NativeActivity).

Thus android_main(),
doesn't get executed. And it's android_main() that calls

So I just need to call (its JNI wrapper)
Bootstrap.patch_libgnustl_shared() and cross-shared-library exception
handling should work fine. Knock on wood...

Yeah, I probably should move the patch_libgnustl_shared() call to the
setup() function, so that it isn't forgotten so easily...


More information about the LibreOffice mailing list