464df064198a0d56af5ddde1d5a2c0d3200942e6
A rec-region is added to the streamview just like any other region (::add_region_view_internal). This subscribes to region->DropReferences. When the DropReferences is handled first by StreamView::remove_region_view the corresponding RegionView is destroyed. This can happen even while recording is still active, eg. when locating (which stops the current recording). MidiStreamView::setup_rec_box() is called and crashes in `dynamic_cast<MidiRegionView*> (rec_regions.back().second);` due to a use after free. Strictly speaking this is a logic error in how ::setup_rec_box() determines if to add or remove the rec-box. But due to the asynchronous nature of signal emission and transport-state changes the best solution is to destroy the rec-region at the same when the RegionView is destroyed. To reproduce: * create a session with a MIDI track * disconnect the input (empty MIDI regions are removed) * Preferences > Transport > *enable* latched-record-enable * use the Dummy backend's MIDI generator * connect Hardware > MIDI > MMC -> Ardour misc > MMC in OR use JACK-transport to locate while recording.
Please see the Ardour web site at https://ardour.org/ for all documentation..
For information on building ardour:
https://ardour.org/development.html
Description
Languages
C++
56.5%
C
39.6%
JavaScript
1.3%
Lua
0.9%
Python
0.6%
Other
0.9%