Fix various issues when the engine disconnects:
authorRobin Gareus <robin@gareus.org>
Mon, 26 Nov 2018 01:39:55 +0000 (02:39 +0100)
committerRobin Gareus <robin@gareus.org>
Mon, 26 Nov 2018 01:39:55 +0000 (02:39 +0100)
Previously Port::PortDrop was never handled.
The signal was disconnected directly when the connection
is re-used by Port::PortSignalDrop.

Ports::drop() was not called when the engine was stopped
or disconnected, and port-handles were not invalidated.

This lead to crashes whenever a port-related operation was performed
while the engine was stopped. e.g. adding/removing tracks or plugins
(latency recompute, notify port-engine) and various other operations.

libs/ardour/ardour/port.h

index 9ab850c86baf7c0520cbbefba7517998b66cca1c..d053c6aee0812df8129edcbfcf0fe5c9dacca3df 100644 (file)
@@ -183,7 +183,7 @@ private:
        void port_connected_or_disconnected (boost::weak_ptr<Port>, boost::weak_ptr<Port>, bool);
        void signal_drop ();
        void drop ();
-       PBD::ScopedConnection drop_connection;
+       PBD::ScopedConnectionList drop_connection;
        PBD::ScopedConnection engine_connection;
 };