Dmidplayer 1.3.0 crashes if user tries to close the program while playing a...
Multiplatform MIDI File Player for Linux, Windows, and macOS
Brought to you by:
plcl
Many thanks for having resurrected KMid2...
Using a self-built release 1.3.0 (gcc 5.5.0), with drumstick 2.2.0, on x86_64.
If I close dmidplayer while it is playing a .mid file (by using the menu File-Quit or by clicking on the close button of its window), it crashes.
Journalctl shows this:
May 23 19:15:40 Rivendell systemd-coredump[16142]: Process 16048 (dmidiplayer) of user 500 dumped core.
Stack trace of thread 16083:
#0 0x00007fd33ffae65f raise (libc.so.6)
#1 0x00007fd328e5654b _ZN6KCrash19defaultCrashHandlerEi (libKF5Crash.so.5)
#2 0x00007fd33ffae6d0 __restore_rt (libc.so.6)3 0x000000000489e840 n/a (n/a)
Doing "coredumpctl debug", after a crash and with dmidplayer debug symbols installed, produces the attached output.
Hi,
Thank you very much for your feedback!
Unfortunately, the stack trace is not useful because the crash probably comes from Drumstick, Qt or another library, and the debug symbols for those libraries are not installed. Please can you install at least the drumstick debug symbols and try again?
I can't reproduce the crash here. It would be useful if you describe a bit your environment: Qt libraries / versions, audio environment, and which MIDI synth backend are you using and its configuration. Thanks!
Regards,
Pedro
Qt 5.11.2 (I needed to remove from guiplayer.ui the references to PlaceholderText to build dmiplayer, because this symbol is missing from that Qt5 release).
Pulseaudio 12.2
Alsa 1.1.5
Fluidsynth 2.1.5 with gs/gm soundfonts - configured in dmiplayer as below
Audio Driver: pulseaudio
Period Size: 3072
# of Periods: 1
Sample rate: 48000
Gain: 0.5
Polyphony: 32
Sound Font: /usr/share/soundfonts/FluidR3_GM.sf2
Sound Hardware snd_hda_intel, integrated in the Gigabyte X570 Gaming X motherboard.
Kernel 5.10.37.
I will do... if drumstick symbols are enough, it will be simple. If the one for all the other libraries are need, it will took a while more, but I will try anyway...
I will also try to see if I can reproduce the issue by building/installing dmidplayer on the alpha of the next release of my distro (ROSA Linux Fresh): this one has more recent releases of all the above packages
"Coredumpctl debug" output with debug symbols for drumstick and dmidplayer attached.
A little correction to the problem description: the crash happens only when clicking on the close button on the main window. "File - Quit" closes the program with no crash...
Looks like the crash comes from libQt5Core ...
I've seen similar crashes before, for instance:
https://bugreports.qt.io/browse/QTBUG-66003
Maybe you can also try the AppImage or the Flatpak from Flathub?
https://sourceforge.net/projects/dmidiplayer/files/v1.3.0/dmidiplayer-linux-1.3.0-x86_64.AppImage/download
https://flathub.org/apps/details/net.sourceforge.dmidiplayer
Both are built with recent Qt5 versions.
I made a build of dmidplayer on the alpha release of my distribution (it has Qt 5.15.2) and installed it, with its debug symbols: attached the resulting output of "coredumpctl debug".
Sorry, pushed the wrong button...
I thinks is very similar: running dmidplayer in a konsole shows the "QThread: Destroyed while thread is still running" message...
Please try the AppImage or the Flatpak.
Also, this is probably solved in Drumstick HEAD, that will become v2.2.1
Another test you could try is using the Sonivox backend.
Last edit: Pedro Lopez-Cabanillas 2021-05-25
Ah, you are talking about the "close" (X) button on the main window header! The "Quit" button on the toolbar and the File->Quit actions share the same code, and they stop the playback correctly. On the other hand, the main window header close button does not stop the playback before quitting, and produces the error you are describing.
Fixed now: https://sourceforge.net/p/dmidiplayer/code/ci/1bdc34f64d7393073bdb27a8d74f3fb70ddbc4b8/tree/guiplayer.cpp?diff=48411cd9e963da19fe9fb4e49729a579f4fe9afa
commit [1bdc34]
Related
Commit: [1bdc34]
Last edit: Pedro Lopez-Cabanillas 2021-05-26
I can confirm that the proposed commit fixes the issue...