Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Error when deploy android application relate to Text to speech



  • Hi,

    I got a trouble a week with android application that implement text to speech function.
    I use QTextToSpeech that support by QT to handle text to speak function. It worked well on Window/Linux environment.
    But when I run on Android device (Android 7.0), it crashed when I call constructor of QTextToSpeech.
    The error log show below:

    W linker  : /data/data/org.qtproject.example.qmlOpenCV/qt-reserved-files/plugins/texttospeech/libqttexttospeech_android.so: unsupported flags DT_FLAGS_1=0x81
    F art     : art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: GetStaticMethodID received NULL jclass
    F art     : art/runtime/java_vm_ext.cc:470]     in call to GetStaticMethodID
    F art     : art/runtime/java_vm_ext.cc:470]     from void org.qtproject.qt5.android.QtNative.startQtApplication()
    F art     : art/runtime/java_vm_ext.cc:470] "qtMainLoopThread" prio=5 tid=12 Runnable
    F art     : art/runtime/java_vm_ext.cc:470]   | group="main" sCount=0 dsCount=0 obj=0x12ed58b0 self=0xd5914200
    F art     : art/runtime/java_vm_ext.cc:470]   | sysTid=8048 nice=0 cgrp=default sched=0/0 handle=0xc8a40920
    F art     : art/runtime/java_vm_ext.cc:470]   | state=R schedstat=( 0 0 0 ) utm=7 stm=6 core=4 HZ=100
    F art     : art/runtime/java_vm_ext.cc:470]   | stack=0xc893e000-0xc8940000 stackSize=1038KB
    F art     : art/runtime/java_vm_ext.cc:470]   | held mutexes= "mutator lock"(shared held)
    F art     : art/runtime/java_vm_ext.cc:470]   native: #00 pc 00351449  /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+128)
    F art     : art/runtime/java_vm_ext.cc:470]   native: #01 pc 0033195d  /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+304)
    F art     : art/runtime/java_vm_ext.cc:470]   native: #02 pc 00239f77  /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+846)
    F art     : art/runtime/java_vm_ext.cc:470]   native: #03 pc 0023a4af  /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+58)
    F art     : art/runtime/java_vm_ext.cc:470]   native: #04 pc 000ca813  /system/lib/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+42)
    F art     : art/runtime/java_vm_ext.cc:470]   native: #05 pc 000c9ff7  /system/lib/libart.so (_ZN3art11ScopedCheck13CheckInstanceERNS_18ScopedObjectAccessENS0_12InstanceKindEP8_jobjectb+354)
    F art     : art/runtime/java_vm_ext.cc:470]   native: #06 pc 000c94b5  /system/lib/libart.so (_ZN3art11ScopedCheck22CheckPossibleHeapValueERNS_18ScopedObjectAccessEcNS_12JniValueTypeE+184)
    F art     : art/runtime/java_vm_ext.cc:470]   native: #07 pc 000c88e9  /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE+800)
    F art     : art/runtime/java_vm_ext.cc:470]   native: #08 pc 000cbdad  /system/lib/libart.so (_ZN3art8CheckJNI19GetMethodIDInternalEPKcP7_JNIEnvP7_jclassS2_S2_b+464)
    F art     : art/runtime/java_vm_ext.cc:470]   native: #09 pc 000c31f3  /system/lib/libart.so (_ZN3art8CheckJNI17GetStaticMethodIDEP7_JNIEnvP7_jclassPKcS6_+22)
    F art     : art/runtime/java_vm_ext.cc:470]   native: #10 pc 0014e8a1  /data/app/org.qtproject.example.qmlOpenCV-2/lib/arm/libQt5Core.so (???)
    F art     : art/runtime/java_vm_ext.cc:470]   native: #11 pc 0014ff21  /data/app/org.qtproject.example.qmlOpenCV-2/lib/arm/libQt5Core.so (_ZN17QJNIObjectPrivate23callStaticObjectMethodVEP7_jclassPKcS3_St9__va_list+48)
    F art     : art/runtime/java_vm_ext.cc:470]   native: #12 pc 0014ffb3  /data/app/org.qtproject.example.qmlOpenCV-2/lib/arm/libQt5Core.so (_ZN17QJNIObjectPrivate22callStaticObjectMethodEP7_jclassPKcS3_z+26)
    F art     : art/runtime/java_vm_ext.cc:470]   native: #13 pc 00002953  /data/data/org.qtproject.example.qmlOpenCV/qt-reserved-files/plugins/texttospeech/libqttexttospeech_android.so (???)
    F art     : art/runtime/java_vm_ext.cc:470]   at org.qtproject.qt5.android.QtNative.startQtApplication(Native method)
    F art     : art/runtime/java_vm_ext.cc:470]   at org.qtproject.qt5.android.QtNative$6.run(QtNative.java:359)
    F art     : art/runtime/java_vm_ext.cc:470]   at org.qtproject.qt5.android.QtThread$1.run(QtThread.java:61)
    F art     : art/runtime/java_vm_ext.cc:470]   at java.lang.Thread.run(Thread.java:762)
    F art     : art/runtime/java_vm_ext.cc:470]
    F art     : art/runtime/runtime.cc:404] Runtime aborting...
    F art     : art/runtime/runtime.cc:404] Aborting thread:
    F art     : art/runtime/runtime.cc:404] "qtMainLoopThread" prio=5 tid=12 Native
    ....
    

    I need to add function text to speech into existing project but it crash at beginning. The existing project use some libraries OpenCV.
    I try a single project with text to speech function only, it can work well. Maybe there is problem when integrating texttospeech and object detecting (opencv) i think so. Please help.

    The build environment is: Android for armeabi-v7a
    Device: Samsung Note 5, android 7.0

    Thanks


Log in to reply