ControlBoxes are created/destroyed regularly (plugin re-order,
track selection -> Editor Mixer,...).
Properly disconnect the timer signal in the dtor and skip updateing the
tooltip unnecessarily (duplicate calls, Changed & Timer).
This should really be undone, the timer needs to be removed and Changed() used throughout.
This is not a real fix; just a stop-gap for the worst offender.
iostream on OSX is not thread safe.
Sadly no crash report so far managed to catch the 2nd thread in action.
looks like the GUI thread is preempted, 2nd thread succeeds, and the
crash occurs later).
see also https://discussions.apple.com/thread/3479591
crash in
s << c->internal_to_user (c->get_value ());
ardour-4.1.335(5000,0x7fff777f5300) malloc: *** error for object 0x7fe2f3e06170: pointer being freed was not allocated
1 libsystem_c.dylib abort + 129
2 libsystem_malloc.dylib free + 428
3 libsystem_c.dylib __numeric_load_locale + 544
4 libsystem_c.dylib loadlocale + 216
5 libstdc++.6.dylib std::__convert_from_v(int* const&, char*, int, char const*, ...) + 193
6 libstdc++.6.dylib std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_float<double>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, char, double) const + 193
7 libstdc++.6.dylib std::ostream& std::ostream::_M_insert<double>(double) + 221
8 ardour-4.1.335 ProcessorEntry::Control::set_tooltip() + 854 (processor_box.cc:578)
9 ardour-4.1.335 ProcessorEntry::Control::control_changed() + 446 (processor_box.cc:637)
10 ibpbd.dylib PBD::StandardTimer::on_elapsed()
when copying a plugin the state is transferred by serializing
XML and setting state from XML. This state includes the unique ID.
This ID needs to be identical at first in order to load
the state from <session-dir>/plugins/<ID>/*
fixes crashes:
* If the Editor-Mixer shows a channel with a plugin that
has been edited in the Mixer, double-clicking the plugin
will try to bring up a 2nd instance of the plugin-UI.
* When closing Ardour both the Mixer and the Editor-Mixer try to delete the underlying plugin, resulting in a double free.
Prepare to allow BarController (with Spinbutton) to translate
internal/interface values for the SpinBox.
(The change is irrelevant for the fader/slider itself which
always use the [user-]interface value)
Diameter is calculated depending on font-scaling.
Besides, all explicit calls simply set the default
value, anyway. If some API is needed in the future,
it should set the diameter in [em].