ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

FMQ error occurs when loading the Excoplayer multiple times in the Recycler view.

Open JiyongYang opened this issue 4 years ago • 8 comments

FMQ error occurs when loading the Excoplayer multiple times in the Recycler view.

It's okay to load Exoplayer less than two, but from the third, the following errors occur. E/FMQ: grantorIdx must be less than 3

I wanted to solve this problem, but I don't know the exact cause, so I don't know what to do.

VideoPlayerInsideRecyclerView If you run the above project, you can check the error.

JiyongYang avatar Jun 05 '21 07:06 JiyongYang

It's impossible for us to help with so little information. It's unclear whether the single line of logging you've provided even corresponds to the issue you're actually seeing. Please properly fill in the bug template if you'd like assistance with this issue. Please copy/paste it here, rather than opening a new issue. Thanks!

ojw28 avatar Jun 07 '21 12:06 ojw28

The reason why I didn't attach another error phrase is that only that error phrase pops up as soon as I load the third Exoplayer by running the example above.

The error history below can be viewed directly from the error category in the Logcat by executing the "Instagram screen" in the example above.

2021-06-08 23:25:08.026 11200-12583/app.videoplayerinsiderecyclerview E/FMQ: grantorIdx must be less than 3
2021-06-08 23:25:08.026 11200-12583/app.videoplayerinsiderecyclerview E/FMQ: grantorIdx must be less than 3
2021-06-08 23:25:08.028 11200-12583/app.videoplayerinsiderecyclerview E/ion: ioctl c0044901 failed with code -1: Inappropriate ioctl for device
2021-06-08 23:25:08.029 11200-12583/app.videoplayerinsiderecyclerview E/FMQ: grantorIdx must be less than 3
2021-06-08 23:25:08.033 11200-12573/app.videoplayerinsiderecyclerview E/FMQ: grantorIdx must be less than 3

I'd like to share more content, but the above is the entire error log I got.

JiyongYang avatar Jun 08 '21 14:06 JiyongYang

Please properly fill in the bug template if you'd like assistance with this issue. Please copy/paste it here, rather than opening a new issue. Thanks!

ojw28 avatar Jun 08 '21 14:06 ojw28

FMQ error occurs when loading the Excoplayer multiple times in the Recycler view. It's okay to load Exoplayer less than two, but from the third, the following errors occur. E/FMQ: grantorIdx must be less than 3


Demo app link

  • Reproduction Step Load more than 3 Exoplayer in RecyclerView.

  • observed errors

2021-06-08 23:25:08.026 11200-12583/app.videoplayerinsiderecyclerview E/FMQ: grantorIdx must be less than 3
2021-06-08 23:25:08.026 11200-12583/app.videoplayerinsiderecyclerview E/FMQ: grantorIdx must be less than 3
2021-06-08 23:25:08.028 11200-12583/app.videoplayerinsiderecyclerview E/ion: ioctl c0044901 failed with code -1: Inappropriate ioctl for device
2021-06-08 23:25:08.029 11200-12583/app.videoplayerinsiderecyclerview E/FMQ: grantorIdx must be less than 3
2021-06-08 23:25:08.033 11200-12573/app.videoplayerinsiderecyclerview E/FMQ: grantorIdx must be less than 3
  • Output of running "adb bugreport" in the console shortly after encountering the issue send email to "[email protected]" with "Issue #9020"

  • ExoPlayer version number: 2.14.0
  • Android version: 11
  • Android device: SM-N981N

JiyongYang avatar Jun 08 '21 15:06 JiyongYang

@ojw28 If you know, it would be helpful if you could describe what the log message "FMQ: grantorIdx must be less than 3" means, and if it's just a red herring. (I'm trying to debug a failure in c2.android.avc.encoder, likely unrelated, but this is a top hit for the logged error.)

nmr8acme avatar Feb 04 '22 22:02 nmr8acme

I'm not sure what the FMQ error means in this context (or whether it's a red herring). It seems to come from here, but it's unclear what the message queue in question is being used for.

Looking into the bug report attached above, the only concrete problems I can see are outside of ExoPlayer's control:

  1. A playback failure due to a server 400 (BAD_REQUEST) response code:
06-08 23:23:30.387 10323 19880 11186 E ExoPlayerImplInternal: Playback error
06-08 23:23:30.387 10323 19880 11186 E ExoPlayerImplInternal:   com.google.android.exoplayer2.ExoPlaybackException: Source error
06-08 23:23:30.387 10323 19880 11186 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:580)
06-08 23:23:30.387 10323 19880 11186 E ExoPlayerImplInternal:       at android.os.Handler.dispatchMessage(Handler.java:102)
06-08 23:23:30.387 10323 19880 11186 E ExoPlayerImplInternal:       at android.os.Looper.loop(Looper.java:246)
06-08 23:23:30.387 10323 19880 11186 E ExoPlayerImplInternal:       at android.os.HandlerThread.run(HandlerThread.java:67)
06-08 23:23:30.387 10323 19880 11186 E ExoPlayerImplInternal:   Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 400
06-08 23:23:30.387 10323 19880 11186 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:383)
06-08 23:23:30.387 10323 19880 11186 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84)
06-08 23:23:30.387 10323 19880 11186 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1016)
06-08 23:23:30.387 10323 19880 11186 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:417)
06-08 23:23:30.387 10323 19880 11186 E ExoPlayerImplInternal:       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
06-08 23:23:30.387 10323 19880 11186 E ExoPlayerImplInternal:       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
06-08 23:23:30.387 10323 19880 11186 E ExoPlayerImplInternal:       at java.lang.Thread.run(Thread.java:923)
  1. Application code calling methods on an ExoPlayer instance that's already been released (application code should not do this):
06-09 00:05:52.682 10313 11200 11200 W MessageQueue: Handler (android.os.Handler) {ee71db1} sending message to a Handler on a dead thread
06-09 00:05:52.682 10313 11200 11200 W MessageQueue: java.lang.IllegalStateException: Handler (android.os.Handler) {ee71db1} sending message to a Handler on a dead thread
06-09 00:05:52.682 10313 11200 11200 W MessageQueue: 	at android.os.MessageQueue.enqueueMessage(MessageQueue.java:560)
06-09 00:05:52.682 10313 11200 11200 W MessageQueue: 	at android.os.Handler.enqueueMessage(Handler.java:778)
06-09 00:05:52.682 10313 11200 11200 W MessageQueue: 	at android.os.Handler.sendMessageAtTime(Handler.java:727)
06-09 00:05:52.682 10313 11200 11200 W MessageQueue: 	at android.os.Handler.sendMessageDelayed(Handler.java:697)
06-09 00:05:52.682 10313 11200 11200 W MessageQueue: 	at android.os.Handler.sendMessage(Handler.java:635)
06-09 00:05:52.682 10313 11200 11200 W MessageQueue: 	at android.os.Message.sendToTarget(Message.java:468)
06-09 00:05:52.682 10313 11200 11200 W MessageQueue: 	at com.google.android.exoplayer2.ExoPlayerImplInternal.setPlayWhenReady(ExoPlayerImplInternal.java:184)
06-09 00:05:52.682 10313 11200 11200 W MessageQueue: 	at com.google.android.exoplayer2.ExoPlayerImpl.setPlayWhenReady(ExoPlayerImpl.java:264)
06-09 00:05:52.682 10313 11200 11200 W MessageQueue: 	at com.google.android.exoplayer2.SimpleExoPlayer.updatePlayWhenReady(SimpleExoPlayer.java:1566)
06-09 00:05:52.682 10313 11200 11200 W MessageQueue: 	at com.google.android.exoplayer2.SimpleExoPlayer.setPlayWhenReady(SimpleExoPlayer.java:1204)
06-09 00:05:52.682 10313 11200 11200 W MessageQueue: 	at app.videoplayerinsiderecyclerview.utils.PlayerViewAdapter$Companion.pauseCurrentPlayingVideo(PlayerViewBindingAdapter.kt:43)

ojw28 avatar Jul 18 '22 10:07 ojw28

There was a change in Android last year in response to an internal bug about grantorIdx must be less than log spam. That change is in Android 12, so if you're seeing this error on Android 11 or earlier (as the repro steps above mention) then I wouldn't put much weight on it, but if you're still seeing it on Android 12 or later it might indicate a real issue.

Other than this logging, do you observe any other problems with the app? I can't see anything mentioned above.

icbaker avatar Jul 18 '22 17:07 icbaker

Hey @JiyongYang. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Aug 05 '22 01:08 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@JiyongYang if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Aug 16 '22 01:08 google-oss-bot