QAudioRecorder recording hangs

Bug #1433563 reported by Michał Karnicki
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Canonical Phone Foundations
gst-plugins-good0.10 (Ubuntu)
Fix Released
Undecided
Ricardo Salveti
qtmultimedia-opensource-src (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Recording audio with QAudioRecorder intermittently fails for me. Another user even reported that it only works 1 out of 5-10 times.

QAudioRecorder seems to hang on requesting the audio to be recorded (status QMediaRecortder::StartingStatus). When it actually works, it properly goes from starting to recording and then it's possible to record audio and playback.

QAudioRecorder has an error() method, but it returns QMediaRecorder::NoError

Since it was confirmed by two people (victorp, karni) we suspect it's a bug in the middleware rather than the apps.

A test click has been sent to Ricardo's e-mail by Victor.

phablet@ubuntu-phablet:~$ system-image-cli -i
current build number: 20
device name: krillin
channel: (the BQ channel)
last update: 2015-02-26 17:06:15
version version: 20
version ubuntu: 20150219
version device: 20150225-b67e0b6
version custom: 20150216-561-29-186

Related branches

Michał Karnicki (karni)
Changed in pulseaudio (Ubuntu):
assignee: nobody → Ricardo Salveti (rsalveti)
Revision history for this message
Raymond (superquad-vortex2) wrote :

it look like qaudiorecorder bug

in qaudioinput_alsa_p.cpp

buffer_time = 100000;
    period_time = 20000;

but chunks = 8

if ( !fatal ) {

        err = snd_pcm_hw_params_set_buffer_time_near(handle, hwparams, &buffer_time, &dir);

        if ( err < 0 ) {

            fatal = true;

            errMessage = QString::fromLatin1("QAudioInput: snd_pcm_hw_params_set_buffer_time_near: err = %1").arg(err);

        }

    }

    if ( !fatal ) {

        err = snd_pcm_hw_params_set_period_time_near(handle, hwparams, &period_time, &dir);

        if ( err < 0 ) {

            fatal = true;

            errMessage = QString::fromLatin1("QAudioInput: snd_pcm_hw_params_set_period_time_near: err = %1").arg(err);

        }

    }

    if ( !fatal ) {

        err = snd_pcm_hw_params_set_periods_near(handle, hwparams, &chunks, &dir);

        if ( err < 0 ) {

            fatal = true;

            errMessage = QString::fromLatin1("QAudioInput: snd_pcm_hw_params_set_periods_near: err = %1").arg(err);

        }

    }

    if ( !fatal ) {

        err = snd_pcm_hw_params(handle, hwparams);

        if ( err < 0 ) {

            fatal = true;

            errMessage = QString::fromLatin1("QAudioInput: snd_pcm_hw_params: err = %1").arg(err);

        }

    }

affects: pulseaudio (Ubuntu) → gst-plugins-good0.10 (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gst-plugins-good0.10 (Ubuntu):
status: New → Confirmed
Changed in qtmultimedia-opensource-src (Ubuntu):
status: New → Confirmed
tags: added: hotfix
Changed in canonical-devices-system-image:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Canonical Phone Foundations (canonical-phonedations-team)
tags: removed: hotfix
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gst-plugins-good0.10 - 0.10.31-3+nmu1ubuntu7

---------------
gst-plugins-good0.10 (0.10.31-3+nmu1ubuntu7) vivid; urgency=medium

  * debian/patches/0001-pulsesrc-improve-clock-handling.patch:
    - Cherry-pick from upstream to fix deadlock when recording
      (LP: #1433563)
 -- Ricardo Salveti de Araujo <email address hidden> Sun, 19 Apr 2015 20:02:41 -0300

Changed in gst-plugins-good0.10 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtmultimedia-opensource-src - 5.4.1-1ubuntu2

---------------
qtmultimedia-opensource-src (5.4.1-1ubuntu2) vivid; urgency=medium

  * debian/patches/debian/patches/qgstreamercapturesession_avoid_race_eos.patch:
    - Avoid races when sending EOS, making sure pipeline is in playing state
      first (LP: #1433563)
 -- Ricardo Salveti de Araujo <email address hidden> Sun, 19 Apr 2015 20:13:29 -0300

Changed in qtmultimedia-opensource-src (Ubuntu):
status: Confirmed → Fix Released
Changed in canonical-devices-system-image:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.