mpv zsh completion hangs with specially crafter dirnames
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mpv (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
zsh (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
This is regarding /usr/share/
If you make a dirname with lots of dots and open bracket and close bracket, like:
/tmp/XXX.
Put some media files inside, and try to autocomplete with:
mpv /tmp/XXX.
zsh 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 hangs forever. Using zsh -xv to check the completion I see that the completion has increasingly bigger hangs after this part repeats:
+compadd:9> PREFIX=
+compadd:12> (( 1 && 5 ))
+compadd:13> _correct_
+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/
ProcVersionSign
Uname: Linux 4.15.0-
NonfreeKernelMo
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)
The bug report seems to say you have modified the file. What have you modified it to?
Package: mpv 0.27.2-1ubuntu1 [modified: usr/share/ zsh/vendor- completions/ _mpv]