Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Crash in QMediaPlayer.setPlayer() in debug mode

Crash in QMediaPlayer.setPlayer() in debug mode

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 2.3k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vlada
    wrote on last edited by vlada
    #1

    Hello,

    my application crashes under some circumstances when stopping media playback. I wanted to debug it and found out that I can not get to the point where it happens. If I start the application in debug mode, it crashes at this line:

    QString path = "C:/audiofile.mp3"
    QMediaPlayer player;
    
    player.setMedia(QUrl::fromLocalFile(path)); // here it crashes
    

    The crash only happens in debug mode. If I run the application normally, this works. Format of the file I try to play has no impact. But the next crash when stopping playback happens even in release mode. I do believe the second crash is also not in my code but somewhere in Qt libraries. But since I can not trigger it in debug mode I have no idea where and why it happens.

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Fuel
      wrote on last edited by
      #2

      Sometimes it helps to rebuild all in Debug Mode.

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vlada
        wrote on last edited by
        #3

        Unfortunately this didn't help. Could someone please check if it is a common problem or if it happens only on my computer? Thank you.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Then you should add the platform you are working on as well as compiler and Qt version.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • V Offline
            V Offline
            vlada
            wrote on last edited by
            #5

            I'm sorry I forgot to mention these important information. I tried Qt versions 5.9 and 5.9.1 with the same result. I'm testing it on Windows 7 with MinGW builds.

            I'll try it also on Linux when I get home.

            I'd like to mention that if I switch to QtAV as the playback engine, I don't get any crashes.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              QtAV uses ffmpeg as backend which is radically different from QtMultimedia who uses the native multimedia system.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              V 1 Reply Last reply
              0
              • SGaistS SGaist

                QtAV uses ffmpeg as backend which is radically different from QtMultimedia who uses the native multimedia system.

                V Offline
                V Offline
                vlada
                wrote on last edited by
                #7

                @SGaist I know this, I just wanted to mention that the problem is very likely in QtMultimedia because with other playback engine it doesn't crash.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved