mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
26.89k stars 2.84k forks source link

player/command:fix assertion "mpctx->stop_play" failed in player/loadfile.c #14130

Closed user1121114685 closed 2 months ago

user1121114685 commented 2 months ago

A recurring bug, I tried hundreds of times and finally found the cause using diff. So accepting this PR can close the 13778 issue.

close https://github.com/mpv-player/mpv/issues/13778

form https://github.com/mpv-player/mpv/issues/10782

github-actions[bot] commented 2 months ago

Download the artifacts for this pull request:

Windows * [mpv-i686-w64-mingw32](https://nightly.link/mpv-player/mpv/actions/artifacts/1496207689.zip) * [mpv-x86_64-w64-mingw32](https://nightly.link/mpv-player/mpv/actions/artifacts/1496212166.zip) * [mpv-x86_64-windows-msvc](https://nightly.link/mpv-player/mpv/actions/artifacts/1496237082.zip)
macOS * [mpv-macos-14-arm](https://nightly.link/mpv-player/mpv/actions/artifacts/1496205179.zip) * [mpv-macos-13-intel](https://nightly.link/mpv-player/mpv/actions/artifacts/1496208983.zip) * [mpv-macos-12-intel](https://nightly.link/mpv-player/mpv/actions/artifacts/1496215558.zip)
kasper93 commented 2 months ago

What are you doing to trigger this condition?

Does reverting ab5b25034331ea7740b12e5314e16b1d5ad7624b fixes the issue?

EDIT:

Ah, I see https://github.com/mpv-player/mpv/issues/10782 was already similar. In this case maybe @Dudemanguy know better what to do here.

Dudemanguy commented 2 months ago

We need some actual reproduction steps because I don't even understand what is supposed to trigger the original issue.

user1121114685 commented 2 months ago

We need some actual reproduction steps because I don't even understand what is supposed to trigger the original issue.

  1. Cross-platform compilation into Android libmpv
  2. Add URLS using loadfile append
  3. Wait for a file in the playlist to play to the end (can be manually moved to a position almost to the end)
  4. There will be an assertion failure problem.

But this problem has occurred before, and someone has already fixed it. You can refer to the problem of 10872, but this situation happened again later. Similarly, we only need to add corresponding judgments to solve this problem. Of course, it is better to judge within the function rather than every time the function is called.

user1121114685 commented 2 months ago

queue_seek I think modifying this function is the optimal solution, but I'm not sure whether doing so will cause other problems.

Dudemanguy commented 2 months ago

someone has already fixed it. You can refer to the problem of 10872

That was me and no, that's a completely different issue. I can't reproduce with the steps you listed on normal mpv (no android here, but maybe that matters).

kasper93 commented 2 months ago

Superseded by #14135