Discussion:
Bug#1091859: rosegarden: crashes after closing the "Mange MIDI Devices" window
Add Reply
Jeronimo Pellegrini
2025-01-01 17:40:01 UTC
Reply
Permalink
Package: rosegarden
Version: 1:24.12-1
Severity: normal

Hello.

This happens consistently for me after upgrading rosegarden from
1:24.06-1 to 1:24.12-1 in sid:

0. rm -rf ~.config/rosegardenmusic/ to make sure no particular config
by me has to do with the problem

1. Make sure jack is running (I open qjackctl and see that it's
running)

2. Start yoshimi, zynaddsubfx or fluidsynth (I was using fluidsynth
with the previous version of rosegarden and it all worked fine)

3. Open Rosegarden

4. Open the "Manage MIDI Devices" option (the button with a keyboard
icon with a green shadow in the second row of the top menu)

5. Check that the synthesizer that was started is actually listed as
an option (it does, for all of them)

6. Chose the synthesizer, or "no port" (doesn't seem to make a
difference)

7. Close the "Manage MIDI Devices" window

Then Rosegarden crashes. The last messages from Rosegarden on standard
output are:

LADSPAPluginFactory::loadLibrary(): /usr/lib/ladspa/zm1_1428.so
/usr/lib/ladspa/zm1_1428.so plugin loaded successfully
[PluginFactory] enumerateAllPlugins() end.
Jack: JackClient::PortRegister ref = 4 name = rosegarden:record in 1 L type = 32 bit float mono audio port_index = 11
Jack: JackClient::PortRegister ref = 4 name = rosegarden:record in 1 R type = 32 bit float mono audio port_index = 12
Jack: JackClient::PortRegister ref = 4 name = rosegarden:record in 2 L type = 32 bit float mono audio port_index = 13
Jack: JackClient::PortRegister ref = 4 name = rosegarden:record in 2 R type = 32 bit float mono audio port_index = 14
Jack: JackClient::ClientNotify ref = 4 name = rosegarden notify = 18
Jack: JackClient::ClientNotify ref = 4 name = rosegarden notify = 18
do_connect: could not connect to socket
connect: No such file or directory
WARNING: Rosegarden::Exception: "Failed to connect to LIRC"
WARNING: Rosegarden::Exception: "Failed to open tranzport device /dev/tranzport0"
[main] sfxload disabled
[main] Launching the sequencer...
[main] Starting the app...
[SequenceManager] WARNING: No accurate sequencer timer available.
[RosegardenMainWindow] slotDisplayWarning(): MAIN WINDOW DISPLAY WARNING: type 2 text "<h3>System timer resolution is too low!</h3>"
[WarningWidget] WarningWidget::queueMessage( "<h3>System timer resolution is too low!</h3>" , "<p>Rosegarden was unable to find a high-resolution timing source for MIDI performance.</
p><p>You may be able to solve this problem by loading the RTC timer kernel module. To do this, try running <b>sudo modprobe snd-rtctimer</b> in a terminal window and then restarting R
osegarden.</p><p>Alternatively, check whether your Linux distributor provides a multimedia-optimized kernel. See the <a style=\"color:gold\" href=\"http://www.rosegardenmusic.com/wik
i/low-latency_kernels\">Rosegarden website</a> for notes about this.</p>" )
[StartupTester] StartupTester::StartupTester(): URL: "http://www.rosegardenmusic.com/latest-version.txt"
Segmentation fault


Versions of packages that could be relevant, but not listed
automatically by reportbug (although I'd think it's not really like
the case, as it's a segmentation fault in Rosegarden):

ii jackd2 1.9.22~dfsg-4 amd64 JACK Audio Connection Kit (server and example clients)
ii yoshimi 2.3.3.2-1 amd64 software synthesizer originally based on ZynAddSubFX2
ii zynaddsubfx 3.0.6-6+b1 amd64 Realtime software synthesizer for Linux

I tried downgrading:

1. sudo apt install rosegarden=1:24.06-1
2. Erased ~/.config/rosegardenmusic/

And the problem is gone (so it seems indeed to be a bug in Rosegarden
1:24.12-1).

J.


-- System Information:
Debian Release: trixie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.12.6-rt-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages rosegarden depends on:
ii flac 1.4.3+ds-4
ii libasound2t64 1.2.12-1+b1
ii libc6 2.40-4
ii libfftw3-single3 3.3.10-2+b1
ii libgcc-s1 14.2.0-12
ii libjack-jackd2-0 [libjack-0.125] 1.9.22~dfsg-4
ii liblirc-client0t64 0.10.2-0.10
ii liblo7 0.32-2
ii liblrdf0 0.6.1-4+b2
ii libqt6core5compat6 6.7.2-3
ii libqt6core6t64 6.7.2+dfsg-5
ii libqt6gui6 6.7.2+dfsg-5
ii libqt6network6 6.7.2+dfsg-5
ii libqt6widgets6 6.7.2+dfsg-5
ii libsamplerate0 0.2.2-4+b2
ii libsndfile1 1.2.2-2
ii libstdc++6 14.2.0-12
ii libxml-twig-perl 1:3.52-3
ii sndfile-programs 1.2.2-2
ii zlib1g 1:1.3.dfsg+really1.3.1-1+b1

Versions of packages rosegarden recommends:
ii caps [ladspa-plugin] 0.9.26-1
ii chromium [www-browser] 131.0.6778.204-1
ii cups-bsd [lpr] 2.4.10-2+b1
ii firefox [www-browser] 133.0.3-1
ii ghostscript 10.04.0~dfsg-2+b1
ii jackd 5+nmu1
ii lilypond 2.24.4-2
ii links [www-browser] 2.29-2
ii lynx [www-browser] 2.9.2-1
ii mupdf [pdf-viewer] 1.24.10+ds1-1
ii okular [pdf-viewer] 4:24.12.0-1
ii swh-plugins [ladspa-plugin] 0.4.17-3
ii tap-plugins [ladspa-plugin] 1.0.0-2
ii w3m [www-browser] 0.5.3+git20230121-2+b3
ii wavpack 5.7.0-1+b1
ii zathura-pdf-poppler [pdf-viewer] 0.3.3-1

Versions of packages rosegarden suggests:
pn awesfx <none>
ii qjackctl 1.0.3-1

-- no debconf information
Ted Felix
2025-01-07 18:00:02 UTC
Reply
Permalink
Post by Jeronimo Pellegrini
7. Close the "Manage MIDI Devices" window
Then Rosegarden crashes.
Upstream here...

We made extensive changes to the "Manage MIDI Devices" window this cycle.

https://sourceforge.net/p/rosegarden/bugs/1692/

However, we're not currently seeing a crash like this.

Would you be able to do a debug build and run gdb to help us track this
down? Historically a crash like this tends to be due to another library
that is being pulled in. A backtrace from gdb would help to determine
if this is the case.

Ted.
Jeronimo Pellegrini
2025-01-13 19:20:01 UTC
Reply
Permalink
Hello!
Post by Ted Felix
Upstream here...
We made extensive changes to the "Manage MIDI Devices" window this cycle.
https://sourceforge.net/p/rosegarden/bugs/1692/
However, we're not currently seeing a crash like this.
Would you be able to do a debug build and run gdb to help us track this
down? Historically a crash like this tends to be due to another
library that is being pulled in. A backtrace from gdb would help to
determine if this is the case.
Hm, I compiled a debug build from a git snapshot, and the bug was not
there. I don't know how I would compile a debug build of the Debian
package, though.

I'll try again, this time with the release tarball instead of a git
snapshot.

J.
Jeronimo Pellegrini
2025-01-14 11:20:01 UTC
Reply
Permalink
Post by Ted Felix
Post by Jeronimo Pellegrini
7. Close the "Manage MIDI Devices" window
Then Rosegarden crashes.
Upstream here...
We made extensive changes to the "Manage MIDI Devices" window this cycle.
https://sourceforge.net/p/rosegarden/bugs/1692/
However, we're not currently seeing a crash like this.
Would you be able to do a debug build and run gdb to help us track this
down? Historically a crash like this tends to be due to another
library that is being pulled in. A backtrace from gdb would help to
determine if this is the case.
OK, I installed the Debian package with debug symbols and got the
following backtrace (this segfault does not happen with the development
snapshot compiled from git, and also doesn't happen if I install
Rosegarden from the release tarball instead of the Debian package).

J.


#0 0x00007ffff60acfe4 in
std::_Rb_tree_increment(std::_Rb_tree_node_base const*) () at
/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x0000555555a2d554 in
std::_Rb_tree_const_iterator<Rosegarden::Device*>::operator++
(this=<synthetic pointer>) at /usr/include/c++/14/bits/stl_tree.h:362
#2 Rosegarden::DeviceManagerDialog::slotCloseButtonPress
(this=0x555556f7f020) at ./src/gui/studio/DeviceManagerDialog.cpp:150
#3 0x00007ffff6a1caef in ??? () at
/lib/x86_64-linux-gnu/libQt6Core.so.6
#4 0x00007ffff7ab7da6 in QAbstractButton::clicked(bool) () at
/lib/x86_64-linux-gnu/libQt6Widgets.so.6
#5 0x00007ffff7aaf73e in ??? () at
/lib/x86_64-linux-gnu/libQt6Widgets.so.6
#6 0x00007ffff7aafa1d in ??? () at
/lib/x86_64-linux-gnu/libQt6Widgets.so.6
#7 0x00007ffff7abbf59 in
QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at
/lib/x86_64-linux-gnu/libQt6Widgets.so.6
#8 0x00007ffff79f4e93 in QWidget::event(QEvent*) () at
/lib/x86_64-linux-gnu/libQt6Widgets.so.6
#9 0x00007ffff79a80a2 in QApplicationPrivate::notify_helper(QObject*,
QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#10 0x00007ffff79acc10 in QApplication::notify(QObject*, QEvent*) () at
/lib/x86_64-linux-gnu/libQt6Widgets.so.6
#11 0x00005555559601f1 in Rosegarden::RosegardenApplication::notify
(this=<optimized out>, receiver=<optimized out>, event=<optimized out>)
at ./src/gui/application/RosegardenApplication.cpp:63
#12 0x00007ffff69ce928 in QCoreApplication::notifyInternal2(QObject*,
QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#13 0x00007ffff79a14be in QApplicationPrivate::sendMouseEvent(QWidget*,
QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool,
bool) ()
at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#14 0x00007ffff7a08488 in ??? () at
/lib/x86_64-linux-gnu/libQt6Widgets.so.6
#15 0x00007ffff7a0b838 in ??? () at
/lib/x86_64-linux-gnu/libQt6Widgets.so.6
#16 0x00007ffff79a80a2 in QApplicationPrivate::notify_helper(QObject*,
QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#17 0x00005555559601f1 in Rosegarden::RosegardenApplication::notify
(this=<optimized out>, receiver=<optimized out>, event=<optimized out>)
at ./src/gui/application/RosegardenApplication.cpp:63
#18 0x00007ffff69ce928 in QCoreApplication::notifyInternal2(QObject*,
QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#19 0x00007ffff71f735b in
QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*)
() at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#20 0x00007ffff7250a1c in
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#21 0x00007ffff0b3b72e in ??? () at
/lib/x86_64-linux-gnu/libQt6XcbQpa.so.6
#22 0x00007ffff5a3781f in ??? () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007ffff5a39a57 in ??? () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff5a3a1c0 in g_main_context_iteration () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007ffff6bd3473 in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() at /lib/x86_64-linux-gnu/libQt6Core.so.6
#26 0x00007ffff69d9adb in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/lib/x86_64-linux-gnu/libQt6Core.so.6
#27 0x00007ffff69d1908 in QCoreApplication::exec() () at
/lib/x86_64-linux-gnu/libQt6Core.so.6
#28 0x00005555556cee89 in main (argc=<optimized out>, argv=<optimized
out>) at ./src/gui/application/main.cpp:823
Ted Felix
2025-01-20 21:50:01 UTC
Reply
Permalink
Thanks for the backtrace. It appears as if we are using an
invalidated iterator in this case. It's the kind of thing that will
cause serious problems randomly and without warning. I will have a
closer look and consider releasing a 24.12.1.
Ted Felix
2025-01-20 22:40:01 UTC
Reply
Permalink
I've thrown together a new 24.12.1-stable branch:

https://sourceforge.net/p/rosegarden/git/ci/24.12.1-stable/tree/

I've fixed the invalidated iterator bug. Please grab a snapshot from
there and put it through its paces. It's the best we can do for now.
Until it goes through the Debian process and we get a new binary, we
won't really know for sure.

I'll see if I can find additional reviewers and testers upstream.

Let me know how it goes and I'll do a 24.12.1 release.

Loading...