Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-1089

QAudioDeviceInfo::availableDevices crashes on device change while it executes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 1.1.1
    • 1.0.0, 1.1.0
    • Multimedia
    • None
    • OSX 10.6.6
    • f299d9ae2cac0f52e9d9cf5e4a015181203ba50f

      I've seen a sporadic fatal crash in QAudioDeviceInfo::availableDevices(), caused by it trying to follow a pointer that was invalid, presumably because the available devices changed (due to unplugging a USB audio device) while the function was executing.

      Apparently QAudioDeviceInfo::availableDevices() queries the underlying low-level API over an extended period of time and thus may receive and act on inconsistent information. All queries relating to the same device should be turned into an atomic operation by temporarily disabling interrupts.

      This is not quite as obscure a problem as it may seem, because due to QTBUG-10393 any program that wishes to maintain a QListModel of audio devices (e.g., for user selection) currently needs to frequently poll QAudioDeviceInfo::availableDevices().

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

            jorabbe Jonas Rabbe (closed Nokia identity) (Inactive)
            lino Nic Schraudolph
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes