MPD
MPD copied to clipboard
Missing `{` in format string obscures error message
Bug report
Describe the bug
Missing { in format string obscures error message: https://github.com/MusicPlayerDaemon/MPD/blob/daaea3f2b6eb75eaaad5ae032284dd95f0c2516d/src/db/Configured.cxx#L26C1-L27C36
Expected Behavior
Get the useful error message.
Actual Behavior
terminate called after throwing an instance of 'fmt::v11::format_error'
what(): unmatched '}' in format string
Version
Music Player Daemon 0.24.4 (v0.24.4) from Arch Linux repositories
Configuration
music_directory "/var/lib/mpd/music"
pid_file "/run/mpd/mpd.pid"
db_file "/var/lib/mpd/mpd.db"
state_file "/var/lib/mpd/mpdstate"
playlist_directory "/var/lib/mpd/playlists"
database {
plugin "simple"
path "/var/lib/mpd/mpd.db"
cache_directory "/var/lib/mpd/cache"
}
Log
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x00007ffff16a7813 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
#2 0x00007ffff164ddc0 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007ffff163557a in __GI_abort () at abort.c:73
#4 0x00007ffff1897bf8 in __gnu_cxx::__verbose_terminate_handler () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/vterminate.cc:95
#5 0x00007ffff18b1c1a in __cxxabiv1::__terminate (handler=<optimized out>) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:48
#6 0x00007ffff1897447 in __cxa_call_terminate (ue_header_in=0x555555864fa0) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_call.cc:56
#7 0x00007ffff18b13fc in __cxxabiv1::__gxx_personality_v0 (version=<optimized out>, actions=6, exception_class=5138137972254386944, ue_header=0x555555864fa0, context=0x7fffffffa6f0)
at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_personality.cc:692
#8 0x00007ffff1afaa0b in _Unwind_RaiseException_Phase2 (exc=exc@entry=0x555555864fa0, context=context@entry=0x7fffffffa6f0, frames_p=frames_p@entry=0x7fffffffa7e0)
at /usr/src/debug/gcc/gcc/libgcc/unwind.inc:64
#9 0x00007ffff1afb14e in _Unwind_RaiseException (exc=0x555555864fa0) at /usr/src/debug/gcc/gcc/libgcc/unwind.inc:136
#10 0x00007ffff18b1ec7 in __cxxabiv1::__cxa_throw (obj=<optimized out>, tinfo=0x7ffff7f1ea90 <typeinfo for fmt::v11::format_error>, dest=0x7ffff7f03610 <fmt::v11::format_error::~format_error()>)
at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_throw.cc:93
#11 0x00007ffff7f02260 in fmt::v11::report_error (message=message@entry=0x7ffff7f1a420 "unmatched '}' in format string") at /usr/src/debug/fmt/fmt/include/fmt/format-inl.h:139
#12 0x00007ffff7f11ec3 in fmt::v11::detail::format_handler<char>::on_error (this=0x7fffffffac70, message=0x7ffff7f1a420 "unmatched '}' in format string") at /usr/src/debug/fmt/fmt/include/fmt/format.h:3632
#13 fmt::v11::detail::parse_format_string<char, fmt::v11::detail::format_handler<char> > (fmt=..., handler=...) at /usr/src/debug/fmt/fmt/include/fmt/base.h:1641
#14 0x00007ffff7f12117 in fmt::v11::detail::vformat_to (buf=..., fmt=..., args=..., loc=..., loc@entry=...) at /usr/src/debug/fmt/fmt/include/fmt/format-inl.h:1457
#15 0x00005555555a2326 in fmt::v11::vformat_to_n<char*, , 0>(char*, unsigned long, fmt::v11::basic_string_view<char>, fmt::v11::basic_format_args<fmt::v11::context>)
(out=<optimized out>, n=<optimized out>, fmt=..., args=...) at /usr/include/fmt/base.h:2872
#16 0x000055555557a05e in VFmtToBuffer<512ul> (buffer=..., format_str=..., args=...) at ../mpd/src/lib/fmt/ToBuffer.hxx:15
#17 VFmtBuffer<512ul> (format_str=..., args=...) at ../mpd/src/lib/fmt/ToBuffer.hxx:27
#18 0x000055555557a987 in VFmtRuntimeError (format_str=..., args=...) at ../mpd/src/lib/fmt/RuntimeError.cxx:10
#19 0x0000555555581822 in FmtRuntimeError<char [21], int&, int const&>(char const (&) [21], int&, int const&) [clone .isra.0] (format_str=...) at ../mpd/src/lib/fmt/RuntimeError.hxx:20
#20 0x0000555555595fef in CreateConfiguredDatabase (config=<optimized out>, main_event_loop=..., io_event_loop=..., listener=...) at ../mpd/src/db/Configured.cxx:26
#21 0x00005555555a5787 in glue_db_init_and_load (instance=..., config=...) at ../mpd/src/event/Thread.hxx:28
#22 0x00005555555a815a in InitDatabaseAndStorage (instance=..., config=...) at ../mpd/src/Main.cxx:224
#23 MainConfigured (options=..., raw_config=...) at ../mpd/src/Main.cxx:383
#24 0x00005555555a9fd5 in MainOrThrow (argc=<optimized out>, argv=0x7fffffffda08) at ../mpd/src/Main.cxx:681
#25 0x000055555559fea1 in mpd_main (argc=<optimized out>, argv=<optimized out>) at ../mpd/src/Main.cxx:687
--Type <RET> for more, q to quit, c to continue without paging--c
#26 main (argc=<optimized out>, argv=<optimized out>) at ../mpd/src/Main.cxx:699