Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-45748

Bluetooth service discovery crashes on Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.4.2
    • 5.4.1
    • None
    • Android

    Description

      I was trying the QML Ping Pong example to see how to use Bluetooth to communicate, I paired to my Phone, setup my Linux box as the PingPong server, then launched the PingPong as client on Android 5 and it seems that when a or the service is found it crashes (if nothing is found it doesn´t):

      • also using the Android as server and Linux as client works.

      F/art (24697): art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: can't call java.lang.String android.os.ParcelUuid.toString() on instance of java.lang.String
      F/art (24697): art/runtime/check_jni.cc:65] in call to CallObjectMethodV
      F/art (24697): art/runtime/check_jni.cc:65] from void org.qtproject.qt5.android.bluetooth.QtBluetoothBroadcastReceiver.jniOnReceive(long, android.content.Context, android.content.Intent)
      F/art (24697): art/runtime/check_jni.cc:65] "main" prio=5 tid=1 Runnable
      F/art (24697): art/runtime/check_jni.cc:65] | group="main" sCount=0 dsCount=0 obj=0x72f90060 self=0xb79fe5a8
      F/art (24697): art/runtime/check_jni.cc:65] | sysTid=24697 nice=0 cgrp=apps sched=0/0 handle=0xb6fd2ec8
      F/art (24697): art/runtime/check_jni.cc:65] | state=R schedstat=( 0 0 0 ) utm=22 stm=6 core=3 HZ=100
      F/art (24697): art/runtime/check_jni.cc:65] | stack=0xbe22c000-0xbe22e000 stackSize=8MB
      F/art (24697): art/runtime/check_jni.cc:65] | held mutexes= "mutator lock"(shared held)
      F/art (24697): art/runtime/check_jni.cc:65] native: #00 pc 00004c58 /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
      F/art (24697): art/runtime/check_jni.cc:65] native: #01 pc 000034c1 /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
      F/art (24697): art/runtime/check_jni.cc:65] native: #02 pc 0025becd /system/lib/libart.so (art::DumpNativeStack(std::_1::basic_ostream<char, std::_1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+84)
      F/art (24697): art/runtime/check_jni.cc:65] native: #03 pc 0023fb6b /system/lib/libart.so (art::Thread::Dump(std::_1::basic_ostream<char, std::_1::char_traits<char> >&) const+162)
      F/art (24697): art/runtime/check_jni.cc:65] native: #04 pc 000b102b /system/lib/libart.so (art::JniAbort(char const*, char const*)+610)
      F/art (24697): art/runtime/check_jni.cc:65] native: #05 pc 000b1751 /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+68)
      F/art (24697): art/runtime/check_jni.cc:65] native: #06 pc 000b19e1 /system/lib/libart.so (art::ScopedCheck::CheckVirtualMethod(_jobject*, _jmethodID*)+300)
      F/art (24697): art/runtime/check_jni.cc:65] native: #07 pc 000b9823 /system/lib/libart.so (art::CheckJNI::CallObjectMethodV(JNIEnv*, _jobject*, _jmethodID*, std::_va_list)+82)
      F/art (24697): art/runtime/check_jni.cc:65] native: #08 pc 001ea109 /data/app/org.qtproject.example.pingpong-2/lib/arm/libQt5Core.so (QJNIObjectPrivate::callObjectMethodV(char const*, char const*, std::__va_list) const+68)
      F/art (24697): art/runtime/check_jni.cc:65] native: #09 pc 001ea16b /data/app/org.qtproject.example.pingpong-2/lib/arm/libQt5Core.so (QJNIObjectPrivate::callObjectMethod(char const*, char const*, ...) const+18)
      F/art (24697): art/runtime/check_jni.cc:65] native: #10 pc 001ea185 /data/app/org.qtproject.example.pingpong-2/lib/arm/libQt5Core.so (QJNIObjectPrivate QJNIObjectPrivate::callObjectMethod<_jstring*>(char const*) const+8)
      F/art (24697): art/runtime/check_jni.cc:65] native: #11 pc 001ea249 /data/app/org.qtproject.example.pingpong-2/lib/arm/libQt5Core.so (QJNIObjectPrivate::toString() const+44)
      F/art (24697): art/runtime/check_jni.cc:65] native: #12 pc 000085ab /data/app/org.qtproject.example.pingpong-2/lib/arm/libQt5AndroidExtras.so (QAndroidJniObject::toString() const+6)
      F/art (24697): art/runtime/check_jni.cc:65] native: #13 pc 00017141 /data/app/org.qtproject.example.pingpong-2/lib/arm/libQt5Bluetooth.so (???)
      F/art (24697): art/runtime/check_jni.cc:65] native: #14 pc 000163b3 /data/app/org.qtproject.example.pingpong-2/lib/arm/libQt5Bluetooth.so (???)
      F/art (24697): art/runtime/check_jni.cc:65] native: #15 pc 0003443b /data/dalvik-cache/arm/data@app@org.qtproject.example.pingpong-2@base.apk@classes.dex (Java_org_qtproject_qt5_android_bluetooth_QtBluetoothBroadcastReceiver_jniOnReceive__JLandroid_content_Context_2Landroid_content_Intent_2+146)
      F/art (24697): art/runtime/check_jni.cc:65] at org.qtproject.qt5.android.bluetooth.QtBluetoothBroadcastReceiver.jniOnReceive(Native method)
      F/art (24697): art/runtime/check_jni.cc:65] at org.qtproject.qt5.android.bluetooth.QtBluetoothBroadcastReceiver.onReceive(QtBluetoothBroadcastReceiver.java:64)
      F/art (24697): art/runtime/check_jni.cc:65] - locked <0x10c3423c> (a org.qtproject.qt5.android.bindings.QtActivity)
      F/art (24697): art/runtime/check_jni.cc:65] at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:870)
      F/art (24697): art/runtime/check_jni.cc:65] at android.os.Handler.handleCallback(Handler.java:739)
      F/art (24697): art/runtime/check_jni.cc:65] at android.os.Handler.dispatchMessage(Handler.java:95)
      F/art (24697): art/runtime/check_jni.cc:65] at android.os.Looper.loop(Looper.java:135)
      F/art (24697): art/runtime/check_jni.cc:65] at android.app.ActivityThread.main(ActivityThread.java:5312)
      F/art (24697): art/runtime/check_jni.cc:65] at java.lang.reflect.Method.invoke!(Native method)
      F/art (24697): art/runtime/check_jni.cc:65] at java.lang.reflect.Method.invoke(Method.java:372)
      F/art (24697): art/runtime/check_jni.cc:65] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
      F/art (24697): art/runtime/check_jni.cc:65] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
      F/art (24697): art/runtime/check_jni.cc:65]
      F/art (24697): art/runtime/runtime.cc:284] Runtime aborting...

      Got this warning which is a bit different and w/o crash:
      W/BluetoothAdapter(22554): getBluetoothService() called with no BluetoothManagerCallback

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-45748
          # Subject Branch Project Status CR V

          Activity

            People

              ablasche Alex Blasche
              dantti Daniel Nicoletti
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes