View Issue Details

IDProjectCategoryView StatusLast Update
0002484ardourbugspublic2020-04-19 20:13
Reporterlincoln Assigned Topaul  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.7.1 
Summary0002484: Duplicate plugins still show up in Ardour
DescriptionArdour 2.7.1 is still showing duplicate LADSPA plugins in the plugin manager. On my system /usr/lib64 is a symbolic link to /usr/lib/ and plugins are being registered twice as a result.

I am attaching a patch that checks if the a plugin being registered is already in the plugin list or on. This fixes the issue of double plugin registration on my system.
TagsNo tags attached.

Activities

2008-12-06 18:55

 

double_plugin.patch (1,423 bytes)   
Index: libs/ardour/plugin_manager.cc
===================================================================
--- libs/ardour/plugin_manager.cc	(revision 4297)
+++ libs/ardour/plugin_manager.cc	(working copy)
@@ -309,6 +309,7 @@
 	const LADSPA_Descriptor *descriptor;
 	LADSPA_Descriptor_Function dfunc;
 	const char *errstr;
+	bool first = true;
 
 	if ((module = dlopen (path.c_str(), RTLD_NOW)) == 0) {
 		error << string_compose(_("LADSPA: cannot load module \"%1\" (%2)"), path, dlerror()) << endmsg;
@@ -360,7 +361,23 @@
 			}
 		}
 
-		_ladspa_plugin_info.push_back (info);
+		if(_ladspa_plugin_info.empty()){
+			_ladspa_plugin_info.push_back (info);
+		}
+
+		//Ensure that the plugin is not already in the plugin list.
+
+		bool found = false;
+
+		for (PluginInfoList::const_iterator i = _ladspa_plugin_info.begin(); i != _ladspa_plugin_info.end(); ++i) {
+			if(0 == info->unique_id.compare((*i)->unique_id)){
+			      found = true;
+			}
+		}
+
+		if(!found){
+		    _ladspa_plugin_info.push_back (info);
+		}
 	}
 
 // GDB WILL NOT LIKE YOU IF YOU DO THIS
Index: libs/pbd/fpu.cc
===================================================================
--- libs/pbd/fpu.cc	(revision 4297)
+++ libs/pbd/fpu.cc	(working copy)
@@ -19,7 +19,7 @@
 #ifndef ARCH_X86
 	return;
 
-#else
+#endif
 	
 #ifndef USE_X86_64_ASM
 	asm volatile (
@@ -91,7 +91,6 @@
 			free (fxbuf);
 		}
 	}
-#endif  // ARCH_X86
 }			
 
 FPU::~FPU ()
double_plugin.patch (1,423 bytes)   

2008-12-06 19:00

 

double_plugin2.patch (1,066 bytes)   
Index: libs/ardour/plugin_manager.cc
===================================================================
--- libs/ardour/plugin_manager.cc	(revision 4297)
+++ libs/ardour/plugin_manager.cc	(working copy)
@@ -309,6 +309,7 @@
 	const LADSPA_Descriptor *descriptor;
 	LADSPA_Descriptor_Function dfunc;
 	const char *errstr;
+	bool first = true;
 
 	if ((module = dlopen (path.c_str(), RTLD_NOW)) == 0) {
 		error << string_compose(_("LADSPA: cannot load module \"%1\" (%2)"), path, dlerror()) << endmsg;
@@ -360,7 +361,23 @@
 			}
 		}
 
-		_ladspa_plugin_info.push_back (info);
+		if(_ladspa_plugin_info.empty()){
+			_ladspa_plugin_info.push_back (info);
+		}
+
+		//Ensure that the plugin is not already in the plugin list.
+
+		bool found = false;
+
+		for (PluginInfoList::const_iterator i = _ladspa_plugin_info.begin(); i != _ladspa_plugin_info.end(); ++i) {
+			if(0 == info->unique_id.compare((*i)->unique_id)){
+			      found = true;
+			}
+		}
+
+		if(!found){
+		    _ladspa_plugin_info.push_back (info);
+		}
 	}
 
 // GDB WILL NOT LIKE YOU IF YOU DO THIS
double_plugin2.patch (1,066 bytes)   

lincoln

2008-12-06 19:00

reporter   ~0005501

Please ignore the first patch. It includes an unrealted fragment.

seablade

2008-12-07 01:49

manager   ~0005503

Assigned to Paul to double check the patch. I know we just committed one about this exact topic before 2.7.1 so it seems like the symbolic link may be screwing things up there.

     Seablade

bn

2008-12-12 23:20

reporter   ~0005515

I can confirm the bug on ardour 2.7.1, os x 10.5.5.
no link /usr/lib64 exists on my system.
bn

paul

2009-03-02 21:05

administrator   ~0005787

committed to 3.0 (rev 4722) and 2.0-ongoing (rev 4723). thanks!

system

2020-04-19 20:13

developer   ~0021836

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
2008-12-06 18:55 lincoln New Issue
2008-12-06 18:55 lincoln File Added: double_plugin.patch
2008-12-06 19:00 lincoln File Added: double_plugin2.patch
2008-12-06 19:00 lincoln Note Added: 0005501
2008-12-07 01:47 seablade Status new => assigned
2008-12-07 01:47 seablade Assigned To => paul
2008-12-07 01:49 seablade Note Added: 0005503
2008-12-12 23:20 bn Note Added: 0005515
2009-03-02 21:05 paul cost => 0.00
2009-03-02 21:05 paul Status assigned => resolved
2009-03-02 21:05 paul Resolution open => fixed
2009-03-02 21:05 paul Note Added: 0005787
2010-04-24 10:28 cth103 Category bugs => bugs2
2010-04-24 10:31 cth103 Category bugs2 => bugs
2020-04-19 20:13 system Note Added: 0021836
2020-04-19 20:13 system Status resolved => closed