Add new comment

Additional info

Thought it probably could be a mismatch between newer Oracle Java which is 64-bit only. Just downloaded the binary distribution 0.18.6 for macOS which is claimed to contain both 32 and 64 bit versions and shall run with Mac OS 10.11. In fact, I only found a single set of libraries pre-compiled. Are these 64-bit? Nevertheless, I experience the same behavior, the code will crash during creation of LibRaw object, when (static) linking the libs against my own code.

Tried both linking with both static libraries libraw and also libraw_r, which is claimed thread-safe. The JNI bridge starts working and properly calls LibRaw::version() without issues. However, when trying to crate the processor object, it crashes during the initializer.

JNIEXPORT jstring JNICALL Java_net_bwmc_libraw_LibRawImageLoader_getVersion
(JNIEnv *env, jclass clazz, jobject javaImageLoaderRef)
{
const char* cversionString = LibRaw::version(); // No problem to call this.
jstring versionString = env->NewStringUTF(cversionString); // C style string to Java String

return versionString;
}