Menu

#4 Dmidplayer 1.3.0 crashes if user tries to close the program while playing a MIDI file

1.3.x
closed
bug (4)
2021-05-31
2021-05-23
No

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.

1 Attachments

Discussion

  • Pedro Lopez-Cabanillas

    • labels: --> bug
    • assigned_to: Pedro Lopez-Cabanillas
     
  • Pedro Lopez-Cabanillas

    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

     
    • Giovanni Mariani

      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.

      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.

      Please can you install at least the drumstick debug symbols and try again?

      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

       
  • Giovanni Mariani

    "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...

     
    • Pedro Lopez-Cabanillas

      Looks like the crash comes from libQt5Core ...

      Stack trace of thread 19030:
          #0  0x00007f795c35db3d __nanosleep (libc.so.6)
          #1  0x00007f795c35da8a sleep (libc.so.6)
          #2  0x00007f79452a588a n/a (libKF5Crash.so.5)
          #3  0x00007f79452a5f79 n/a (libKF5Crash.so.5)
          #4  0x00007f79452a63f2 _ZN6KCrash19defaultCrashHandlerEi (libKF5Crash.so.5)
          #5  0x00007f795c2c96d0 __restore_rt (libc.so.6)
          #6  0x00007f795c2c965f raise (libc.so.6)
          #7  0x00007f795c2cb21a abort (libc.so.6)
          #8  0x00007f795d18fe06 _ZNK14QMessageLogger5fatalEPKcz (libQt5Core.so.5)
          #9  0x00007f795d1aad1c _ZN7QThreadD2Ev (libQt5Core.so.5)
          #10 0x000000000042d412 _ZN9GUIPlayerD2Ev (dmidiplayer)
          #11 0x00000000004187c8 main (dmidiplayer)
          #12 0x00007f795c2b5271 __libc_start_main (libc.so.6)
          #13 0x000000000041901a _start (dmidiplayer)
      

      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.

       
      • Giovanni Mariani

        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".

         
        • Giovanni Mariani

          Sorry, pushed the wrong button...

          I've seen similar crashes before, for instance: https://bugreports.qt.io/browse/QTBUG-66003

          I thinks is very similar: running dmidplayer in a konsole shows the "QThread: Destroyed while thread is still running" message...

           
          • Pedro Lopez-Cabanillas

            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
    • Pedro Lopez-Cabanillas

      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...

      running dmidplayer in a konsole shows the "QThread: Destroyed while thread is still running" message...

      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
      • Giovanni Mariani

        I can confirm that the proposed commit fixes the issue...

         
  • Pedro Lopez-Cabanillas

    • status: open --> pending
     
  • Pedro Lopez-Cabanillas

    • Milestone: 1.0 --> 1.3.x
     
  • Pedro Lopez-Cabanillas

    • Status: pending --> closed
     

Log in to post a comment.