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

Handle leack, memory leack

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • None
    • 5.9.8, 5.9.9
    • Multimedia
    • None
    • Windows

    Description

      Memory leaks while using functions QMediaPlaylist:: setCurrentIndex, QMediaPlayer::play.

      MainWindow::MainWindow( QWidget *parent )
          : QMainWindow( parent )
          , ui( new Ui::MainWindow )
      {
          ui->setupUi( this );
      
          mp = new QMediaPlayer();
          mp->setVolume( 50 );
          pl = new QMediaPlaylist();
      
          pl->addMedia( QUrl::fromLocalFile( "FILEPATH.wav" ) );
          mp->setPlaylist( pl );
      }
      
      MainWindow::~MainWindow()
      {
          delete ui;
      }
      
      
      void MainWindow::on_pushButton_clicked()
      {
          QTimer *timer = new QTimer();
      
          connect( timer, &QTimer::timeout, this, [=]()
          {
              pl->setCurrentIndex( 0 );
      //        mp->play();
          });
      
          timer->start( 500 );
      }
      
      

      Output message:

      shell\osshell\lmui\ntshrui\dll\shrengine.cpp(1487)\ntshrui.dll!00007FFDC62B94D0: (caller: 00007FFDC62E390F) ReturnHr(1) tid(13b4) 80004005 Unrecognized error

      shell\osshell\lmui\ntshrui\dll\shrengine.cpp(1487)\ntshrui.dll!00007FFDC62B94D0: (caller: 00007FFDC62E390F) ReturnHr(2) tid(13b4) 80004005 Unrecognized error

      shell\osshell\lmui\ntshrui\dll\shrengine.cpp(1487)\ntshrui.dll!00007FFDC62B94D0: (caller: 00007FFDC62E390F) ReturnHr(3) tid(13b4) 80004005 Unrecognized error

      etc...

      Attachments

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

        Activity

          People

            artemiy Artem Dyomin
            dunkan Ernest Kazantsev
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change