The Analyser only holds a weak-pointer the the Source,
session-destruction frees the actual Source, which is fatal for any
ongoing audio analysis.
This fix simply waits for the current ongoing analysis to complete,
ideally TransientDetector::run, EBUr128Analysis::run, OnsetDetector::run
and AudioAnalyser::analyse could be interrupted.
Alternate option: cancel the Analyser::work thread (and re-create with
the every session).
When embedding external files. the same file is queued twice for peak-file
generation. Since there are two peak_thread_work threas in SourceFactory,
this can lead to inconsistent/missing peaks.
TODO: fix the actual cause, duplicate call to setup_peakfile():
#0 ARDOUR::SourceFactory::setup_peakfile (s=..., async=true) at ../libs/ardour/source_factory.cc:116
#1 0x00007ffff6c2552f in ARDOUR::SourceFactory::createExternal (type=..., s=..., path="/tmp/CB_bass_Track08.wav", chn=0, flags=(unknown: 0), announce=true, defer_peaks=true)
at ../libs/ardour/source_factory.cc:254
#2 0x0000000000886f50 in Editor::embed_sndfiles (this=0x3810340, paths=std::vector of length 1, capacity 1 = {...}, multifile=false, check_sample_rate=@0x7fffffffc2df: true,
disposition=Editing::ImportDistinctFiles, mode=Editing::ImportAsTrack, pos=@0x7fffffffc458: -1, target_regions=1, target_tracks=-1, track=..., instrument=...)
at ../gtk2_ardour/editor_audio_import.cc:630
#3 0x0000000000885c7c in Editor::do_embed (this=0x3810340, paths=std::vector of length 1, capacity 1 = {...}, import_as=Editing::ImportDistinctFiles, mode=Editing::ImportAsTrack,
pos=@0x7fffffffc458: -1, instrument=...) at ../gtk2_ardour/editor_audio_import.cc:414
#4 0x0000000000e93aeb in SoundFileOmega::do_something (this=0x490f530, action=-5) at ../gtk2_ardour/sfdb_ui.cc:1983
#0 ARDOUR::SourceFactory::setup_peakfile (s=..., async=true) at ../libs/ardour/source_factory.cc:116
#1 0x0000000000888954 in Editor::add_sources (this=0x3810340, paths=std::vector of length 1, capacity 1 = {...}, sources=std::vector of length 1, capacity 1 = {...},
pos=@0x7fffffffc458: 0, disposition=Editing::ImportDistinctFiles, mode=Editing::ImportAsTrack, target_regions=1, target_tracks=-1, track=..., instrument=...)
at ../gtk2_ardour/editor_audio_import.cc:883
#2 0x0000000000887131 in Editor::embed_sndfiles (this=0x3810340, paths=std::vector of length 1, capacity 1 = {...}, multifile=false, check_sample_rate=@0x7fffffffc2df: true,
disposition=Editing::ImportDistinctFiles, mode=Editing::ImportAsTrack, pos=@0x7fffffffc458: 0, target_regions=1, target_tracks=-1, track=..., instrument=...)
at ../gtk2_ardour/editor_audio_import.cc:653
#3 0x0000000000885c7c in Editor::do_embed (this=0x3810340, paths=std::vector of length 1, capacity 1 = {...}, import_as=Editing::ImportDistinctFiles, mode=Editing::ImportAsTrack,
pos=@0x7fffffffc458: 0, instrument=...) at ../gtk2_ardour/editor_audio_import.cc:414
#4 0x0000000000e93aeb in SoundFileOmega::do_something (this=0x490f530, action=-5) at ../gtk2_ardour/sfdb_ui.cc:1983
Not doing so can make source or object files appear multiple times in
the list of files to be compiled or linked, e.g. when doing './waf build
install', subsequently leading to linker errors.
bug:
1) freeze a track
2) Session Cleanup > Cleanup unused sources
2a) confirm playlist deletion
3) quit, reload -> track is no longer frozen
because _freeze_record.playlist is missing.
session is in an odd state.
Grouped "checkbox" preferences together, reducing visual clutter.
Some widget settings affected the visibility/sensitivity of other widgets.
In some cases they were not adjacent; this has been fixed.
Added some additional grouping headers.