19c44fe814b8449ea9d19120a09699b17eb112b3
When a session is loaded, click_io->set_state is called twice. setup_click() is called when the engine re/starts, and possibly again from Session::set_state. During session construction, Port connections are not directly made. Port::set_state just creates a list, which is later applied by Port::reconnect from Session::hookup_io. However, the second call to IO::set_state() calls IO::ensure_ports again. Since the port already exists, this calls Port::disconnect_all (while holding the process lock). Even though the port is not connected at this point in time, this triggers a ARDOUR::PortManager::connect_callback which is emitted from the Audioengine when the process-lock is released. While IO::set_state() continues to set Port::state, and fill the Port::_[ext_]connections lists, this data is invalidated moments later when the engine resumes and ::connect_callback calls ARDOUR::Port::port_connected_or_disconnected. The solution is to simply not call Port::disconnect_all if the connection is not yet made (Session::InitialConnecting)
Please see the Ardour web site at https://ardour.org/ for all documentation..
For information on building ardour:
https://ardour.org/development.html
Description
Languages
C++
56.5%
C
39.6%
JavaScript
1.3%
Lua
0.9%
Python
0.6%
Other
0.9%