View Issue Details

IDProjectCategoryView StatusLast Update
0004821ardourbugspublic2020-04-19 20:16
Reporterahurst Assigned Tocth103  
PrioritynormalSeveritymajorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version3.0-beta3 
Target Version3.0 
Summary0004821: Using invalid iterator
DescriptionMedium impact static analysis bug:

Using iterator after invalidation at: libs/gtkmm2ext/gtkmm2ext/dndvbox.h:575.
Additional Information570 void remove_from_selection (T* child)
571 {
572 typename std::list<T*>::iterator x = find (_selection.begin(), _selection.end(), child);
573 if (x != _selection.end()) {
*** "erase" invalidates iterator "x".
574 _selection.erase (x);
*** Using invalid iterator "x".
575 setup_child_state (*x);
576 }
577 }
TagsNo tags attached.

Activities

2012-04-09 14:45

 

bug4821.patch (393 bytes)   
Index: dndvbox.h
===================================================================
--- dndvbox.h	(révision 11846)
+++ dndvbox.h	(copie de travail)
@@ -571,8 +571,8 @@
 	{
 		typename std::list<T*>::iterator x = find (_selection.begin(), _selection.end(), child);
 		if (x != _selection.end()) {
+			setup_child_state (*x);
 			_selection.erase (x);
-			setup_child_state (*x);
 		}
 	}
 		
bug4821.patch (393 bytes)   

epitech_user

2012-04-09 14:46

reporter   ~0013095

I am not sur for this patch but it can be a solution.

ahurst

2012-04-09 22:29

reporter   ~0013099

Looks right to me.

cth103

2012-04-11 10:32

administrator   ~0013110

Not quite, because setup_child_state() checks out the selected state of its child, so the child must have been removed from the selected list first. Fixed in SVN 11892.

system

2020-04-19 20:16

developer   ~0023030

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 00:26 ahurst New Issue
2012-04-05 01:06 cth103 cost => 0.00
2012-04-05 01:06 cth103 Target Version => 3.0 beta4
2012-04-09 14:45 epitech_user File Added: bug4821.patch
2012-04-09 14:46 epitech_user Note Added: 0013095
2012-04-09 22:29 ahurst Note Added: 0013099
2012-04-11 10:32 cth103 Note Added: 0013110
2012-04-11 10:32 cth103 Status new => resolved
2012-04-11 10:32 cth103 Resolution open => fixed
2012-04-11 10:32 cth103 Assigned To => cth103
2012-05-23 15:08 cth103 Target Version 3.0 beta4 => 3.0
2020-04-19 20:16 system Note Added: 0023030
2020-04-19 20:16 system Status resolved => closed