View Issue Details

IDCategoryLast Update
0008760bugs2021-06-24 15:23
ReporterwtayAssigned Tox42 
Reproducibilitysometimes 
Status resolvedResolutionfixed 
PlatformRedhatOSLinuxOS Version(any)
Product Version6.7 
Fixed in Version 
Summary0008760: Infinite loop in PortGroupList::gather
DescriptionIf one of the ports disappears when PortGroupList::gather() is busy, .get_port_by_name() might return NULL and the iterator is not incremented before continuing the loop, resulting in an infinite loop.

Possible patch:

diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc
index 30c4aa828f..fbe63e22d9 100644
--- a/gtk2_ardour/port_group.cc
+++ b/gtk2_ardour/port_group.cc
@@ -632,6 +632,7 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
                                PortEngine::PortHandle ph = AudioEngine::instance()->port_engine().get_port_by_name (p);
 
                                if (!ph) {
+ ++s;
                                        continue;
                                }


But it might be better to move the s++ in the for statement and remove the many `++s; continue;` patterns.
Steps To ReproduceNo reliable way to trigger this but having a lot of ports being added/removed will trigger it, like when starting/stopping pavucontrol or changing the card profile under PipeWire.
Additional Informationhttps://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1265
TagsNo tags attached.

Activities

x42

2021-06-24 15:23

administrator   ~0026003

Thanks! Fixed in 6.7-220-g68e3d3d672

Issue History

Date Modified Username Field Change
2021-06-24 13:19 wtay New Issue
2021-06-24 15:23 x42 Assigned To => x42
2021-06-24 15:23 x42 Status new => resolved
2021-06-24 15:23 x42 Resolution open => fixed
2021-06-24 15:23 x42 Note Added: 0026003