diff options
author | Robin Gareus <robin@gareus.org> | 2017-04-17 23:50:11 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-04-17 23:50:11 +0200 |
commit | 8e5a972a24b49848ee39402676d895f72044b2a9 (patch) | |
tree | 1f1f69a4dc0596e1d6ad7b720e9409a2ba50062a /libs/surfaces/faderport8 | |
parent | d6b36a13a127d9b152cfe12d596ea862773f9923 (diff) |
Managed to trigger an assert()
Create new Mixbus session, initially incrementally adding Busses to
the session triggers a series of "assign_stripables()"
Diffstat (limited to 'libs/surfaces/faderport8')
-rw-r--r-- | libs/surfaces/faderport8/faderport8.cc | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/libs/surfaces/faderport8/faderport8.cc b/libs/surfaces/faderport8/faderport8.cc index da9a201b9b..2dd57eac16 100644 --- a/libs/surfaces/faderport8/faderport8.cc +++ b/libs/surfaces/faderport8/faderport8.cc @@ -265,11 +265,11 @@ FaderPort8::set_active (bool yn) void FaderPort8::close () { - _assigned_strips.clear (); stop_midi_handling (); session_connections.drop_connections (); automation_state_connections.drop_connections (); assigned_stripable_connections.drop_connections (); + _assigned_strips.clear (); drop_ctrl_connections (); port_connection.disconnect (); selection_connection.disconnect (); @@ -1299,6 +1299,8 @@ FaderPort8::assign_sends () _ctrls.strip(7).set_solo_controllable (s->master_send_enable_controllable ()); #endif /* set select buttons */ + assigned_stripable_connections.drop_connections (); + _assigned_strips.clear (); assign_stripables (true); } @@ -1317,8 +1319,8 @@ FaderPort8::assign_strips (bool reset_bank) _channel_off = 0; } - _assigned_strips.clear (); assigned_stripable_connections.drop_connections (); + _assigned_strips.clear (); FaderMode fadermode = _ctrls.fader_mode (); switch (fadermode) { @@ -1441,7 +1443,19 @@ FaderPort8::notify_stripable_property_changed (boost::weak_ptr<Stripable> ws, co assert (0); // this should not happen return; } - assert (_assigned_strips.find (s) != _assigned_strips.end()); + if (_assigned_strips.find (s) == _assigned_strips.end()) { + /* it can happen that signal emission is delayed. + * A signal may already be in the queue but the + * _assigned_strips has meanwhile changed. + * + * before _assigned_strips changes, the connections are dropped + * but that does not seem to invalidate pending requests :( + * + * Seen when creating a new MB session and Mixbusses are added + * incrementally. + */ + return; + } uint8_t id = _assigned_strips[s]; if (what_changed.contains (Properties::color)) { |