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

Crash on Android on Mediaplayer in 5.11.2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.11.3
    • 5.11.2
    • Multimedia
    • None
    • Android
    • Android

    Description

      After upgrading from 5.11.1 to 5.11.2 Android crashes when trying to play a sound. Here is the code:

       

          if(!player) {
              player = new QMediaPlayer(this);
              player->setVolume(100);
              QMediaPlaylist *playList = new QMediaPlaylist(player);
              playList->setPlaybackMode(QMediaPlaylist::Loop);
              playList->addMedia(QUrl::fromLocalFile(tempDir + "/horn.mp3"));
              player->setPlaylist(playList);
              player->setMuted(false);
          }
          if(player->state() != QMediaPlayer::PlayingState)
              player->play();
      

       

      I am getting plenty of messages in the console before it crashes

      V/MediaPlayer(18812): getDuration_l

      V/MediaPlayer-JNI(18812): getDuration: 6635 (msec)

      V/MediaPlayer-JNI(18812): start

      V/MediaPlayer(18812): start

      V/MediaPlayer(18812): message received msg=300, ext1=0, ext2=0

      V/MediaPlayerService( 305): Create new media retriever from pid 18812

      V/MediaPlayer-JNI(18812): getCurrentPosition: 0 (msec)

      V/MediaPlayer(18812): Received SEC_MM_PLAYER_CONTEXT_AWARE

      V/MediaPlayer(18812): callback application

      V/MediaPlayer(18812): back from callback

      V/MediaPlayer(18812): message received msg=6, ext1=0, ext2=0

      V/MediaPlayer(18812): Received MEDIA_STARTED

      V/MediaPlayer(18812): callback application

      V/MediaPlayer(18812): back from callback

      V/MediaPlayer-JNI(18812): getCurrentPosition: 52 (msec)

      V/MediaPlayer-JNI(18812): isPlaying: 1

      V/MediaPlayer-JNI(18812): getCurrentPosition: 1097 (msec)

      V/MediaPlayer-JNI(18812): getCurrentPosition: 2168 (msec)

      I/qtVlmCompanion(18812): onPause

      I/qtVlmCompanion(18812): onResume

      V/MediaPlayer-JNI(18812): getCurrentPosition: 3474 (msec)

      I/Timeline(18812): Timeline: Activity_idle id: android.os.BinderProxy@e51318e time:1131318211

      V/MediaPlayer-JNI(18812): getCurrentPosition: 4231 (msec)

      V/MediaPlayer-JNI(18812): getCurrentPosition: 5276 (msec)

      V/MediaPlayer-JNI(18812): getCurrentPosition: 6269 (msec)

      V/MediaPlayer(18812): message received msg=2, ext1=0, ext2=0

      V/MediaPlayer(18812): playback complete

      V/MediaPlayer(18812): callback application

      V/MediaPlayer(18812): back from callback

      V/MediaPlayer(18812): getDuration_l

      V/MediaPlayer-JNI(18812): getDuration: 6635 (msec)

      V/MediaPlayer-JNI(18812): reset

      V/MediaPlayer(18812): reset

      V/MediaPlayer(18812): message received msg=7, ext1=0, ext2=0

      V/MediaPlayer(18812): notify(7, 0, 0) callback on disconnected mediaplayer

      V/MediaPlayer(18812): message received msg=8, ext1=0, ext2=0

      V/MediaPlayer-JNI(18812): release

      V/MediaPlayer(18812): setListener

      V/MediaPlayer(18812): disconnect

      V/MediaPlayer(18812): notify(8, 0, 0) callback on disconnected mediaplayer

      V/MediaPlayerService( 305): Client(2221) destructor pid = 18812

      V/MediaPlayerService( 305): disconnect(2221) from pid 18812

      V/MediaPlayer(18812): destructor

      V/MediaPlayer(18812): disconnect

      V/MediaPlayer-JNI(18812): native_setup

      V/MediaPlayer(18812): constructor

      V/MediaPlayer(18812): setListener

      E/ExtMediaPlayer-JNI(18812): QCMediaPlayer could not be located....

      E/MediaPlayer-JNI(18812): QCMediaPlayer mediaplayer NOT present

      V/MediaPlayer(18812): getAudioStreamType

      V/MediaPlayer-JNI(18812): getAudioStreamType: 3 (streamtype)

      V/MediaPlayer-JNI(18812): setVolume: left 1.000000 right 1.000000

      V/MediaPlayer(18812): MediaPlayer::setVolume(1.000000, 1.000000)

      V/MediaPlayer-JNI(18812): setDataSourceFD: fd 51

      V/MediaPlayer(18812): setDataSource(51, 0, 576460752303423487)

      V/MediaPlayerService( 305): Create new client(2222) from pid 18812, uid 12905,

      V/MediaPlayer(18812): message received msg=8, ext1=0, ext2=0

      V/MediaPlayer(18812): notify(8, 0, 0) callback on disconnected mediaplayer

      V/AwesomePlayer( 305): Current Contet PID : 18812

      V/MediaPlayer(18812): setVideoSurfaceTexture

      V/MediaPlayer(18812): prepareAsync

      V/MediaPlayer-JNI(18812): reset

      V/MediaPlayer(18812): reset

      V/MediaPlayer(18812): message received msg=8, ext1=0, ext2=0

      V/MediaPlayer-JNI(18812): release

      V/MediaPlayer(18812): setListener

      V/MediaPlayer(18812): disconnect

      V/MediaPlayer(18812): notify(8, 0, 0) callback on disconnected mediaplayer

      V/MediaPlayer(18812): message received msg=300, ext1=0, ext2=0

      V/MediaPlayerService( 305): Client(2222) destructor pid = 18812

      V/MediaPlayerService( 305): disconnect(2222) from pid 18812

      V/MediaPlayer(18812): notify(300, 0, 0) callback on disconnected mediaplayer

      V/MediaPlayer(18812): message received msg=100, ext1=1, ext2=-2147483648

      E/MediaPlayer(18812): error (1, -2147483648)

      V/MediaPlayer(18812): destructor

      V/MediaPlayer-JNI(18812): native_setup

      V/MediaPlayer(18812): disconnect

      V/MediaPlayer(18812): constructor

      V/MediaPlayer(18812): setListener

      E/ExtMediaPlayer-JNI(18812): QCMediaPlayer could not be located....

      E/MediaPlayer-JNI(18812): QCMediaPlayer mediaplayer NOT present

      V/MediaPlayer(18812): getAudioStreamType

      V/MediaPlayer-JNI(18812): getAudioStreamType: 3 (streamtype)

      V/MediaPlayer-JNI(18812): setVolume: left 1.000000 right 1.000000

      V/MediaPlayer(18812): MediaPlayer::setVolume(1.000000, 1.000000)

      V/MediaPlayer-JNI(18812): setDataSourceFD: fd 51

      V/MediaPlayer(18812): setDataSource(51, 0, 576460752303423487)

      V/MediaPlayerService( 305): Create new client(2223) from pid 18812, uid 12905,

      V/MediaPlayer(18812): message received msg=8, ext1=0, ext2=0

      V/MediaPlayer(18812): notify(8, 0, 0) callback on disconnected mediaplayer

      V/AwesomePlayer( 305): Current Contet PID : 18812

      V/MediaPlayer(18812): setVideoSurfaceTexture

      V/MediaPlayer(18812): prepareAsync

      V/MediaPlayer-JNI(18812): reset

      V/MediaPlayer(18812): reset

      V/MediaPlayer(18812): message received msg=8, ext1=0, ext2=0

      V/MediaPlayer-JNI(18812): release

      V/MediaPlayer(18812): setListener

      V/MediaPlayer(18812): notify(8, 0, 0) callback on disconnected mediaplayer

      V/MediaPlayer(18812): disconnect

      V/MediaPlayer(18812): message received msg=300, ext1=0, ext2=0

      V/MediaPlayerService( 305): Client(2223) destructor pid = 18812

      V/MediaPlayerService( 305): disconnect(2223) from pid 18812

      V/MediaPlayer(18812): notify(300, 0, 0) callback on disconnected mediaplayer

      V/MediaPlayer(18812): message received msg=100, ext1=1, ext2=-2147483648

      E/MediaPlayer(18812): error (1, -2147483648)

      V/MediaPlayer(18812): destructor

      V/MediaPlayer(18812): disconnect

      V/MediaPlayer-JNI(18812): native_setup

      V/MediaPlayer(18812): constructor

      V/MediaPlayer(18812): setListener

      E/ExtMediaPlayer-JNI(18812): QCMediaPlayer could not be located....

      E/MediaPlayer-JNI(18812): QCMediaPlayer mediaplayer NOT present

      V/MediaPlayer(18812): getAudioStreamType

      V/MediaPlayer-JNI(18812): getAudioStreamType: 3 (streamtype)

      V/MediaPlayer-JNI(18812): setVolume: left 1.000000 right 1.000000

      V/MediaPlayer(18812): MediaPlayer::setVolume(1.000000, 1.000000)

      V/MediaPlayer-JNI(18812): setDataSourceFD: fd 51

      V/MediaPlayer(18812): setDataSource(51, 0, 576460752303423487)

      V/MediaPlayerService( 305): Create new client(2224) from pid 18812, uid 12905,

      V/MediaPlayer(18812): message received msg=8, ext1=0, ext2=0

      V/MediaPlayer(18812): notify(8, 0, 0) callback on disconnected mediaplayer

      V/AwesomePlayer( 305): Current Contet PID : 18812

      V/MediaPlayer(18812): setVideoSurfaceTexture

      V/MediaPlayer(18812): prepareAsync

      V/MediaPlayer-JNI(18812): reset

      V/MediaPlayer(18812): reset

      V/MediaPlayer(18812): message received msg=200, ext1=973, ext2=0

      V/MediaPlayer-JNI(18812): release

      V/MediaPlayer(18812): setListener

      V/MediaPlayer(18812): disconnect

      V/MediaPlayer(18812): notify(200, 973, 0) callback on disconnected mediaplayer

      V/MediaPlayer(18812): message received msg=5, ext1=0, ext2=0

      V/MediaPlayerService( 305): Client(2224) destructor pid = 18812

      V/MediaPlayerService( 305): disconnect(2224) from pid 18812

      V/MediaPlayer-JNI(18812): native_setup

      V/MediaPlayer(18812): constructor

      V/MediaPlayer(18812): notify(5, 0, 0) callback on disconnected mediaplayer

      V/MediaPlayer(18812): message received msg=1, ext1=0, ext2=0

      V/MediaPlayer(18812): notify(1, 0, 0) callback on disconnected mediaplayer

      V/MediaPlayer(18812): message received msg=8, ext1=0, ext2=0

      V/MediaPlayer(18812): notify(8, 0, 0) callback on disconnected mediaplayer

      V/MediaPlayer(18812): destructor

      V/MediaPlayer(18812): setListener

      V/MediaPlayer(18812): disconnect

      E/ExtMediaPlayer-JNI(18812): QCMediaPlayer could not be located....

      E/MediaPlayer-JNI(18812): QCMediaPlayer mediaplayer NOT present

      V/MediaPlayer(18812): getAudioStreamType

      V/MediaPlayer-JNI(18812): getAudioStreamType: 3 (streamtype)

      V/MediaPlayer-JNI(18812): setVolume: left 1.000000 right 1.000000

      V/MediaPlayer(18812): MediaPlayer::setVolume(1.000000, 1.000000)

      And so on a hundred of times then it calls it a day and crashes.

      Tested on 2 devices (Android 7 and Android 5).

      I downgraded to 5.11.1 and everything is working again.

       

      Attachments

        Activity

          People

            valentyn.doroshchuk Valentyn Doroshchuk
            matirai Philippe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: