Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
Qt Creator 4.7.0
-
None
Description
I'm trying to call c++ function from Java.
For this I added some function like this:
extern "C" JNIEXPORT void JNICALL Java_org_test_app_MyActivity_onTest( JNIEnv *env, jobject obj, jstring url) { Q_ASSERT(env); QString myurl = QString::fromUtf8( env->GetStringUTFChars(url, nullptr)); qDebug() << "got url: " << myurl; }
Now, when I start my app under the debugger, activity part starts OK but service part starts and terminates a bit later (my activity starts the service).
If I launch app without debugger - all works fine and c++ method is called (I see the debug output in the log).
I've tried removing all from Java code related to calling this c++ function - did not help. If I remove this function from c++ - starts to work under debugger.