View Issue Details

IDProjectCategoryView StatusLast Update
0003094ardourbugspublic2020-04-19 20:14
Reportercth103 Assigned Tocth103  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionfixed 
Target Version3.0-beta1 
Summary0003094: [WARNING]: Pool foo has no trash collector ...
DescriptionThis should probably be fixed (or hidden ;)
TagsNo tags attached.

Activities

2010-04-29 00:18

 

pool.patch (807 bytes)   
diff --git a/libs/pbd/pool.cc b/libs/pbd/pool.cc
index abb8695..aac98a2 100644
--- a/libs/pbd/pool.cc
+++ b/libs/pbd/pool.cc
@@ -157,7 +157,18 @@ free_per_thread_pool (void* ptr)
 	CrossThreadPool* cp = static_cast<CrossThreadPool*> (ptr);
 	assert (cp);
 
-	cp->parent()->add_to_trash (cp);
+	if (cp->empty()) {
+		/* This CrossThreadPool is already empty, and the thread is finishing so nothing
+		 * more can be added to it.  We can just delete the pool.
+		 */
+		delete cp;
+	} else {
+		/* This CrossThreadPool is not empty, meaning that there's some Events in it
+		 * which another thread may yet read, so we can't delete the pool just yet.
+		 * Put it in the trash and hope someone deals with it at some stage.
+		 */
+		cp->parent()->add_to_trash (cp);
+	}
 }
  
 PerThreadPool::PerThreadPool ()
pool.patch (807 bytes)   

cth103

2010-04-29 00:18

administrator   ~0007644

The attached patch may fix this.

cth103

2010-04-29 22:55

administrator   ~0007645

Patch applied; hopefully this will fix all situations where the leak could occur.

system

2020-04-19 20:14

developer   ~0022046

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
2010-04-26 21:36 cth103 New Issue
2010-04-26 21:36 cth103 cost => 0.00
2010-04-26 21:36 cth103 Status new => confirmed
2010-04-29 00:18 cth103 File Added: pool.patch
2010-04-29 00:18 cth103 Note Added: 0007644
2010-04-29 22:55 cth103 Note Added: 0007645
2010-04-29 22:55 cth103 Status confirmed => resolved
2010-04-29 22:55 cth103 Resolution open => fixed
2010-04-29 22:55 cth103 Assigned To => cth103
2020-04-19 20:14 system Note Added: 0022046
2020-04-19 20:14 system Status resolved => closed