Bug #1434
Thread created with pthread_create can't use JNI anymore
Start date:
07/12/2016
Due date:
% Done:
0%
Estimated time:
CPU Architecture:
arm64
Host OS:
Linux
Toolchain:
gcc-6
Android version:
5.1 (android-22)
CrystaX Version:
Description
This bug happens in build 883, after creating the thread with
pthread_attr_init(&type);
pthread_attr_setdetachstate(&type, PTHREAD_CREATE_JOINABLE);
pthread_create (&__threadp, &type, ThreadProc, (void*)strdup(arg));
Trying to get the JNIEnv with
(* gJavaVM)->GetEnv(gJavaVM,(void **) &env, JNI_VERSION_1_6);
returns JNI_OK but env is not changed.
Creating the thread from Java side fixes the problem.
Updated by Roman Lebedev over 4 years ago
This can be fixed by dlopening original pthread_* functions as well.
libcrystax was linked statically.
Updated by Dmitry Moskalchuk over 4 years ago
- Assignee set to Dmitry Moskalchuk
- Priority changed from Normal to High