DeaDBeeF-Player / deadbeef

DeaDBeeF Player
https://deadbeef.sourceforge.io/
Other
1.64k stars 178 forks source link

Playlist glitch after sort by random, then crash #2774

Closed ghost closed 2 years ago

ghost commented 2 years ago

Steps to reproduce the problem

1) Drag any song in playlist. 2) Click Edit > Sort by > Random. 3) Drag any song in playlist again (not necessary the same). Maybe you will have to do this few times, then playlist will glitch, some songs dissapear. 4) Click Edit > Sort by > Random. Deadbeef will crash.

What's going on? Describe the problem in as much detail as possible.

After moving and sorting songs playlist will eventually glitch, then if you sort again - crash. It makes no difference if you use GTK2 or GTK3. The problem is observed only when sorting by random. I can't reproduce it when selecting sort by Title, Album or any other but random.

Information about the software:

Deadbeef version: 1.8.8 OS: Arch Linux 5.15.32-xanmod1-tt-1, but the issue persist in fresh Ubuntu 21.10 install in virtual machine with default Deadbeef settings

deabeef.log

https://user-images.githubusercontent.com/29060641/161179724-8b870e56-18c6-4d45-b2fc-5dbf77e5e993.mp4

JakeSFR commented 2 years ago

Happens also with the latest static devel (2022-03-03). I can reproduce it every time, when, after the initial random sorting, I immediately drag the track that used to be on top of the unsorted playlist.

Oleksiy-Yakovenko commented 2 years ago

Does it still happen? I just tried on trunk, no errors, no glitches, and no crashes. ASAN is silent.

ghost commented 2 years ago

Issue still persist.

starting deadbeef devel
server_start
We had a crash. Will not resume the saved session to avoid a crash cycle.
searching for GUI plugins in /home/user/.local/lib64/deadbeef
searching for GUI plugins in /home/user/.local/lib/deadbeef
load_plugin_dir /home/user/.local/lib/deadbeef: scandir found 3 files
searching for GUI plugins in /usr/lib/deadbeef
load_plugin_dir /usr/lib/deadbeef: scandir found 59 files
found gui plugin ddb_gui_GTK2.so
added GTK2 gui plugin
found gui plugin ddb_gui_GTK3.so
added GTK3 gui plugin
load gui plugin
checking GUI plugin: GTK2
checking GUI plugin: GTK3
found selected GUI plugin: GTK3
loading plugin /usr/lib/deadbeef/ddb_gui_GTK3.so
loading plugins from /home/user/.local/lib64/deadbeef
loading plugins from /home/user/.local/lib/deadbeef
load_plugin_dir /home/user/.local/lib/deadbeef: scandir found 3 files
loading plugin /home/user/.local/lib/deadbeef/pulse2.so
loading plugins from /usr/lib/deadbeef
load_plugin_dir /usr/lib/deadbeef: scandir found 59 files
loading plugin /usr/lib/deadbeef/aac.so
loading plugin /usr/lib/deadbeef/adplug.so
loading plugin /usr/lib/deadbeef/alac.so
loading plugin /usr/lib/deadbeef/alsa.so
loading plugin /usr/lib/deadbeef/artwork.so
loading plugin /usr/lib/deadbeef/cdda.so
loading plugin /usr/lib/deadbeef/converter.so
loading plugin /usr/lib/deadbeef/converter_gtk2.so
loading plugin /usr/lib/deadbeef/converter_gtk3.so
loading plugin /usr/lib/deadbeef/dca.so
loading plugin /usr/lib/deadbeef/ddb_dumb.so
loading plugin /usr/lib/deadbeef/ddb_misc_headerbar_GTK3.so
loading plugin /usr/lib/deadbeef/ddb_misc_waveform_GTK3.so
loading plugin /usr/lib/deadbeef/ddb_mono2stereo.so
loading plugin /usr/lib/deadbeef/ddb_out_pw.so
loading plugin /usr/lib/deadbeef/ddb_shn.so
loading plugin /usr/lib/deadbeef/ddb_soundtouch.so
loading plugin /usr/lib/deadbeef/ddb_vis_musical_spectrum_GTK3.so
loading plugin /usr/lib/deadbeef/dsp_libsrc.so
loading plugin /usr/lib/deadbeef/ffap.so
loading plugin /usr/lib/deadbeef/ffmpeg.so
loading plugin /usr/lib/deadbeef/flac.so
loading plugin /usr/lib/deadbeef/gme.so
loading plugin /usr/lib/deadbeef/hotkeys.so
loading plugin /usr/lib/deadbeef/in_sc68.so
loading plugin /usr/lib/deadbeef/lastfm.so
loading plugin /usr/lib/deadbeef/m3u.so
loading plugin /usr/lib/deadbeef/mms.so
loading plugin /usr/lib/deadbeef/mp3.so
loading plugin /usr/lib/deadbeef/musepack.so
loading plugin /usr/lib/deadbeef/notify.so
loading plugin /usr/lib/deadbeef/nullout.so
loading plugin /usr/lib/deadbeef/opus.so
loading plugin /usr/lib/deadbeef/oss.so
loading plugin /usr/lib/deadbeef/pltbrowser_gtk2.so
loading plugin /usr/lib/deadbeef/pltbrowser_gtk3.so
loading plugin /usr/lib/deadbeef/psf.so
loading plugin /usr/lib/deadbeef/pulse.so
loading plugin /usr/lib/deadbeef/rg_scanner.so
loading plugin /usr/lib/deadbeef/shellexec.so
loading plugin /usr/lib/deadbeef/shellexecui_gtk2.so
loading plugin /usr/lib/deadbeef/shellexecui_gtk3.so
loading plugin /usr/lib/deadbeef/sid.so
loading plugin /usr/lib/deadbeef/sndfile.so
loading plugin /usr/lib/deadbeef/supereq.so
loading plugin /usr/lib/deadbeef/tta.so
loading plugin /usr/lib/deadbeef/vfs_curl.so
loading plugin /usr/lib/deadbeef/vfs_zip.so
loading plugin /usr/lib/deadbeef/vorbis.so
loading plugin /usr/lib/deadbeef/vtx.so
loading plugin /usr/lib/deadbeef/wavpack.so
loading plugin /usr/lib/deadbeef/wildmidi.so
loading plugin /usr/lib/deadbeef/wma.so
starting plugin GTK3 user interface
starting plugin PulseAudio output plugin version 2
starting plugin AAC player
starting plugin Adplug player
starting plugin ALAC player
starting plugin ALSA output plugin
starting plugin Album Artwork
starting plugin Audio CD player
starting plugin Converter
starting plugin Converter UI
starting plugin Converter UI
starting plugin dts decoder
starting plugin DUMB module player
starting plugin Headerbar for GTK3 UI
starting plugin Waveform Seekbar
starting plugin Mono to stereo
starting plugin PipeWire output plugin
starting plugin Shorten player
starting plugin Soundtouch
starting plugin Musical Spectrum
starting plugin Resampler (Secret Rabbit Code)
starting plugin Monkey's Audio (APE) decoder
starting plugin FLAC decoder
starting plugin Game-Music-Emu player
starting plugin Hotkey manager
starting plugin SC68 player (Atari ST SNDH YM2149)
starting plugin last.fm scrobbler
starting plugin M3U and PLS support
starting plugin mms vfs
starting plugin MP3 player
starting plugin MusePack decoder
starting plugin OSD Notify
starting plugin Null output plugin
starting plugin Opus player
starting plugin OSS output plugin
starting plugin Playlist Browser
starting plugin Playlist Browser
starting plugin PSF player using Audio Overload SDK
starting plugin PulseAudio output plugin
starting plugin ReplayGain Scanner
starting plugin Shell commands
starting plugin Shellexec UI
starting plugin Shellexec UI
starting plugin SID player
starting plugin WAV/PCM player
starting plugin SuperEQ
starting plugin tta decoder
starting plugin cURL vfs
starting plugin ZIP vfs
starting plugin Ogg Vorbis decoder
starting plugin VTX player
starting plugin WavPack decoder
starting plugin WildMidi player
starting plugin WMA player
starting plugin stdio vfs
starting plugin FFMPEG audio player
selected output plugin: PulseAudio output plugin version 2
INFO: from file /home/user/.config/deadbeef/playlists/0.dbpl
INFO: from file /home/user/.config/deadbeef/playlists/1.dbpl
INFO: from file /home/user/.config/deadbeef/playlists/2.dbpl
INFO: from file /home/user/.config/deadbeef/playlists/3.dbpl
INFO: from file /home/user/.config/deadbeef/playlists/4.dbpl
convgui: gtkui plugin not found
shellexecui: can't find gtkui plugin
gtkui plugin compiled for gtk version: 3.24.34

(deadbeef:887112): GLib-CRITICAL **: 00:38:18.924: Source ID 21 was not found when attempting to remove it

(deadbeef:887112): Gtk-WARNING **: 00:38:18.939: gtk_menu_attach_to_widget(): menu already attached to GtkMenuItem

(deadbeef:887112): Gtk-WARNING **: 00:38:18.939: gtk_menu_attach_to_widget(): menu already attached to GtkMenuItem

(deadbeef:887112): Gtk-WARNING **: 00:38:18.939: gtk_menu_attach_to_widget(): menu already attached to GtkMenuItem

(deadbeef:887112): Gtk-WARNING **: 00:38:18.939: gtk_menu_attach_to_widget(): menu already attached to GtkMenuItem

(deadbeef:887112): Gtk-WARNING **: 00:38:18.939: gtk_menu_attach_to_widget(): menu already attached to GtkMenuItem
Segmentation Fault
backtrace() returned 20 addresses
deadbeef(+0x54846) [0x562de64bd846]
/usr/lib/libc.so.6(+0x3e8e0) [0x7f85c1e3e8e0]
deadbeef(+0x610ba) [0x562de64ca0ba]
deadbeef(+0x60a8d) [0x562de64c9a8d]
/usr/lib/deadbeef/ddb_gui_GTK3.so(on_sort_by_random_activate+0x39) [0x7f85c207a1b9]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x170) [0x7f85c0d23fd0]
/usr/lib/libgobject-2.0.so.0(+0x40798) [0x7f85c0d50798]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x1125) [0x7f85c0d41be5]
/usr/lib/libgobject-2.0.so.0(g_signal_emit+0x94) [0x7f85c0d41e74]
/usr/lib/libappmenu-gtk3-parser.so.0(+0x72b6) [0x7f85bcdee2b6]
/usr/lib/libgdk-3.so.0(+0x2d6ae) [0x7f85c1d356ae]
/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x19b) [0x7f85c0c27c6b]
/usr/lib/libglib-2.0.so.0(+0xab001) [0x7f85c0c7e001]
/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x32) [0x7f85c0c25392]
/usr/lib/libgio-2.0.so.0(g_application_run+0x1de) [0x7f85c0e4119e]
/usr/lib/deadbeef/ddb_gui_GTK3.so(+0x9284f) [0x7f85c20a984f]
deadbeef(+0x559b8) [0x562de64be9b8]
/usr/lib/libc.so.6(+0x29290) [0x7f85c1e29290]
/usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f85c1e2934a]
deadbeef(+0x34105) [0x562de649d105]
> pacman -Q deadbeef
deadbeef-git r10987.5e1aa890b-1
JakeSFR commented 2 years ago

Yes, I also can confirm. Additionaly tried in Mint and the same happens.

The important thing is to, right after sorting, drag the previously 1st track, in order to produce the glitch, like this:

https://user-images.githubusercontent.com/6226504/174348745-d7f45407-c71b-4c94-b8c7-870b35ab4490.mp4

Btw, when I sort and then re-launch DB, the glitch doesn't happen; it has to be in the same session.

Oleksiy-Yakovenko commented 2 years ago

Reproduced