13
0

Fix crash when exporting multiple timespans with MIDI tracks

::start_audio_export() may be called from a background thread
which does not yet have a thread-local TempoMap.

Track::seek() calls ARDOUR::AudioPlaylist::read()
which calls Playlist::regions_touched_locked() which may require
a TempoMap to calculate overage with Temporal::Beats
This commit is contained in:
Robin Gareus 2022-04-01 21:41:30 +02:00
parent e15fb0dc38
commit b411eeb74e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -165,7 +165,13 @@ Session::start_audio_export (samplepos_t position, bool realtime, bool region_ex
Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
_butler->wait_until_finished ();
/* get everyone to the right position */
/* This method may be called from a thread start_timespan_bg(),
* or from the GUI thread. We need to set/update the tempo-map
* thread-local variable before calling Track::seek
*/
Temporal::TempoMap::update_thread_tempo_map ();
/* get everyone to the right position */
boost::shared_ptr<RouteList> rl = routes.reader();