View Issue Details

IDProjectCategoryView StatusLast Update
0004826ardourbugspublic2020-04-19 20:16
Reporterahurst Assigned Tocth103  
PrioritynormalSeveritymajorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version3.0-beta3 
Summary0004826: Invalidated iterator used
DescriptionMedium impact static analysis bug:

Using invalid iterator at: gtk2_ardour/tempo_lines.cc:52.

The loop is right; but "i" is invalid at _lines.insert().
Additional Information 38void
 39TempoLines::tempo_map_changed()
 40{
 41 _clean_left = DBL_MAX;
 42 _clean_right = 0.0;
 43
 44 double_t d = 1.0;
 45 // TODO: Dirty/slow, but 'needed' for zoom :(
Condition "i != this->_lines.end()", taking true branch
 46 for (Lines::iterator i = _lines.begin(); i != _lines.end(); d += 1.0) {
 47 Lines::iterator next = i;
 48 ++next;
 49 i->second->property_x1() = - d;
 50 i->second->property_x2() = - d;
*** "erase" invalidates iterator "i".
 51 _lines.erase(i);
*** Using invalid iterator "i".
 52 _lines.insert(make_pair(- d, i->second));
 53 i = next;
 54 }
 55}
 56
TagsNo tags attached.

Activities

cth103

2012-04-07 01:37

administrator   ~0013085

SVN 11807.

system

2020-04-19 20:16

developer   ~0023035

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
2012-04-05 01:37 ahurst New Issue
2012-04-07 01:37 cth103 cost => 0.00
2012-04-07 01:37 cth103 Note Added: 0013085
2012-04-07 01:37 cth103 Status new => resolved
2012-04-07 01:37 cth103 Resolution open => fixed
2012-04-07 01:37 cth103 Assigned To => cth103
2020-04-19 20:16 system Note Added: 0023035
2020-04-19 20:16 system Status resolved => closed