Ardour::cleanup destroys the TransportMasterManager instance
which unregisters TransportMaster ports. This will crash
if the engine was already destroyed.
See also 7c7bf6c88b
(insert-section still remains hidden, it inserts the length
of the selection at the edit-point, it should perhaps insert
at the start of the selection instead)
This fixes several callsites that were passing samplepos_t to get a TempoMetric,
some of them somewhat significant (e.g. VST plugins that want tempo information).
Bad API design on my part, apologies.
This commit combines libs/ and gtk2_ardour because the new private status
of the ::metric_at() call would be a blocking point for git bisect
* Use an atomic reference count since the freeze-thread
can call use_playlist.
* Remove explicit argument to construct unused playlist
because playlists are unused by default. This also
lead to use-count becoming negative (or rather UINT32_MAX)
Make click & drag in the left-hand half of a region with the Timestretch
tool stretch the region on its left, leaving the end position of the new
time-stretched region in the same place as the end of the original.
Fix "warning: this statement may fall through [-Wimplicit-fallthrough=]",
caused by the misspelling of "fallthrough" as "fallthough" in
editor_ops.cc.
Note that if you use ccache, you'll need to clear its cache to actually
get rid of the warning, because the pre-processed file (with comments
removed) is identical before & after this change, and thus won't get
recompiled otherwise.
Fix the equivalent typos in marker.cc too, though in those cases there's
no actual warning, because presently all the fall-throughs are from empty
cases.
This fixes a random crash with stop-and-forget capture.
When aborting capture, the disk-writer can emit
midi_write_source->drop_references ()
in the butler thread, which leads to a direct call to
Session::remove_source.
This can happen before or after Region::source_deleted
is called which is initiated from the same signal.
Furthermore it was possible that Region::source deleted
was called concurrently from the UI thread via SourceRemoved
for whole file regions, which lead to memory corruption.
TransportMasterManager::destroy () destroys any remaining
TransportMasters which in turn unregister their ports.
However the PortEngine was already destroyed.
Deleting _track_canvas_viewport automatically destroys
any child Items. The LocationMarker's group was already destroyed
when ~ArdourMarker() runs and calls `delete group`.
So first delete the marker, then the canvas