MusicPlayerDaemon / ncmpc

curses client for MPD
GNU General Public License v2.0
114 stars 22 forks source link

ncmpc-0.31 segfaults when pressing `l` on empty playlist #38

Closed vesath closed 6 years ago

vesath commented 6 years ago

The new release ncmpc-0.31 segfaults when pressing l (view the selected and the currently playing song) on an empty playlist; its last words are:

ncmpc: ../src/Queue.cxx:69: MpdQueue::size_type MpdQueue::FindByReference(const mpd_song&) const: Assertion `i < size()' failed.

Here is the backtrace:

#0  0x00007ffff7e1bd7f in raise () from /usr/lib/libc.so.6
#1  0x00007ffff7e06672 in abort () from /usr/lib/libc.so.6
#2  0x00007ffff7e06548 in __assert_fail_base.cold.0 () from /usr/lib/libc.so.6
#3  0x00007ffff7e14396 in __assert_fail () from /usr/lib/libc.so.6
#4  0x000055555557945d in QueuePage::OnCommand(mpdclient&, Command) ()
#5  0x000055555557ebf1 in ScreenManager::OnCommand(mpdclient&, Command) ()
#6  0x000055555557f45d in keyboard_event(_GIOChannel*, GIOCondition, void*) ()
#7  0x00007ffff7d2d271 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#8  0x00007ffff7d2ef89 in ?? () from /usr/lib/libglib-2.0.so.0
#9  0x00007ffff7d2ff62 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#10 0x000055555556004f in main ()

The previous ncmpc-0.30 did not have this issue. Cheers.

vesath commented 6 years ago

The segfault actually occurs when there is no currently playing song, not just when the playlist is empty.