From fd4102245d2432e624de73910ccfc711633dc059 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Jul 15 2010 04:03:26 +0000 Subject: - Fix ladspa_wrapper crash RHBZ#600713 --- diff --git a/calf.git-4e589965840bbd15c967991a4229e87dc262a101.patch b/calf.git-4e589965840bbd15c967991a4229e87dc262a101.patch new file mode 100644 index 0000000..88e8955 --- /dev/null +++ b/calf.git-4e589965840bbd15c967991a4229e87dc262a101.patch @@ -0,0 +1,30 @@ +From: Krzysztof Foltman +Date: Fri, 9 Jul 2010 07:03:06 +0000 (+0100) +Subject: Attempt to fix the Rosegarden crash. +X-Git-Url: http://repo.or.cz/w/calf.git/commitdiff_plain/4e589965840bbd15c967991a4229e87dc262a101?hp=4fbb849c7f69d9e52c7ddd73e0bad0970f235891 + +Attempt to fix the Rosegarden crash. + +Rosegarden seems to unload the plugins after discovery, which interferes with +the cleanup of local static objects (like one created in ladspa_wrapper::get). +This workaround causes the wrapper object to never be cleaned up, which causes +a memory leak, but fixes the crash. Obviously, if this works, I will have to +convert it into a proper fix using __attribute__((destructor)). +--- + +diff --git a/src/calf/ladspa_wrap.h b/src/calf/ladspa_wrap.h +index 250b556..85c27a6 100644 +--- a/src/calf/ladspa_wrap.h ++++ b/src/calf/ladspa_wrap.h +@@ -506,8 +506,9 @@ struct ladspa_wrapper + + /// Get a wrapper singleton - used to prevent initialization order problems which were present in older versions + static ladspa_wrapper &get() { +- static ladspa_wrapper instance; +- return instance; ++ static ladspa_wrapper *instance = new ladspa_wrapper; ++ // never destroyed, but that's OK - otherwise it may run into problems with hosts that unload plugins after discovery ++ return *instance; + } + }; + diff --git a/calf.spec b/calf.spec index d4e29ee..8841e59 100644 --- a/calf.spec +++ b/calf.spec @@ -1,6 +1,6 @@ Name: calf Version: 0.0.18.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Audio plugins pack Group: Applications/Multimedia # The jackhost code is GPLv2+ @@ -13,8 +13,11 @@ URL: http://calf.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Source1: %{name}-dssi.desktop # LV2: use correct LADSPA URIs -# http://repo.or.cz/w/calf.git?a=commit;h=fb526c311c4ab401986b7d559d32732d6acd7cde +# http://repo.or.cz/w/calf.git/commit/fb526c311c4ab401986b7d559d32732d6acd7cde Patch0: %{name}.git-fb526c311c4ab401986b7d559d32732d6acd7cde.patch +# Fix ladspa_wrapper crash RHBZ#600713 +# http://repo.or.cz/w/calf.git/commit/4e589965840bbd15c967991a4229e87dc262a101 +Patch1: %{name}.git-4e589965840bbd15c967991a4229e87dc262a101.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -80,6 +83,7 @@ This package contains DSSI synthesizers and effects, also GUI extensions. %prep %setup -q %patch0 -p1 -b .ladspa_uri +%patch1 -p1 # Make sure that optflags are not overriden. sed -i 's|-O3||' configure @@ -160,6 +164,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_libdir}/dssi/%{name}.so %changelog +* Wed Jul 14 2010 Orcan Ogetbil - 0.0.18.5-4 +- Fix ladspa_wrapper crash RHBZ#600713 + * Fri Jul 24 2009 Fedora Release Engineering - 0.0.18.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild