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

QAudioInput::stop() crash in windows7.1

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.8.x
    • 4.7.2
    • Multimedia
    • win7, app is set "global flags " in windows debug tools
    • d3c02f0c51f9cf69245a42ee690d90cd657c5fe2

    Description

      I use windows debug tools (global flags ) to check memory errory of my Qt application .
      I found that ,when call QudioInput::stop(), my app crash ,after debugging and analysising I may found probrem ,as follows:
      in qaudioinput_win32_p.cpp
      void QAudioInputPrivate::close()
      {
      if(deviceState == QAudio::StoppedState)
      return;

      deviceState = QAudio::StoppedState;
      waveInReset(hWaveIn);
      waveInClose(hWaveIn);//

      int count = 0;
      while(!finished && count < 500)

      { count++; Sleep(10); }

      mutex.lock();
      for(int i=0; i<waveFreeBlockCount; i++)
      waveInUnprepareHeader(hWaveIn,&waveBlocks[i],sizeof(WAVEHDR));
      freeBlocks(waveBlocks);//
      mutex.unlock();
      }

      I thought the probrem is that:
      1 waveInClose is called first, and then hWaveIn become invalid.
      2 waveInUnprepareHeader is called in freeBlocks() which pass it an invalid param of hWaveIn.
      3 so my app crash .

      Attachments

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

        Activity

          People

            lzelensk Lev Zelenskiy
            walletiger walle.tiger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes