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

[Android] Crash from QtBluetoothLE.interruptCurrentIO and QtBluetoothLE.performNextIO

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.11.1
    • 5.9.3
    • None
    • Android versions 4, 6, and 7

      Qt 5.9.3
    • Android

    Description

      I'm seeing this crash from users on Firebase Crashlytics on Android versions 4, 6, and 7 (APIs 19, 23, 24) with Qt 5.9.3. My app uses Bluetooth LE functionality and is based on the Bluetooth Low Energy Scanner example. The app sets the background running attribute to true in its Android manifest.

      Stack traces:

      Fatal Exception: java.lang.IndexOutOfBoundsException
      Index: 65, Size: 0
      
      java.util.ArrayList.throwIndexOutOfBoundsException (ArrayList.java:255)       java.util.ArrayList.get (ArrayList.java:308)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.interruptCurrentIO (QtBluetoothLE.java:1138)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.access$200 (QtBluetoothLE.java:67)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE$TimeoutRunnable.run (QtBluetoothLE.java:106)       android.os.Handler.handleCallback (Handler.java:739)       android.os.Handler.dispatchMessage (Handler.java:95)       android.os.Looper.loop (Looper.java:158)       android.app.ActivityThread.main (ActivityThread.java:7225)       java.lang.reflect.Method.invoke (Method.java)       com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)       com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)

       

      Fatal Exception: java.lang.IndexOutOfBoundsException
      Index: 92, Size: 0
      
      java.util.ArrayList.get (ArrayList.java:411)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.performNextIO (QtBluetoothLE.java:1268)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.performNextIO (QtBluetoothLE.java:1287)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.performNextIO (QtBluetoothLE.java:1287)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.performNextIO (QtBluetoothLE.java:1287)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.performNextIO (QtBluetoothLE.java:1287)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.performNextIO (QtBluetoothLE.java:1287)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.performNextIO (QtBluetoothLE.java:1287)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.performNextIO (QtBluetoothLE.java:1287)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.performNextIO (QtBluetoothLE.java:1287)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.performNextIO (QtBluetoothLE.java:1287)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.performNextIO (QtBluetoothLE.java:1287)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.performNextIO (QtBluetoothLE.java:1287)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.interruptCurrentIO (QtBluetoothLE.java:1133)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE.access$200 (QtBluetoothLE.java:67)       org.qtproject.qt5.android.bluetooth.QtBluetoothLE$TimeoutRunnable.run (QtBluetoothLE.java:106)       android.os.Handler.handleCallback (Handler.java:751)       android.os.Handler.dispatchMessage (Handler.java:95)       android.os.Looper.loop (Looper.java:154)       android.app.ActivityThread.main (ActivityThread.java:6077)       java.lang.reflect.Method.invoke (Method.java)       com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:865)       com.android.internal.os.ZygoteInit.main (ZygoteInit.java:755)  

       

      The value of the index causing the exception seems to vary between crash reports but the size of the ArrayList seems to always be 0.

      The Firebase Crashlytics report indicates that 98% of these crashes occur when the app is in the background on Android.
       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ablasche Alex Blasche
            adolby Andrew Dolby
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes