title: Android Fatal signal 6 (SIGABRT) with JNI code
body: <p>I am coding a game in C++ and SDL2 for Android. In Android 4.0.4 everything is fine. But in Android 5.1 i get a Fatal signal 6 (SIGABRT), code -6 in tid 12201 (SDLThread) when env->CallStaticVoidMethod is executed. I can't find a way to make it work.</p>
  
  <pre><code>JNIEXPORT jint JNICALL Java_com_digit_appactivity_init(JNIEnv* env, jobject obj)
  {
          // Obtain the Java class.
          env-&gt;GetJavaVM(&amp;s_vm);
          LOGD("GetJavaVM Executed");
  
          libClass = env-&gt;FindClass("com/digit/appactivity");
          LOGD("FindClass Executed");
  
  
          // C++ =&gt; Java methods.
          javanamefunctionMethod = env-&gt;GetStaticMethodID(libClass, "javanamefunction", "(I)V");
          LOGD("GetStaticMethodID Executed");
  
          return 0;
  }
  
  
  void android_paymoney(jint money)
  {
          JavaVM* vm = ME_JavaVM();
          JNIEnv* env = 0;
  
          int vm_attached = vm-&gt;GetEnv((void**)&amp;env, JNI_VERSION_1_6);
          LOGD("GetEnv Executed");
  
          env-&gt;CallStaticVoidMethod(libClass,  javanamefunctionMethod, money); //here is the error
          LOGD("CallStaticVoidMethod Executed"); // this is not executed, app crashes
  }
  </code></pre>