summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2013-08-02 23:02:13 +0200
committerRobin Gareus <robin@gareus.org>2013-08-03 00:51:07 +0200
commit23eba1cc392aa5b583ddb4229a227557a88ef1cd (patch)
tree48a722925856840c9d6c23a0345994f1452468c7 /gtk2_ardour/port_matrix.cc
parent94f366190e044462bd907de2d96f0d34b275b080 (diff)
disallow invalid port-removal
do not allow port-removal if the port would be re-added immediately after that again because the main-delivery actually needs it. As a side effect this prevents this crash: * create a stereo-track, then remove one output -> unhandled exception "AudioEngine::PortRegistrationFailure&" The problem: - the port is removed from the RCU ports list, but Port::drop() (which calls jack_port_unregister) is only called from the Port's destructor at some later time. (because a reference to the port still exists elsewhere) - the jack-port is not yet removed. - meanwhile Delivery::configure_io comes along and notices that there are more audio-buffers than ports and tries to re-register the port. - but the port still exists in jack, so it fails and throws an exception ...which is not handled.
Diffstat (limited to 'gtk2_ardour/port_matrix.cc')
-rw-r--r--gtk2_ardour/port_matrix.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index 0df5d2214d..60f86ae888 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -733,7 +733,7 @@ PortMatrix::remove_channel (ARDOUR::BundleChannel b)
int const r = io->remove_port (p, this);
if (r == -1) {
ArdourDialog d (_("Port removal not allowed"));
- Label l (_("This port cannot be removed, as the first plugin in the track or buss cannot accept the new number of inputs."));
+ Label l (_("This port cannot be removed.\nEither the first plugin in the track or buss cannot accept\nthe new number of inputs or the last plugin has more outputs."));
d.get_vbox()->pack_start (l);
d.add_button (Stock::OK, RESPONSE_ACCEPT);
d.set_modal (true);