MusicPlayerDaemon / MPD

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

AUDCLNT_E_DEVICE_INVALIDATED #1759

Closed fenhl closed 1 year ago

fenhl commented 1 year ago

Bug report

Describe the bug

Sometimes when I attempt to resume playback after my speaker has been turned off for a few minutes and then turned back on, MPD crashes instead.

Expected Behavior

Playback resumes normally.

Actual Behavior

MPD exits with the following error message:

mixer: Failed to read mixer for 'Windows': Unable to get service: AUDCLNT_E_DEVICE_INVALIDATED

Version

Music Player Daemon 0.23.12 (0.23.12)
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

Storage plugins:
 local nfs curl

Decoders plugins:
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [opus] opus ogg oga
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [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
 [wildmidi] 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
 [gme] ay gbs gym hes kss nsf nsfe rsn sap spc vgm vgz
 [pcm]

Filters:

Tag plugins:

Output plugins:
 null jack httpd snapcast recorder winmm wasapi

Encoder plugins:
 null vorbis opus lame wave flac

Input plugins:
 file curl ffmpeg nfs

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

Protocols:
 http:// https:// nfs://

Other features:
 ipv6 tcp

Configuration

music_directory "C:/Users/fenhl/Music"
db_file "C:/Users/fenhl/.config/mpd/mpd.db"
auto_update "yes"

log_file "C:/Users/fenhl/.config/mpd/mpd.log"

state_file "C:/Users/fenhl/.config/mpd/mpd.state"
restore_paused "yes"

zeroconf_enabled "no"
default_permissions "read"
host_permissions "127.0.0.1 read,add,player,control,admin"
host_permissions "::1 read,add,player,control,admin"
password "censored@read,add,player,control"

audio_output {
    name "Windows"
    type "wasapi"
    device "PLG2888UH (NVIDIA High Definition Audio)"
}

Log

Mar 11 08:51 : mixer: Failed to read mixer for 'Windows': Unable to get service: AUDCLNT_E_DEVICE_INVALIDATED
Mar 11 08:51 : mixer: Failed to read mixer for 'Windows': Unable to get service: AUDCLNT_E_DEVICE_INVALIDATED
terminate called after throwing an instance of 'std::system_error'
  what():  Failed to start client: AUDCLNT_E_DEVICE_INVALIDATED
(gdb) bt
No stack.

Note: I double-checked to make sure the version I ran inside gdb was indeed the debug version from https://musicpd.org/download/win32/0.23.12/debug/. Is there something else I need to do in order to get a useful backtrace?

fenhl commented 1 year ago

This issue still exists in version 0.23.13.