View Issue Details

IDCategoryLast Update
0003537bugs2011-09-28 11:35
ReporterRixx21Assigned Tocth103 
Reproducibilityalways 
Status resolvedResolutionfixed 
Product Version2.8.1 
Fixed in Version2.8.12 
Summary0003537: [PATCH] Ardour crashes when playhead is moved if fader automation is on the 'write' setting.
DescriptionMajor problem when drawing fader automation.

With fader automation set to 'write', Ardour crashes when the playhead is moved manually while transport is rolling. This might be done when skipping over a section of a track for example.

This usually occurs after the playhead is moved for a second time.

The 'touch' mode of automation does not appear to be affected by this bug.
Additional InformationUsing Ubuntu 10.10
Ardour 2.8.1
TagsNo tags attached.

Relationships

related to 0003834 resolvedcth103 Segfault when stopping write automation 

Activities

cth103

2010-11-14 18:49

administrator   ~0009411

ardour-2.8.11: libs/ardour/automation_event.cc:333: void ARDOUR::AutomationList::rt_add(double, double): Assertion `when > nascent.back()->events.back()->when' failed.

2011-03-07 18:21

 

3537.patch (1,265 bytes)
diff --git a/libs/ardour/automation_event.cc b/libs/ardour/automation_event.cc
index dd2930a..d25b6bc 100644
--- a/libs/ardour/automation_event.cc
+++ b/libs/ardour/automation_event.cc
@@ -329,13 +329,19 @@ AutomationList::rt_add (double when, double value)
 
         if (lm.locked()) {
                 assert (!nascent.empty());
-                if (!nascent.back()->events.empty()) {
-                        assert (when > nascent.back()->events.back()->when);
-                }
+		/* we don't worry about adding events out of time order as we will
+		   sort them in merge_nascent.
+		*/
                 nascent.back()->events.push_back (point_factory (when, value));
         }
 }
 
+struct ControlEventTimeComparator {
+	bool operator() (ControlEvent* a, ControlEvent* b) {
+		return a->when < b->when;
+	}
+};
+
 void
 AutomationList::merge_nascent (double when)
 {
@@ -358,6 +364,8 @@ AutomationList::merge_nascent (double when)
                                 continue;
                         }
                         
+			nascent_events.sort (ControlEventTimeComparator ());
+			
                         if (ninfo->start_time < 0.0) {
                                 ninfo->start_time = nascent_events.front()->when;
                         }
3537.patch (1,265 bytes)

cth103

2011-03-07 18:22

administrator   ~0010312

Last edited: 2011-03-08 12:34

The attached patch should fix this (already applied to 3.0).

cth103

2011-09-28 11:35

administrator   ~0011592

This should be fixed in 2.8.12.

Issue History

Date Modified Username Field Change
2010-11-13 23:02 Rixx21 New Issue
2010-11-14 18:49 cth103 Note Added: 0009411
2010-11-14 18:49 cth103 Status new => confirmed
2010-11-21 14:24 cth103 cost => 0.00
2010-11-21 14:24 cth103 Target Version => 2.8.12
2011-03-07 17:29 cth103 Relationship added related to 0003834
2011-03-07 18:21 cth103 File Added: 3537.patch
2011-03-07 18:22 cth103 Note Added: 0010312
2011-03-07 18:22 cth103 Summary Ardour crashes when playhead is moved if fader automation is on the 'write' setting. => [PATCH] Ardour crashes when playhead is moved if fader automation is on the 'write' setting.
2011-03-08 12:34 cth103 Note Edited: 0010312
2011-09-28 11:35 cth103 Note Added: 0011592
2011-09-28 11:35 cth103 Status confirmed => resolved
2011-09-28 11:35 cth103 Fixed in Version => 2.8.12
2011-09-28 11:35 cth103 Resolution open => fixed
2011-09-28 11:35 cth103 Assigned To => cth103