Problem to connect serial port on android platform
Unsolved
Mobile and Embedded
-
I am trying to connect usb serial device using otg on android platform. but it giving following error.
E QGC_QSerialPortInfo: Error from availableDevicesInfo F project.exampl: java_vm_ext.cc:542] JNI DETECTED ERROR IN APPLICATION: JNI CallStaticObjectMethodV called with pending exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.HashMap android.hardware.usb.UsbManager.getDeviceList()' on a null object reference F project.exampl: java_vm_ext.cc:542] at java.util.List com.hoho.android.usbserial.driver.UsbSerialProber.findAllDevices(android.hardware.usb.UsbManager) (UsbSerialProber.java:155) F project.exampl: java_vm_ext.cc:542] at void org.mavlink.qgroundcontrol.QGCActivity.updateCurrentDrivers() (QGCActivity.java:277) F project.exampl: java_vm_ext.cc:542] at java.lang.String[] org.mavlink.qgroundcontrol.QGCActivity.availableDevicesInfo() (QGCActivity.java:330) F project.exampl: java_vm_ext.cc:542] at void org.qtproject.qt5.android.QtNative.startQtApplication() (QtNative.java:-2) F project.exampl: java_vm_ext.cc:542] at void org.qtproject.qt5.android.QtNative$7.run() (QtNative.java:390) F project.exampl: java_vm_ext.cc:542] at void org.qtproject.qt5.android.QtThread$1.run() (QtThread.java:61) F project.exampl: java_vm_ext.cc:542] at void java.lang.Thread.ru n() (Thread.java:764) F project.exampl: java_vm_ext.cc:542] F project.exampl: java_vm_ext.cc:542] in call to CallStaticObjectMethodV F project.exampl: java_vm_ext.cc:542] from void org.qtproject.qt5.android.QtNative.startQtApplication() F project.exampl: java_vm_ext.cc:542] "qtMainLoopThread" prio=5 tid=14 Runnable F project.exampl: java_vm_ext.cc:542] | group="main" sCount=0 dsCount=0 flags=0 obj=0x12cc0838 self=0xd7a5be00 F project.exampl: java_vm_ext.cc:542] | sysTid=29923 nice=0 cgrp=default sched=0/0 handle=0xc8e7f970 F project.exampl: java_vm_ext.cc:542] | state=R schedstat=( 1313064282 142573646 1114 ) utm=99 stm=31 core=7 HZ=100 F project.exampl: java_vm_ext.cc:542] | stack=0xc8d7c000-0xc8d7e000 stackSize=1042KB F project.exampl: java_vm_ext.cc:542] | held mutexes= "mutator lock"(shared held) F project.exampl: java_vm_ext.cc:542] native: #00 pc 002e19d3 /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+134) F project.exampl: java_vm_ext.cc:542] native: #01 pc 00379d0b /system/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+210) F project.exampl: java_vm_ext.cc:542] native: #02 pc 00376311 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+36) F project.exampl: java_vm_ext.cc:542] native: #03 pc 00236801 /system/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+720) F project.exampl: java_vm_ext.cc:542] native: #04 pc 00236b67 /system/lib/libart.so (art::JavaVMExt::JniAbortV(char const*, char const*, std::__va_list)+58) F project.exampl: java_vm_ext.cc:542] native: #05 pc 000c574d /system/lib/libart.so (art::(anonymous namespace)::ScopedCheck::AbortF(char const*, ...)+48) F project.exampl: java_vm_ext.cc:542] native: #06 pc 000c43f9 /system/lib/libart.so (art::(anonymous namespace)::ScopedCheck::CheckPossibleHeapValue(art::ScopedObjectAccess&, char, art::(anonymous namespace)::JniValueType)+1072) F project.exampl: java_vm_ext.cc:542] native: #07 pc 000c38e9 /system/lib/libart.so (art::(anonymous namespace)::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const*, art::(anonymous namespace)::JniValueType*)+624) F project.exampl: java_vm_ext.cc:542] native: #08 pc 000c82cf /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::CheckCallArgs(art::ScopedObjectAccess&, art::(anonymous namespace)::ScopedCheck&, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, art::InvokeType, art::(anonymous namespace)::VarArgs const*)+106) F project.exampl: java_vm_ext.cc:542] native: #09 pc 000c74f3 /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodV(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, std::__va_list, art::Primitive::Type, art::InvokeType)+538) F project.exampl: java_vm_ext.cc:542] native: #10 pc 000b98c9 /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::CallStaticObjectMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+40) F project.exampl: java_vm_ext.cc:542] native: #11 pc 00195e3b /data/app/org.qtproject.example-YbpaQawi3Q2oFc1FPB-o5g==/lib/arm/libQt5Core_armeabi-v7a.so (QJNIObjectPrivate::callStaticObjectMethodV(char const*, char const*, char const*, std::__va_list)+138) F project.exampl: java_vm_ext.cc:542] native: #12 pc 0000db21 /data/app/org.qtproject.example-YbpaQawi3Q2oFc1FPB-o5g==/lib/arm/libQt5AndroidExtras_armeabi-v7a.so (QAndroidJniObject::callStaticObjectMethod(char const*, char const*, char const*, ...)+36) F project.exampl: java_vm_ext.cc:542] at org.qtproject.qt5.android.QtNative.startQtApplication(Native method) F project.exampl: java_vm_ext.cc:542] at org.qtproject.qt5.android.QtNative$7.run(QtNative.java:390) F project.exampl: java_vm_ext.cc:542] at org.qtproject.qt5.android.QtThread$1.run(QtThread.java:61) F project.exampl: java_vm_ext.cc:542] at java.lang.Thread.run(Thread.java:764) F project.exampl: java_vm_ext.cc:542] F project.exampl: runtime.cc:562] Runtime aborting... F project.exampl: runtime.cc:562] Dumping all threads without appropriate locks held: thread list lock mutator lock F project.exampl: runtime.cc:562] All threads: F project.exampl: runtime.cc:562] DALVIK THREADS (19): F project.exampl: runtime.cc:562] "qtMainLoopThread" prio=5 tid=14 Runnable F project.exampl: runtime.cc:562] | group="" sCount=0 dsCount=0 flags=0 obj=0x12cc0838 self=0xd7a5be00 F project.exampl: runtime.cc:562] | sysTid=29923 nice=0 cgrp=default sched=0/0 handle=0xc8e7f970 F project.exampl: runtime.cc:562] | state=R schedstat=( 1340041734 143039739 1119 ) utm=100 stm=33 core=7 HZ=100 F project.exampl: runtime.cc:562] | stack=0xc8d7c000-0xc8d7e000 stackSize=1042KB F project.exampl: runtime.cc:562] | held mutexes= "abort lock" "mutator lock"(shared held) F project.exampl: runtime.cc:562] native: #00 pc 002e19d3 /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+134) F project.exampl: runtime.cc:562] native: #01 pc 00379d0b /system/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+210) F project.exampl: runtime.cc:562] native: #02 pc 00376311 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+36) F project.exampl: runtime.cc:562] native: #03 pc 0038fd37 /system/lib/libart.so (art::DumpCheckpoint::Run(art::Thread*)+726) F project.exampl: runtime.cc:562] native: #04 pc 00389f5b /system/lib/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*, bool)+566) F project.exampl: runtime.cc:562] native: #05 pc 00388fd5 /system/lib/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool)+812) F project.exampl: runtime.cc:562] native: #06 pc 003581eb /system/lib/libart.so (art::Runtime::Abort(char const*)+346) F project.exampl: runtime.cc:562] native: #07 pc 0000740d /system/lib/libbase.so (android::base::LogMessage::~LogMessage()+500) F project.exampl: runtime.cc:562] native: #08 pc 00236a0f /system/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1246) F project.exampl: runtime.cc:562] native: #09 pc 00236b67 /system/lib/libart.so (art::JavaVMExt::JniAbortV(char const*, char const*, std::__va_list)+58) F project.exampl: runtime.cc:562] native: #10 pc 000c574d /system/lib/libart.so (art::(anonymous namespace)::ScopedCheck::AbortF(char const*, ...)+48) F project.exampl: runtime.cc:562] native: #11 pc 000c43f9 /system/lib/libart.so (art::(anonymous namespace)::ScopedCheck::CheckPossibleHeapValue(art::ScopedObjectAccess&, char, art::(anonymous namespace)::JniValueType)+1072) F project.exampl: runtime.cc:562] native: #12 pc 000c38e9 /system/lib/libart.so (art::(anonymous namespace)::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const*, art::(anonymous namespace)::JniValueType*)+624) F project.exampl: runtime.cc:562] native: #13 pc 000c82cf /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::CheckCallArgs(art::ScopedObjectAccess&, art::(anonymous namespace)::ScopedCheck&, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, art::InvokeType, art::(anonymous namespace)::VarArgs const*)+106) F project.exampl: runtime.cc:562] native: #14 pc 000c74f3 /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodV(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, std::__va_list, art::Primitive::Type, art::InvokeType)+538) F project.exampl: runtime.cc:562] native: #15 pc 000b98c9 /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::CallStaticObjectMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+40) F project.exampl: runtime.cc:562] native: #16 pc 00195e3b /data/app/org.qtproject.example-YbpaQawi3Q2oFc1FPB-o5g==/lib/arm/libQt5Core_armeabi-v7a.so (QJNIObjectPrivate::callStaticObjectMethodV(char const*, char const*, char const*, std::__va_list)+138) F project.exampl: runtime.cc:562] native: #17 pc 0000db21 /data/app/org.qtproject.example-YbpaQawi3Q2oFc1FPB-o5g==/lib/arm/libQt5AndroidExtras_armeabi-v7a.so (QAndroidJniObject::callStaticObjectMethod(char const*, char const*, char const*, ...)+36) F project.exampl: runtime.cc:562] at org.qtproject.qt5.android.QtNative.startQtApplication(Native method) F project.exampl: runtime.cc:562] at org.qtproject.qt5.android.QtNative$7.run(QtNative.java:390) F project.exampl: runtime.cc:562] at org.qtproject.qt5.android.QtThread$1.run(QtThread.java:61) F project.exampl: runtime.cc:562] at java.lang.Thread.run(Thread.java:764) F project.exampl: runtime.cc:562] F project.exampl: runtime.cc:562] "main" prio=5 tid=1 Native F project.exampl: runtime.cc:562] | group="" sCount=1 dsCount=0 flags=1 obj=0x77386da8 self=0xe6548000 F project.exampl: runtime.cc:562] | sysTid=29842 nice=-10 cgrp=default sched=0/0 handle=0xea4ab494 F project.exampl: runtime.cc:562] | state=S schedstat=( 1051922523 314259514 824 ) utm=80 stm=24 core=6 HZ=100 F project.exampl: runtime.cc:562] | stack=0xff1d5000-0xff1d7000 stackSize=8MB F project.exampl: runtime.cc:562] | held mutexes= F project.exampl: runtime.cc:562] kernel: (couldn't read /proc/self/task/29842/stack) F project.exampl: runtime.cc:562] native: #00 pc 000608b0 /system/lib/libc.so (__epoll_pwait+20) F project.exampl: runtime.cc:562] native: #01 pc 0002728d /system/lib/libc.so (epoll_wait+16) F project.exampl: runtime.cc:562] native: #02 pc 0000fac3 /system/lib/libutils.so (android::Looper::pollInner(int)+110) F project.exampl: runtime.cc:562] native: #03 pc 0000f9d3 /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+26) F project.exampl: runtime.cc:562] native: #04 pc 000c01d5 /system/lib/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long long, int)+26) F project.exampl: runtime.cc:562] at android.os.MessageQueue.nativePollOnce(Native method) F project.exampl: runtime.cc:562] at android.os.MessageQueue.next(MessageQueue.java:326) F project.exampl: runtime.cc:562] at android.os.Looper.loop(Looper.java:165) F project.exampl: runtime.cc:562] | state=S schedstat=( 2368489 16127344 5 ) utm=0 stm=0 core=0 HZ=100 F project.exampl: runtime.cc:562] | stack=0xc9c17000-0xc9c19000 stackSize=1042KB F project.exampl: runtime.cc:562] | held mutexes= F project.exampl: runtime.cc:562] kernel: (couldn't read /proc/self/task/29854/stack) F project.exampl: runtime.cc:562] native: #00 pc 00019ef0 /system/lib/libc.so (syscall+28) F project.exampl: runtime.cc:562] native: #01 pc 000a752b /system/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+86) F project.exampl: runtime.cc:562] native: #02 pc 002de199 /system/lib/libart.so (art::Monitor::Wait(art::Thread*, long long, int, bool, art::ThreadState)+540) F project.exampl: runtime.cc:562] native: #03 pc 002df711 /system/lib/libart.so (art::Monitor::Wait(art::Thread*, art::mirror::Object*, long long, int, bool, art::ThreadState)+320) F project.exampl: runtime.cc:562] native: #04 pc 002f41d9 /system/lib/libart.so (art::Object_wait(_JNIEnv*, _jobject*)+32) F project.exampl: runtime.cc:562] at java.lang.Object.wait(Native method) F project.exampl: runtime.cc:562] - waiting on <0x0f58d689> (a java.lang.Class<java.lang.ref.ReferenceQueue>) F project.exampl: runtime.cc:562] at java.lang.Daemons$ReferenceQueueDaemon.runInternal(Daemons.java:180) F project.exampl: runtime.cc:562] - locked <0x0f58d689> (a java.lang.Class<java.lang.ref.ReferenceQueue>) F project.exampl: runtime.cc:562] at java.lang.Daemons$Daemon.run(Daemons.java:105) F project.exampl: runtime.cc:562] at java.lang.Thread.run(Thread.java:764) F project.exampl: runtime.cc:562] F project.exampl: runtime.cc:562] "FinalizerDaemon" prio=5 tid=6 Waiting F project.exampl: runtime.cc:562] | group="" sCount=1 dsCount=0 flags=1 obj=0x12cc0478 self=0xe654ce00 F project.exampl: runtime.cc:562] | sysTid=29855 nice=4 cgrp=default sched=0/0 handle=0xc9c14970 F project.exampl: runtime.cc:562] | state=S schedstat=( 3847969 152968 12 ) utm=0 stm=0 core=1 HZ=100 F project.exampl: runtime.cc:562] | stack=0xc9b11000-0xc9b13000 stackSize=1042KB F project.exampl: runtime.cc:562] | held mutexes= F project.exampl: runtime.cc:562] kernel: (couldn't read /proc/self/task/29855/stack) F project.exampl: runtime.cc:562] native: #00 pc 00019ef0 /system/lib/libc.so (syscall+28) F project.exampl: runtime.cc:562] native: #01 pc 000a752b /system/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+86) F project.exampl: runtime.cc:562] native: #02 pc 002de199 /system/lib/libart.so (art::Monitor::Wait(art::Thread*, long long, int, bool, art::ThreadState)+540) F project.exampl: runtime.cc:562] native: #03 pc 002df711 /system/lib/libart.so (art::Monitor::Wait(art::Thread*, art::mirror::Object*, long long, int, bool, art::ThreadState)+320) F project.exampl: runtime.cc:562] native: #04 pc 002f4205 /system/lib/libart.so (art::Object_waitJI(_JNIEnv*, _jobject*, long long, int)+36) F project.exampl: runtime.cc:562] at java.lang.Object.wait(Native method) F project.exampl: runtime.cc:562] - waiting on <0x0127468e> (a java.lang.Object) F project.exampl: runtime.cc:562] at java.lang.Object.wait(Object.java:422) F project.exampl: runtime.cc:562] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:188) F project.exampl: runtime.cc:562] - locked <0x0127468e> (a java.lang.Object) F project.exampl: runtime.cc:562] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:209) F project.exampl: runtime.cc:562] at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:234) F project.exampl: runtime.cc:562] at java.lang.Daemons$Daemon.run(Daemons.java:105) F project.exampl: runtime.cc:562] at java.lang.Thread.run(Thread.java:764) F project.exampl: runtime.cc:562] F project.exampl: runtime.cc:562] "FinalizerWatchdogDaemon" prio=5 tid=7 Waiting F project.exampl: runtime.cc:562] | group="" sCount=1 dsCount=0 flags=1 obj=0x12cc0500 self=0xe64f2600 F project.exampl: runtime.cc:562] | sysTid=29856 nice=4 cgrp=default sched=0/0 handle=0xc9b0e970 F project.exampl: runtime.cc:562] | state=S schedstat=( 1109481 1516144 9 ) utm=0 stm=0 core=1 HZ=100 F project.exampl: runtime.cc:562] | stack=0xc9a0b000-0xc9a0d000 stackSize=1042KB F project.exampl: runtime.cc:562] | held mutexes= F project.exampl: runtime.cc:562] kernel: (couldn't read /proc/self/task/29856/stack) F project.exampl: runtime.cc:562] native: #00 pc 00019ef0 /system/lib/libc.so (syscall+28) F project.exampl: runtime.cc:562] native: #01 pc 000a752b /system/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+86) F project.exampl: runtime.cc:562] native: #02 pc 002de199 /system/lib/libart.so (art::Monitor::Wait(art::Thread*, long long, int, bool, art::ThreadState)+540) F project.exampl: runtime.cc:562] native: #03 pc 002df711 /system/lib/libart.so (art::Monitor::Wait(art::Thread*, art::mirror::Object*, long long, int, bool, art::ThreadState)+320) F project.exampl: runtime.cc:562] native: #04 pc 002f41d9 /system/lib/libart.so (art::Object_wait(_JNIEnv*, _jobject*)+32) F project.exampl: runtime.cc:562] at java.lang.Object.wait(Native method) F project.exampl: runtime.cc:562] - waiting on <0x050c7eaf> (a java.lang.Daemons$FinalizerWatchdogDaemon) F project.exampl: runtime.cc:562] at java.lang.Daemons$FinalizerWatchdogDaemon.sleepUntilNeeded(Daemons.java:299) F project.exampl: runtime.cc:562] - locked <0x050c7eaf> (a java.lang.Daemons$FinalizerWatchdogDaemon) F project.exampl: runtime.cc:562] at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal(Daemons.java:279) F project.exampl: runtime.cc:562] at java.lang.Daemons$Daemon.run(Daemons.java:105) F project.exampl: runtime.cc:562] at java.lang.Thread.run(Thread.java:764) F project.exampl: runtime.cc:562] F project.exampl: runtime.cc:562] "HeapTaskDaemon" prio=5 tid=8 WaitingForTaskProcessor F project.exampl: runtime.cc:562] | group="" sCount=1 dsCount=0 flags=1 obj=0x12cc0dc0 self=0xe64f4400 F project.exampl: runtime.cc:562] | sysTid=29857 nice=4 cgrp=default sched=0/0 handle=0xc9a08970 F project.exampl: runtime.cc:562] | state=S schedstat=( 120710417 52216199 79 ) utm=10 stm=1 core=1 HZ=100 F project.exampl: runtime.cc:562] | stack=0xc9905000-0xc9907000 stackSize=1042KB F project.exampl: runtime.cc:562] | held mutexes= F project.exampl: runtime.cc:562] kernel: (couldn't read /proc/self/task/29857/stack) F project.exampl: runtime.cc:562] native: #00 pc 00019ef0 /system/lib/libc.so (syscall+28) F project.exampl: runtime.cc:562] native: #01 pc 000a752b /system/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+86) F project.exampl: runtime.cc:562] native: #02 pc 001acf2d /system/lib/libart.so (art::gc::TaskProcessor::GetTask(art::Thread*)+304) F project.exampl: runtime.cc:562] native: #03 pc 001ad581 /system/lib/libart.so (art::gc::TaskProcessor::RunAllTasks(art::Thread*)+48) F project.exampl: runtime.cc:562] at dalvik.system.VMRuntime.runHeapTasks(Native method) F project.exampl: runtime.cc:562] at java.lang.Daemons$HeapTaskDaemon.runInternal(Daemons.java:477) F project.exampl: runtime.cc:562] at java.lang.Daemons$Daemon.run(Daemons.java:105) F project.exampl: runtime.cc:562] at java.lang.Thread.run(Thread.java:764) F project.exampl: runtime.cc:562] F project.exampl: runtime.cc:562] "Binder:29842_1" prio=5 tid=9 Native F project.exampl: runtime.cc:562] | group="" sCount=1 dsCount=0 flags=1 obj=0x12cc0590 self=0xde5aee00 F project.exampl: runtime.cc:562] | sysTid=29858 nice=0 cgrp=default sched=0/0 handle=0xc9704970 F project.exampl: runtime.cc:562] | state=S schedstat=( 13701513 7607655 35 ) utm=0 stm=1 core=6 HZ=100 F project.exampl: runtime.cc:562] | stack=0xc9609000-0xc960b000 stackSize=1010KB F project.exampl: runtime.cc:562] | held mutexes= F project.exampl: runtime.cc:562] kernel: (couldn't read /proc/self/task/29858/stack) F project.exampl: runtime.cc:562] native: #00 pc 000609ec /system/lib/libc.so (__ioctl+8) F project.exampl: runtime.cc:562] native: #01 pc 0002251f /system/lib/libc.so (ioctl+30) F project.exampl: runtime.cc:562] native: #02 pc 0003ee9d /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+204) F project.exampl: runtime.cc:562] native: #03 pc 0003eff9 /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+8) F project.exampl: runtime.cc:562] native: #04 pc 0003f571 /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+40) F project.exampl: runtime.cc:562] native: #05 pc 00056dc5 /system/lib/libbinder.so (android::PoolThread::threadLoop()+12) F project.exampl: runtime.cc:562] native: #06 pc 0000c71b /system/lib/libutils.so (android::Thread::_threadLoop(void*)+198) F project.exampl: runtime.cc:562] native: #07 pc 000708d5 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+88) F project.exampl: runtime.cc:562] native: #08 pc 0007243d /system/lib/libc.so (__pthread_start(void*)+22) F project.exampl: runtime.cc:562] native: #09 pc 0001e0b1 /system/lib/libc.so (__start_thread+22) F project.exampl: runtime.cc:562] (no managed stack frames) F project.exampl: runtime.cc:562] F project.exampl: runtime.cc:562] "Binder:29842_2" prio=5 tid=10 Native F project.exampl: runtime.cc:562] | group="" sCount=1 dsCount=0 flags=1 obj=0x12cc0618 self=0xdff9b800 F project.exampl: runtime.cc:562] | sysTid=29859 nice=0 cgrp=default sched=0/0 handle=0xc9606970 F project.exampl: runtime.cc:562] | state=S schedstat=( 40956455 10653648 17 ) utm=4 stm=0 core=7 HZ=100 F project.exampl: runtime.cc:562] | stack=0xc950b000-0xc950d000 stackSize=1010KB F project.exampl: runtime.cc:562] | held mutexes= F project.exampl: runtime.cc:562] kernel: (couldn't read /proc/self/task/29859/stack) F project.exampl: runtime.cc:562] native: #00 pc 000609ec /system/lib/libc.so (__ioctl+8) F project.exampl: runtime.cc:562] native: #01 pc 0002251f /system/lib/libc.so (ioctl+30) F project.exampl: runtime.cc:562] native: #02 pc 0003ee9d /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+204) F project.exampl: runtime.cc:562] native: #03 pc 0003eff9 /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+8) F project.exampl: runtime.cc:562] native: #04 pc 0003f591 /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+72) F project.exampl: runtime.cc:562] native: #05 pc 00056dc5 /system/lib/libbinder.so (android::PoolThread::threadLoop()+12) F project.exampl: runtime.cc:562] native: #06 pc 0000c71b /system/lib/libutils.so (android::Thread::_threadLoop(void*)+198) F project.exampl: runtime.cc:562] native: #07 pc 000708d5 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+88) F project.exampl: runtime.cc:562] native: #08 pc 0007243d /system/lib/libc.so (__pthread_start(void*)+22) F project.exampl: runtime.cc:562] native: #09 pc 0001e0b1 /system/lib/libc.so (__start_thread+22) F project.exampl: runtime.cc:562] (no managed stack frames) F project.exampl: runtime.cc:562] F project.exampl: runtime.cc:562] "Binder:29842_3" prio=5 tid=11 Native F project.exampl: runtime.cc:562] | group="" sCount=1 dsCount=0 flags=1 obj=0x12cc06a0 self=0xd7784800 F project.exampl: runtime.cc:562] | sysTid=29860 nice=0 cgrp=default sched=0/0 handle=0xc9508970 F project.exampl: runtime.cc:562] | state=S schedstat=( 1793491 3050728 5 ) utm=0 stm=0 core=1 HZ=100 F project.exampl: runtime.cc:562] | stack=0xc940d000-0xc940f000 stackSize=1010KB F project.exampl: runtime.cc:562] | held mutexes= F project.exampl: runtime.cc:562] kernel: (couldn't read /proc/self/task/29860/stack) F project.exampl: runtime.cc:562] native: #00 pc 000609ec /system/lib/libc.so (__ioctl+8) F project.exampl: runtime.cc:562] native: #01 pc 0002251f /system/lib/libc.so (ioctl+30) F project.exampl: runtime.cc:562] native: #02 pc 0003ee9d /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+204) F project.exampl: runtime.cc:562] native: #03 pc 0003eff9 /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+8) F project.exampl: runtime.cc:562] native: #04 pc 0003f591 /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+72) F project.exampl: runtime.cc:562] native: #05 pc 00056dc5 /system/lib/libbinder.so (android::PoolThread::threadLoop()+12) F project.exampl: runtime.cc:562] native: #06 pc 0000c71b /system/lib/libutils.so (android::Thread::_threadLoop(void*)+198) F project.exampl: runtime.cc:562] native: #07 pc 000708d5 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+88) F project.exampl: runtime.cc:562] native: #08 pc 0007243d /system/lib/libc.so (__pthread_start(void*)+22) F project.exampl: runtime.cc:562] native: #09 pc 0001e0b1 /system/lib/libc.so (__start_thread+22) F project.exampl: runtime.cc:562] (no managed stack frames) F project.exampl: runtime.cc:562] F project.exampl: runtime.cc:562] "Binder:29842_4" prio=5 tid=12 Native F project.exampl: runtime.cc:562] | group="" sCount=1 dsCount=0 flags=1 obj=0x12cc0728 self=0xdff9f400 F project.exampl: runtime.cc:562] | sysTid=29880 nice=0 cgrp=default sched=0/0 handle=0xc940a970 F project.exampl: runtime.cc:562] | state=S schedstat=( 3918281 8135156 10 ) utm=0 stm=0 core=6 HZ=100 F project.exampl: runtime.cc:562] | stack=0xc930f000-0xc9311000 stackSize=1010KB F project.exampl: runtime.cc:562] | held mutexes= F project.exampl: runtime.cc:562] kernel: (couldn't read /proc/self/task/29880/stack) F project.exampl: runtime.cc:562] native: #00 pc 000609ec /system/lib/libc.so (__ioctl+8) F project.exampl: runtime.cc:562] native: #01 pc 0002251f /system/lib/libc.so (ioctl+30) F project.exampl: runtime.cc:562] native: #02 pc 0003ee9d /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+204) F project.exampl: runtime.cc:562] native: #03 pc 0003eff9 /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+8) F project.exampl: runtime.cc:562] native: #04 pc 0003f591 /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+72) F project.exampl: runtime.cc:562] native: #05 pc 00056dc5 /system/lib/libbinder.so (android::PoolThread::threadLoop()+12) F project.exampl: runtime.cc:562] native: #06 pc 0000c71b /system/lib/libutils.so (android::Thread::_threadLoop(void*)+198) F project.exampl: runtime.cc:562] native: #07 pc 000708d5 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+88) F project.exampl: runtime.cc:562] native: #08 pc 0007243d /system/lib/libc.so (__pthread_start(void*)+22) F project.exampl: runtime.cc:562] native: #09 pc 0001e0b1 /system/lib/libc.so (__start_thread+22) F project.exampl: runtime.cc:562] (no managed stack frames) F project.exampl: runtime.cc:562] F project.exampl: runtime.cc:562] "Profile Saver" prio=5 tid=13 Native F project.exampl: runtime.cc:562] | group="" sCount=1 dsCount=0 flags=1 obj=0x12cc07b0 self=0xd7cc8e00 F project.exampl: runtime.cc:562] | sysTid=29883 nice=9 cgrp=default sched=0/0 handle=0xc9166970 F project.exampl: runtime.cc:562] | state=S schedstat=( 7338595 7340782 7 ) utm=0 stm=0 core=0 HZ=100 F project.exampl: runtime.cc:562] | stack=0xc906b000-0xc906d000 stackSize=1010KB F project.exampl: runtime.cc:562] | held mutexes= F project.exampl: runtime.cc:562] kernel: (couldn't read /proc/self/task/29883/stack) F project.exampl: runtime.cc:562] native: #00 pc 00019ef0 /system/lib/libc.so (syscall+28) F project.exampl: runtime.cc:562] native: #01 pc 000a752b /system/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+86) F project.exampl: runtime.cc:562] native: #02 pc 00262903 /system/lib/libart.so (art::ProfileSaver::Run()+530) F project.exampl: runtime.cc:562] native: #03 pc 002651f9 /system/lib/libart.so (art::ProfileSaver::RunProfileSaverThread(void*)+52) F project.exampl: runtime.cc:562] native: #04 pc 0007243d /system/lib/libc.so (__pthread_start(void*)+22) F project.exampl: runtime.cc:562] F project.exampl: runtime.cc:562] native: #04 pc 00229b0f /system/lib/libhwui.so (???) F project.exampl: runtime.cc:562] F project.exampl: runtime.cc:562] native: #04 pc 000c01d5 /system/lib/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long long, int)+26) F project.exampl: runtime.cc:562] F project.exampl: runtime.cc:562] native: #00 pc 00019ef0 /system/lib/libc.so (syscall+28) F project.exampl: runtime.cc:562] native: #05 pc 000708d5 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+88) F project.exampl: runtime.cc:562] native: #01 pc 00023e81 /system/lib/libc.so (ppoll64+112) F project.exampl: runtime.cc:562] native: #07 pc 0019597f /data/app/org.qtproject.example-YbpaQawi3Q2oFc1FPB-o5g==/lib/arm/libQt5Qml_armeabi-v7a.so (???) F project.exampl: runtime.cc:562] | sysTid=29923 nice=0 cgrp=default sched=0/0 handle=0xc8e7f970 F project.exampl: runtime.cc:562] native: #03 pc 00364467 /system/lib/libart.so (art::AbortState::DumpThread(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, art::Thread*) const+30) F project.exampl: runtime.cc:570] JNI DETECTED ERROR IN APPLICATION: JNI CallStaticObjectMethodV called with pending exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.HashMap android.hardware.usb.UsbManager.getDeviceList()' on a null object reference F project.exampl: runtime.cc:570] native: #03 pc 00236801 /system/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+720) F libc : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 29923 (qtMainLoopThrea), pid 29842 (project.example)
I also added permissions regarding usb host in androidmanifesto.xml file and comment out the availableDeviceInfo function call but its still getting error and the application get crashed. please tell me how can i solve this error.
Can anyone told me how can I detect the serial port for android.