MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.2k stars 350 forks source link

mpd fails to play files when path contains a question mark #1316

Closed fleger closed 3 years ago

fleger commented 3 years ago

Bug report

Describe the bug

When trying to play a file that contains a question mark, mpd fails with the following error: failed to decode Reproducible using both ncmpcpp and cantata.

Expected Behavior

mpd should play the file.

Actual Behavior

MPD Error : failed to decode Then mpd attempts to play the next track from the playlist.

Version

Music Player Daemon 0.23.2 (0.23.2) Copyright 2003-2007 Warren Dukes warren.dukes@gmail.com Copyright 2008-2021 Max Kellermann max.kellermann@gmail.com This is free software; see the source for copying conditions. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins: simple proxy upnp

Storage plugins: local udisks nfs curl

Neighbor plugins: upnp udisks

Decoders plugins: [mad] mp3 mp2 [mpg123] mp3 [vorbis] ogg oga [oggflac] ogg oga [flac] flac [opus] opus ogg oga [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2 [audiofile] wav au aiff aif [dsdiff] dff [dsf] dsf [hybrid_dsd] m4a [faad] aac [mpcdec] mpc [wavpack] wv [openmpt] mptm mod s3m xm it 669 amf ams c67 dbm digi dmf dsm dtm far imf ice j2b m15 mdl med mms mt2 mtm nst okt plm psm pt36 ptm sfx sfx2 st26 stk stm stp ult wow gdm mo3 oxm umx xpk ppm mmcmp [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm [mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm [sidplay] sid mus str prg P00 [wildmidi] mid [fluidsynth] mid [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve rtp:// rtsp:// rtsps:// [gme] ay gbs gym hes kss nsf nsfe rsn sap spc vgm vgz [pcm]

Filters: libsamplerate soxr

Tag plugins: id3tag

Output plugins: shout null fifo pipe alsa ao oss openal solaris pipewire pulse jack httpd snapcast recorder

Encoder plugins: null vorbis opus lame twolame wave flac

Archive plugins: [bz2] bz2 [zzip] zip [iso] iso

Input plugins: file io_uring archive alsa qobuz curl ffmpeg nfs mms cdio_paranoia

Playlist plugins: extm3u m3u pls xspf asx rss soundcloud flac cue embcue

Protocols: file:// alsa:// cdda:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mms:// mmsh:// mmst:// mmsu:// nfs:// qobuz:// rtmp:// rtmpe:// rtmps:// rtmpt:// rtmpte:// rtmpts:// rtp:// rtsp:// rtsps:// scp:// sftp:// smb:// srtp://

Other features: avahi dbus udisks epoll icu inotify ipv6 systemd tcp un

Log

Oct 28 13:14 : exception: Unsupported URI scheme Oct 28 13:14 : exception: Failed to decode Artist/Album/File ending with?.flac

MaxKellermann commented 3 years ago

Did you copy'n'paste this log verbatim, or did you redact it? I doubt it happened that way, and you redacted it in a way that loses information.

fleger commented 3 years ago

Here's the full unredacted log:

mpd --verbose --stderr
config_file: loading file /home/fleger/.config/mpd/mpd.conf
server_socket: bind to '0.0.0.0:6600' failed (continuing anyway, because binding to '[::]:6600' succeeded): Failed to bind socket: Adresse déjà utilisée
libsamplerate: libsamplerate converter 'Fastest Sinc Interpolator'
vorbis: Xiph.Org libVorbis 1.3.7
opus: libopus 1.3.1
sndfile: libsndfile-1.0.31
hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabled
decoder: Decoder plugin 'wildmidi' is unavailable: configuration file does not exist: /etc/timidity/timidity.cfg
simple_db: reading DB
input: Input plugin 'qobuz' is not configured: No Qobuz app_id configured
curl: version 7.79.1
curl: with OpenSSL/1.1.1l
state_file: Loading state file /home/fleger/.local/share/mpd/state
inotify: initializing inotify
inotify: watching music directory
client: [0] opened from [::1]:46366
client: [1] opened from [::1]:46368
client: [1] process command "channels"
client: [1] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
client: [0] process command "replay_gain_mode auto"
client: [0] command returned 0
client: [0] process command "stats"
client: [0] command returned 0
client: [0] process command "lsinfo "mpd-client://cantata/2.4.2""
exception: Unsupported URI scheme
client: [0] command returned 3
client: [0] process command "status"
client: [0] command returned 0
client: [0] process command "playlistinfo"
client: [0] command returned 0
client: [0] process command "status"
client: [0] command returned 0
client: [0] process command "stats"
client: [0] command returned 0
client: [0] process command "urlhandlers"
client: [0] command returned 0
client: [0] process command "tagtypes"
client: [0] command returned 0
client: [0] process command "commands"
client: [0] command returned 0
client: [0] process command "playlistinfo"
client: [0] command returned 0
client: [0] process command "status"
client: [0] command returned 0
client: [0] process command "outputs"
client: [0] command returned 0
client: [0] process command "status"
client: [0] command returned 0
client: [0] process command "replay_gain_status"
client: [0] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
client: [0] process command "lsinfo"
client: [0] command returned 0
client: [0] process command "currentsong"
client: [0] command returned 0
client: [0] process command "listplaylists"
client: [0] command returned 0
client: [0] process command "listplaylistinfo "[Radio Streams]""
client: [0] command returned 0
client: [0] process command "playlistinfo"
client: [0] command returned 0
client: [0] process command "status"
client: [0] command returned 0
client: [0] process command "outputs"
client: [0] command returned 0
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.001 In the Flesh?.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.002 The Thin Ice.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.003 Another Brick in the Wall, Part 1.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.004 The Happiest Days of Our Lives.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.005 Another Brick in the Wall, Part 2.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.006 Mother.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.007 Goodbye Blue Sky.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.008 Empty Spaces.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.009 Young Lust.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.010 One of My Turns.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.011 Don't Leave Now.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.012 Another Brick in the Wall, Part 3.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.013 Goodbye Cruel World.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 2.001 Hey You.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 2.002 Is There Anybody out There?.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 2.003 Nobody Home.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 2.004 Vera.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 2.005 Bring the Boys Back Home.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 2.006 Comfortably Numb.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 2.007 The Show Must Go On.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 2.008 In the Flesh!.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 2.009 Run like Hell.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 2.010 Waiting for the Worms.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 2.011 Stop.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 2.012 The Trial.flac" rating"
client: [0] command returned 3
client: [0] process command "sticker get song "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 2.013 Outside the Wall.flac" rating"
client: [0] command returned 3
client: [0] process command "playid "1""
playlist: play 0:"Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.001 In the Flesh?.flac"
client: [0] command returned 0
playlist: queue song 1:"Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.002 The Thin Ice.flac"
exception: Failed to decode Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.001 In the Flesh?.flac
player: played "Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.001 In the Flesh?.flac"
playlist: play 1:"Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.002 The Thin Ice.flac"
playlist: queue song 2:"Pink Floyd/1979-The Wall/Pink Floyd—The Wall (1979) 1.003 Another Brick in the Wall, Part 1.flac"
decoder_thread: probing plugin flac
decoder: audio_format=44100:16:2, seekable=true
output: opened "My Pulse Output" (pulse) audio_format=44100:16:2
replay_gain: replay gain mode has changed off->album
replay_gain: scale=1
replay_gain: scale=0.8231898
client: [0] process command "status"
client: [0] command returned 0
client: [0] process command "replay_gain_status"
client: [0] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
client: [0] process command "status"
client: [0] command returned 0
client: [0] process command "replay_gain_status"
client: [0] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
client: [0] process command "currentsong"
client: [0] command returned 0
client: [0] process command "status"
client: [0] command returned 0
client: [0] process command "replay_gain_status"
client: [0] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
client: [0] process command "status"
client: [0] command returned 0
client: [0] process command "replay_gain_status"
client: [0] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
client: [0] process command "pause "1""
client: [0] command returned 0
client: [0] process command "status"
client: [0] command returned 0
client: [0] process command "replay_gain_status"
client: [0] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
client: [0] process command "status"
client: [0] command returned 0
client: [0] process command "replay_gain_status"
client: [0] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
client: [0] process command "status"
client: [0] command returned 0
client: [0] process command "status"
client: [0] command returned 0
client: [0] process command "status"
client: [0] command returned 0

The song plays fine with mpd 0.22.11.

MaxKellermann commented 3 years ago

When you rescan (not update) that directory, does the song with the ? disappear from the listing?

fleger commented 3 years ago

Yes it does.

MaxKellermann commented 3 years ago

That explains my doubts about your log - this database was scanned by an old MPD version which did not yet have this bug; it was not created by MPD 0.23.