C++ SDK 2.8.0 crash in Android


I am trying to upgrade my app from an older SDK to the latest release (2.8.0). My app is a native (C++) app. I’ve added the .aar file to the gradle project, used the provided .so files and use the correct headers. App compiles and links without issues. My app however crashes when calling client->authenticatecustom(…)

It crashes in the following code (in NHttpClientLibCurl.cpp):

#if __ANDROID__
    CACertificateData* data = Nakama::getCaCertificates();
    struct curl_blob blob;
    blob.data = reinterpret_cast<char*>(data->data);    <= crashes on this line sigsegv fault
    blob.len = data->len;
    blob.flags = CURL_BLOB_COPY;
    curl_easy_setopt(curl_easy.get(), CURLOPT_CAINFO_BLOB, &blob);

There are no error messages in the log that indicate any issues with the JNI call.

What can be the issue and more importantly … how can i solve it?

On iOS and Mac (intel/arm) 2.8.0 works fine with the same code.

Okay…it seems that I have to load the nakama library myself in Java. So after adding:


It works. Problem solved.