Comment 0 for bug 1775554

Revision history for this message
Patola (patola) wrote :

This is regarding /usr/share/zsh/vendor-completions/_mpv which is in the package "mpv".

If you make a dirname with lots of dots and open bracket and close bracket, like:

/tmp/XXX.X.X.X.X.X.XX.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.XX-X.X.X.X.X.X.X[XXXXX]

Put some media files inside, and try to autocomplete with:

mpv /tmp/XXX.X.X.X.X.X.XX.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.XX-X.X.X.X.X.X.X\[XXXXX\]/<TAB>

mpv gets into a loop that depending on the disk might take dozens of minutes or hours to complete. In a network file system it might practically hang forever. Using zsh -xv to check the completion I see that the completion has increasingly bigger hangs after this part repeats:

+compadd:9> PREFIX='(#a20)/tmp/XXX.X.X.X.X.X.XX.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.XX-X.X.X.X.X.X.X\[XXXXX\]/'
+compadd:12> (( 1 && 5 ))
+compadd:13> _correct_expl[_correct_group]=-J
+compadd:15> compadd -J corrections -X '- corrections - (errors 20})' -S '' -J urls -X '- URL -' cdda:// rtmp:// rtsp:// https:// mms:// mmst:// mmshttp:// rtp:// httpproxy:// hls:// rtmpe:// rtmps:// rtmpt:// rtmpte:// rtmpts:// srtp:// data:// lavf:// ffmpeg:// udp:// ftp:// tcp:// tls:// unix:// sftp:// md5:// concat:// avdevice:// av:// dvb:// smb:// file:// dvdread:// file:// dvd:// dvdnav:// file:// bd:// br:// bluray:// bdnav:// brnav:// bluraynav:// memory:// hex:// null:// mf:// edl:// rar:// file:// fd:// fdclose://

The delay to get to the next part seems to increase exponentially. I am attaching an excerpt of the zsh -xv run. A similar symptom happens with mplayer but it does not take as long - a couple minutes instead of more than half an hour. After it finishes, it doesn't match any media file, although there are mkv files in there: No matches for: `video file', `media file', `URL', `URL prefix', or `corrections'

This does not seem to occur with any other programs, media or otherwise. For media players I tried ffmpeg kmplayer totem xine avconv avplay.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: mpv 0.27.2-1ubuntu1 [modified: usr/share/zsh/vendor-completions/_mpv]
ProcVersionSignature: Ubuntu 4.15.0-22.24-lowlatency 4.15.17
Uname: Linux 4.15.0-22-lowlatency x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.9-0ubuntu7.1
Architecture: amd64
CurrentDesktop: Unity:Unity7:ubuntu
Date: Thu Jun 7 05:41:36 2018
InstallationDate: Installed on 2018-01-08 (150 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64 (20171018)
SourcePackage: mpv
UpgradeStatus: Upgraded to bionic on 2018-06-03 (4 days ago)