I receive error message when run JNI android app A/libc﹕ Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 17729 <p>I got an error when i run android app that I use JNI functions and c++ code in it. When it run, I got below message:</p> <blockquote> <p>Fatal signal 11 (SIGSEGV) at 0xe480001d (code=1), thread 5465</p> </blockquote> <p>And finally here is my codes:</p> <pre><code>JNIEXPORT jstring JNICALL Java_ir_bassir_ndktest4_MainActivity_getName (JNIEnv *env, jobject obj){ jclass cls = (*env)-&gt;GetObjectClass(env, obj); jmethodID mid = (*env)-&gt;GetStaticMethodID(env, cls, "testJava", "([Ljava/lang/String)[Ljava/lang/String"); jstring plainText = (*env)-&gt;NewStringUTF(env, "Hello from JNI ! Compiled with ABI 2222 "); jstring result = (*env)-&gt;CallStaticObjectMethod(env, cls, mid, plainText); return (*env)-&gt;NewStringUTF(env, plainText); } </code></pre> <p>And on the Java side:</p> <pre><code>public class MainActivity extends ActionBarActivity { public native String getName(); public static String testJava(String txt){ Log.d("BP","call back to java method"); String result = txt + "its added in JAVA"; return result; } static{ System.loadLibrary("HelloJNI"); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); String name = getName(); Log.d("BP",name); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } } </code></pre>