View Issue Details

IDProjectCategoryView StatusLast Update
0003868ardourbugspublic2020-04-19 20:15
Reporterv2 Assigned Tov2  
PriorityurgentSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version3.0-alpha1 
Target Version3.0-beta1 
Summary0003868: Recording on a MIDI track causes a crash
DescriptionRecording on a MIDI track crashes Ardour.

1. Create a new session
2. Create a MIDI track
3. Arm track
4. Rec-enable & start transport
5. Stop transport
6. Rec-enable & start transport
7. crash

The track had no MIDI input connections nor any regions appeared on the track on steps 4-7.
Additional InformationJack 0.120.2

jackd -d alsa -n 3
TagsNo tags attached.

Activities

2011-03-22 23:18

 

midi__source_port_check.diff (615 bytes)   
Index: libs/ardour/midi_diskstream.cc
===================================================================
--- libs/ardour/midi_diskstream.cc	(revision 9187)
+++ libs/ardour/midi_diskstream.cc	(working copy)
@@ -529,7 +529,13 @@
 	}
 
 	if (nominally_recording || rec_nframes) {
+		if (!_source_port)
+			get_input_sources();
 
+		/* FIXME: throw a warning of some sort? */
+		if (!_source_port)
+			return 1;
+
 		// Pump entire port buffer into the ring buffer (FIXME: split cycles?)
 		MidiBuffer& buf = _source_port->get_midi_buffer(nframes);
 		for (MidiBuffer::iterator i = buf.begin(); i != buf.end(); ++i) {

Joskar

2011-03-22 23:23

reporter   ~0010380

On my end, Ardour crashed after step 4.

Ardour crashed because the variable _source_port was not initialized when the track has no MIDI input connections. The attached patch just makes a check if the variable is initialized or not (it tries to initialize it if its not), which seems to solve the problem.

paul

2011-03-23 22:30

administrator   ~0010389

are either of you using the "manually connect tracks and busses" option?

Joskar

2011-03-24 02:49

reporter   ~0010401

I'm not. If it is of interest my options under "Connection of tracks and busses" is:
[x] Auto-connect master/monitor busses
Connect track inputs: "automatically to physical inputs"
Connect track and bus outputs: "automatically to master bus"

As previously stated: the patch I submitted solved the problem, at least for me.
(perhaps it only removes the symptoms, and the real problem should be solved elsewhere)

v2

2011-03-26 09:18

developer   ~0010418

I have the same parameters as Joskar. For what it's worth, I didn't change any defaults when A3 initially asked for the default parameters.

This is still a problem with alpha3.

v2

2011-03-26 09:26

developer   ~0010419

Last edited: 2011-03-26 09:26

.. And adding a MIDI input connection to the track definitely hides this issue.

v2

2011-04-09 09:27

developer   ~0010527

Has this patch been approved / committed to A3 yet?

paul

2011-04-09 13:04

administrator   ~0010528

no, because its not the correct fix, just a band-aid.

v2

2011-04-09 13:06

developer   ~0010529

do you still need some extra information to help fix the issue?

paul

2011-04-09 16:38

administrator   ~0010537

the correct fix for this should be in svn now. i'd appreciate feedback, because i couldn't make it misbehave here (mostly for practical reasons).

v2

2011-04-19 18:38

developer   ~0010598

A revision (forgot to mark down which one) from yesterday did not exhibit the crash anymore. Consider it fixed. Thanks!

system

2020-04-19 20:15

developer   ~0022461

Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.

Issue History

Date Modified Username Field Change
2011-03-22 20:34 v2 New Issue
2011-03-22 20:34 v2 cost => 0.00
2011-03-22 23:18 Joskar File Added: midi__source_port_check.diff
2011-03-22 23:23 Joskar Note Added: 0010380
2011-03-23 02:40 cth103 Target Version => 3.0-beta1
2011-03-23 22:30 paul Note Added: 0010389
2011-03-24 02:49 Joskar Note Added: 0010401
2011-03-26 09:18 v2 Note Added: 0010418
2011-03-26 09:26 v2 Note Added: 0010419
2011-03-26 09:26 v2 Note Edited: 0010419
2011-04-09 09:27 v2 Note Added: 0010527
2011-04-09 13:04 paul Note Added: 0010528
2011-04-09 13:06 v2 Note Added: 0010529
2011-04-09 16:38 paul Note Added: 0010537
2011-04-19 18:38 v2 Note Added: 0010598
2011-04-19 18:38 v2 Status new => resolved
2011-04-19 18:38 v2 Resolution open => fixed
2011-04-19 18:38 v2 Assigned To => v2
2020-04-19 20:15 system Note Added: 0022461
2020-04-19 20:15 system Status resolved => closed