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
Forum Updated to NodeBB v4.3 + New Features

Crash in QMediaPlayer.setPlayer() in debug mode

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 2.1k 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 16 Jul 2017, 07:38 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 16 Jul 2017, 16:35 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 16 Jul 2017, 17:59 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
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 16 Jul 2017, 19:01 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 18 Jul 2017, 07:45 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
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 18 Jul 2017, 21:55 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 19 Jul 2017, 08:40
              0
              • S SGaist
                18 Jul 2017, 21:55

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

                V Offline
                V Offline
                vlada
                wrote on 19 Jul 2017, 08:40 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

                1/7

                16 Jul 2017, 07:38

                • Login

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