13
0
Commit Graph

29424 Commits

Author SHA1 Message Date
ead883302f
Don't use shared-pointers in cross thread event structs
This fixes a deadlock when closing the session.

Session::destroy() takes the engine-lock while removing
unhandled session-events. In [1], the event-queue held a last
reference to a Track, and releasing that object triggered
events (here ~IO) that required the lock.

---
[1]

#2  0x0041743a in Glib::Threads::Mutex::Lock::Lock at /home/ardour/linux-armhf/stack/include/glibmm-2.4/glibmm/threads.h:643
#3  0xb67433ba in ARDOUR::IO::~IO at ../libs/ardour/io.cc:105
#4  0xb6743612 in ARDOUR::IO::~IO at ../libs/ardour/io.cc:111
#5  0xb6758e66 in boost::checked_delete<ARDOUR::IO> at /home/ardour/linux-armhf/stack/include/boost/core/checked_delete.hpp:34
#6  0xb675912c in boost::detail::sp_counted_impl_p<ARDOUR::IO>::dispose at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_impl.hpp:92
#7  0x004178d8 in boost::detail::sp_counted_base::release at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_base_sync.hpp:129
#8  0x00417986 in boost::detail::shared_count::~shared_count at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/shared_count.hpp:426
#9  0xb662343a in boost::shared_ptr<ARDOUR::IO>::~shared_ptr at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/shared_ptr.hpp:341
#10 0xb6a4af7a in ARDOUR::Route::~Route at ../libs/ardour/route.cc:282
#11 0xb6b9404c in ARDOUR::Track::~Track at ../libs/ardour/track.cc:71
#12 0xb697164a in ARDOUR::MidiTrack::~MidiTrack at ../libs/ardour/midi_track.cc:94
#13 0xb697177a in ARDOUR::MidiTrack::~MidiTrack at ../libs/ardour/midi_track.cc:96
#14 0xb6ac525a in boost::checked_delete<ARDOUR::MidiTrack> at /home/ardour/linux-armhf/stack/include/boost/core/checked_delete.hpp:34
#15 0xb6acde00 in boost::detail::sp_counted_impl_p<ARDOUR::MidiTrack>::dispose at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_impl.hpp:92
#16 0x004178d8 in boost::detail::sp_counted_base::release at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_base_sync.hpp:129
#17 0x00417986 in boost::detail::shared_count::~shared_count at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/shared_count.hpp:426
#18 0xb664dca6 in boost::shared_ptr<ARDOUR::Track>::~shared_ptr at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/shared_ptr.hpp:341
#19 0xb6aaf67e in ARDOUR::SessionEvent::~SessionEvent at ../libs/ardour/ardour/session_event.h:42
#20 0xb6a91a88 in ARDOUR::Session::destroy at ../libs/ardour/session.cc:753
#21 0xb6a8fb20 in ARDOUR::Session::~Session at ../libs/ardour/session.cc:460
#22 0xb6a9075e in ARDOUR::Session::~Session at ../libs/ardour/session.cc:46
2020-03-28 17:31:12 +01:00
6f1b0ce3d0
Add Lua bindings to check engine status 2020-03-28 14:56:29 +01:00
34e68fe5e2
Automatic backend selection, and fix backend option parsing
python ''.split(',') returns an array with an empty string,
it does not evaluate to false.
2020-03-28 14:56:29 +01:00
4a036a2daa Grid: explicitly check for empty marker list (fixes: grid fails if no start+end markers yet) 2020-03-28 08:10:36 -05:00
b279c42158
Create write sources for template/dup tracks - #7940
This fixes a crash with missing [MIDI] write-sources after
duplicating tracks [1]: Stealing write-source name fails, because
there is no write-source.

When duplicating tracks, reset_write_sources() is called before
any playlists are set [2]. So no new write-sources are created
because _playlists[DATA-TYPE] is empty.

During normal track creation write-sources are usually added
by the input-change handler [3]. However in this case the
state has been set, and since there is no change,
DiskWriter::configure_io does not call use_new_write_source()


NB. This also re-creates write-source when playlists are changed.

-=-
[1]
#3 0x00007f4420690102 in __GI___assert_fail at assert.c:101
#4 0x0000562bfa300dc9 in boost::shared_ptr<ARDOUR::SMFSource>::operator->() const at /usr/include/boost/smart_ptr/shared_ptr.hpp:734
#5 0x00007f442579ffa1 in ARDOUR::DiskWriter::steal_write_source_name[abi:cxx11]() at ../libs/ardour/disk_writer.cc:1290
#6 0x00007f4425e476b6 in ARDOUR::Track::steal_write_source_name[abi:cxx11]() at ../libs/ardour/track.cc:476
#7 0x00007f4425d060a2 in ARDOUR::Session::create_midi_source_by_stealing_name at ../libs/ardour/session.cc:4955
#8 0x0000562bf9ed39ab in MidiTimeAxisView::add_region at ../gtk2_ardour/midi_time_axis.cc:1650
#9 0x0000562bf9b05f2a in Drag::add_midi_region at ../gtk2_ardour/editor_drag.cc:568

-=-
[2]
#0 0x00007ffff7582e2f in ARDOUR::DiskWriter::reset_write_sources at ../libs/ardour/disk_writer.cc:946
#1 0x00007ffff757fce6 in ARDOUR::DiskWriter::set_state at ../libs/ardour/disk_writer.cc:333
#2 0x00007ffff7a81c93 in ARDOUR::Route::set_processor_state at ../libs/ardour/route.cc:3054
#3 0x00007ffff7a7f5d5 in ARDOUR::Route::set_state at ../libs/ardour/route.cc:2697
#4 0x00007ffff7c2aa1d in ARDOUR::Track::set_state at ../libs/ardour/track.cc:172
#5 0x00007ffff794f204 in ARDOUR::MidiTrack::set_state at ../libs/ardour/midi_track.cc:152
#6 0x00007ffff7b7e06b in ARDOUR::Session::XMLRouteFactory at ../libs/ardour/session_state.cc:1890
#7 0x00007ffff7addf7e in ARDOUR::Session::new_route_from_template at ../libs/ardour/session.cc:3048
#8 0x000055555621329a in DuplicateRouteDialog::on_response(int) at ../gtk2_ardour/duplicate_routes_dialog.cc:194

-=-
[3]
#0 0x00007ffff7583243 in ARDOUR::DiskWriter::use_new_write_source at ../libs/ardour/disk_writer.cc:996
#1 0x00007ffff75831c7 in ARDOUR::DiskWriter::reset_write_sources at ../libs/ardour/disk_writer.cc:989
#2 0x00007ffff75851ea in ARDOUR::DiskWriter::configure_io at ../libs/ardour/disk_writer.cc:1335
#3 0x00007ffff7a7b308 in ARDOUR::Route::configure_processors_unlocked at ../libs/ardour/route.cc:1912
#4 0x00007ffff7a79e4b in ARDOUR::Route::configure_processors at ../libs/ardour/route.cc:1719
#5 0x00007ffff7a86695 in ARDOUR::Route::input_change_handler at ../libs/ardour/route.cc:3632
2020-03-28 02:37:37 +01:00
97a221f1bb
NO-OP: whitespace 2020-03-28 01:25:44 +01:00
08065e87b5
Minor code cleanup - consolidate variables & scope 2020-03-28 01:25:44 +01:00
9b84e61fab
Fix incorrect timestretch duration - #7943
Completing readout available() returns 0, until all
background threads have finished and joined.

This also improves performance by feeding suggested/required
amount of samples on every process() call.
2020-03-28 01:25:44 +01:00
918eacdfa7 NOOP: remove newlines 2020-03-27 12:40:44 -06:00
ef3c4a17fc display MIDI qtr msgs in the MIDI tracer window 2020-03-27 12:37:44 -06:00
dfe383d23a make MIDI tracing work again for ports that are handled using ::read_and_parse_entire_midi_buffer_with_no_speed_adjustment() 2020-03-27 11:22:37 -06:00
e202b64951 variable rename and comment 2020-03-27 10:25:00 -06:00
e3a848dc65 fix user-driven varispeed 2020-03-27 10:25:00 -06:00
dbc7da0bc6
Allow to pass arguments to ardour-lua
This follows the same standard as lua-5.x commandline interpreter,
using "arg" as table, which is always present in the global namespace.
2020-03-26 21:55:04 +01:00
e219a6cd1e
Source-tree consistency (headless tools at top-level)
This move ardour-lua session tool to top-level, next to
headless/hardev.
2020-03-26 19:00:41 +01:00
e7cdc91770
Remove old Lua development playground 2020-03-26 19:00:41 +01:00
7d29758ebb
NO-OP: whitespace 2020-03-26 19:00:41 +01:00
5a88a8d4a4
Allow Lua-session to read and interpret scripts 2020-03-26 19:00:41 +01:00
811dd0e6b4
NO-OP fix typo in comment and header guard 2020-03-26 19:00:41 +01:00
f744b5fc12 change velocity bar inside notes to extend to edges of note
Having the velocity bar inset from note causes distracting space at beginning of note
when viewing a MIDI note that is zoomed out
2020-03-26 10:12:54 -06:00
Constantino Álvarez Casado
672c698eb3 Update ardour.1.es
Fixed typo error.
2020-03-26 10:06:55 -06:00
Constantino Álvarez Casado
a9d326e38f Update ardour.1.es
Fixed little typo.
2020-03-26 10:06:55 -06:00
nia
74ef32ec31 Only show the Sun driver on NetBSD and sun-ish systems. 2020-03-26 09:58:34 -06:00
nia
5a1514de33 Add Sun backend option for JACK 2020-03-26 09:58:34 -06:00
nia
7e15496d5a NetBSD has /etc/login.conf too. 2020-03-26 09:39:44 -06:00
nia
9be75befbe Add support for NetBSD by generalizing BSD OS tests. 2020-03-26 09:39:44 -06:00
nia
b490100c1b Use POSIX semaphores on NetBSD too. 2020-03-26 09:39:44 -06:00
1607d6a6c1
Fix websocket to glib IO condition mapping 2020-03-26 16:04:17 +01:00
8a65c1fce2 remove visibility of "draggable playhead" option 2020-03-26 07:50:32 -06:00
John Emmas
4dd3d4effe Some initial changes (currently for libpbd only) to help a new contributer who's trying to build with MSVC2017
These changes compile okay for me (using VS2019) although they wouldn't link to my older-built libraries. Hopefully he'll be okay if he builds everything with the same compiler.
2020-03-26 10:40:36 +00:00
d7500056fc stop transport clocks from jumping after the playhead is moved via a CursorDrag 2020-03-25 19:24:38 -06:00
eeb2e99a3b
Display unit-label of VST parameters -- #7938 2020-03-26 02:17:22 +01:00
8fe3c367cf
Fix compiler warning 2020-03-26 02:17:22 +01:00
6291433e27 set Editor::_pending_locate_request to true before sending locate request. 2020-03-25 18:39:59 -06:00
25c0bd9274 Prevent updates to the playhead when a locate is pending after a drag/click is used to move the playhead.
There are two problem cases:

  1) the drag "fake-located" the playhead, but a redraw happens before the locate itself finishes.
  2) the transport emits Session::PositionChanged from Session::non_realtime_stop(), even though
     this is occuring in the "middle" of the locate process (we stop first).

In the first case, the drag code sets _pending_locate_request, since we need this to be true even
before the queued SessionEvent for the locate has been processed. So to deal with this case

In the second case, we use Session::locate_initiated() to decide if we're in the middle of a locate.
2020-03-25 18:39:59 -06:00
84f8b8beae
Convert polarity invert state from v2 sessions 2020-03-25 23:58:15 +01:00
51165aec0b remove some additional debug output 2020-03-25 16:14:25 -06:00
0622d69196 change text for a couple of UI config options 2020-03-25 16:10:27 -06:00
5d1b75bd4f likely fix for cases where a button release event falls through from the canvas to the editor, during a drag
The drag code expects coordinates in canvas coordinates, but we were not translating them at the editor level (canvas event handling
does do this, but cannot affect the situation if the event falls through to the editor)
2020-03-25 15:30:52 -06:00
4151ec1907 remove accumulated debug output 2020-03-25 15:12:30 -06:00
a0f2ae4833
Do not allow aux sends from the master-bus
This always leads to feedback situations. It may be acceptable
via the "allow feedback" option and accepting 1 cycle delay.
yet Aux-sends from the master bus are just bad practice,
and no found on any mixing desk.
2020-03-25 21:38:44 +01:00
53c666f1b8
Add restrictions for aux send cut/copy/paste & DnD
This prevents adding duplicate sends via copy/paste, or
creating invalid aux-send in the destination bus.
2020-03-25 21:38:44 +01:00
4a24cc5083
Fix Aux-Send names on copy/paste
Sends do not have any ports, so a unique name is not required.
Since 82541b33a4 custom aux names are kept when setting state.

Previously this "worked" because set_state() change the name
of the new aux-send to the name of the target-bus.
2020-03-25 21:38:44 +01:00
dbcf7dd666 more playhead-drag/click locate debugging 2020-03-25 13:50:23 -06:00
dbcd78cf71 more playhead-drag/click locate debugging 2020-03-25 13:18:58 -06:00
1b05ebbafa more playhead-drag/click locate debugging 2020-03-25 12:33:46 -06:00
77ab1a39b8 more playhead-drag/click locate debugging 2020-03-25 11:48:53 -06:00
becfad91c2 more playhead-drag/click locate debugging 2020-03-25 11:48:18 -06:00
f8b16e9e83 remove a few cerr outputs and change a couple to use cout, since they are not errors 2020-03-25 11:39:32 -06:00
04aebc920e more playhead-drag/click locate debugging 2020-03-25 11:23:45 -06:00