From f89484645e4c5340c026f0f939b553140f23fddd Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 14 Oct 2021 22:15:07 +0100 Subject: [PATCH 1/7] Fix MemoryOutputStream destructor after the latest changes Signed-off-by: falkTX --- source/modules/water/streams/MemoryOutputStream.cpp | 8 +++++--- source/modules/water/streams/MemoryOutputStream.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source/modules/water/streams/MemoryOutputStream.cpp b/source/modules/water/streams/MemoryOutputStream.cpp index ac01071d3..ee1eb046e 100644 --- a/source/modules/water/streams/MemoryOutputStream.cpp +++ b/source/modules/water/streams/MemoryOutputStream.cpp @@ -30,7 +30,8 @@ namespace water { MemoryOutputStream::MemoryOutputStream (const size_t initialSize) : internalBlock(), blockToUse (internalBlock), - position (0), size (0) + position (0), size (0), + usingInternalBlock (true) { internalBlock.setSize (initialSize, false); } @@ -38,7 +39,8 @@ MemoryOutputStream::MemoryOutputStream (const size_t initialSize) MemoryOutputStream::MemoryOutputStream (MemoryBlock& memoryBlockToWriteTo, const bool appendToExistingBlockContent) : internalBlock(), blockToUse (memoryBlockToWriteTo), - position (0), size (0) + position (0), size (0), + usingInternalBlock (false) { if (appendToExistingBlockContent) position = size = memoryBlockToWriteTo.getSize(); @@ -56,7 +58,7 @@ void MemoryOutputStream::flush() void MemoryOutputStream::trimExternalBlockSize() { - if (blockToUse != internalBlock) + if (! usingInternalBlock) blockToUse.setSize (size, false); } diff --git a/source/modules/water/streams/MemoryOutputStream.h b/source/modules/water/streams/MemoryOutputStream.h index 812372fba..35369f778 100644 --- a/source/modules/water/streams/MemoryOutputStream.h +++ b/source/modules/water/streams/MemoryOutputStream.h @@ -123,6 +123,7 @@ private: MemoryBlock internalBlock; MemoryBlock& blockToUse; size_t position, size; + bool usingInternalBlock; void trimExternalBlockSize(); char* prepareToWrite (size_t); From 2b3924c89c7824bd40d31ba3463aa8e5492b84fb Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 14 Oct 2021 22:25:37 +0100 Subject: [PATCH 2/7] Bump version to 2.4.1 Signed-off-by: falkTX --- Makefile | 2 +- source/frontend/carla_shared.py | 2 +- source/includes/CarlaDefines.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index cd12143b3..515801e0c 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ else MODULEDIR := $(CURDIR)/build/modules/Release endif -VERSION := 2.4.0 +VERSION := 2.4.1 -include Makefile.user.mk diff --git a/source/frontend/carla_shared.py b/source/frontend/carla_shared.py index ef9b8151e..feb010798 100644 --- a/source/frontend/carla_shared.py +++ b/source/frontend/carla_shared.py @@ -71,7 +71,7 @@ if WINDOWS: # ------------------------------------------------------------------------------------------------------------ # Set Version -VERSION = "2.4.0" +VERSION = "2.4.1" # ------------------------------------------------------------------------------------------------------------ # Set TMP diff --git a/source/includes/CarlaDefines.h b/source/includes/CarlaDefines.h index b39b1fe13..53a0f982a 100644 --- a/source/includes/CarlaDefines.h +++ b/source/includes/CarlaDefines.h @@ -32,8 +32,8 @@ #endif /* Set Version */ -#define CARLA_VERSION_HEX 0x020400 -#define CARLA_VERSION_STRING "2.4.0" +#define CARLA_VERSION_HEX 0x020401 +#define CARLA_VERSION_STRING "2.4.1" #define CARLA_VERSION_STRMIN "2.4" /* Check OS */ From ac8e58f84d0f2b57f7ee22f9f4f8b29eacd3512f Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 14 Oct 2021 23:11:54 +0100 Subject: [PATCH 3/7] Fix STATIC_PLUGIN_TARGET build --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 515801e0c..5a99294b1 100644 --- a/Makefile +++ b/Makefile @@ -38,9 +38,8 @@ ALL_LIBS += $(MODULEDIR)/carla_engine.a endif ALL_LIBS += $(MODULEDIR)/carla_engine_plugin.a ALL_LIBS += $(MODULEDIR)/carla_plugin.a -ifneq ($(STATIC_PLUGIN_TARGET),true) ALL_LIBS += $(MODULEDIR)/jackbridge.a -else +ifeq ($(STATIC_PLUGIN_TARGET),true) ALL_LIBS += $(MODULEDIR)/jackbridge.min.a endif ALL_LIBS += $(MODULEDIR)/native-plugins.a From 51028655d09c9a21fc51cadd7bc48210295aa791 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 15 Oct 2021 12:07:09 +0100 Subject: [PATCH 4/7] Don't expose symbols for STATIC_PLUGIN_TARGET Signed-off-by: falkTX --- source/Makefile.deps.mk | 1 + source/includes/CarlaDefines.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Makefile.deps.mk b/source/Makefile.deps.mk index 99de45838..c3e0195ca 100644 --- a/source/Makefile.deps.mk +++ b/source/Makefile.deps.mk @@ -509,6 +509,7 @@ WATER_LIBS = -luuid -lwsock32 -lwininet -lversion -lole32 -lws2_32 -loleau ifeq ($(USING_JUCE),true) JUCE_AUDIO_DEVICES_LIBS = -lwinmm -lole32 JUCE_CORE_LIBS = -luuid -lwsock32 -lwininet -lversion -lole32 -lws2_32 -loleaut32 -limm32 -lcomdlg32 -lshlwapi -lrpcrt4 -lwinmm +JUCE_EVENTS_LIBS = -lole32 JUCE_GRAPHICS_LIBS = -lgdi32 JUCE_GUI_BASICS_LIBS = -lgdi32 -limm32 -lcomdlg32 -lole32 endif # USING_JUCE diff --git a/source/includes/CarlaDefines.h b/source/includes/CarlaDefines.h index 53a0f982a..a6bce6ff5 100644 --- a/source/includes/CarlaDefines.h +++ b/source/includes/CarlaDefines.h @@ -270,7 +270,7 @@ private: \ #endif /* Define CARLA_API */ -#ifdef BUILD_BRIDGE +#if defined(BUILD_BRIDGE) || defined(STATIC_PLUGIN_TARGET) # define CARLA_API #else # if defined(CARLA_OS_WIN) && ! defined(__WINE__) From 37b294bdd2a340a0a8a7e05523c95c46789f32a6 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 15 Oct 2021 23:21:59 +0100 Subject: [PATCH 5/7] Fix dependency target for jackbridge Signed-off-by: falkTX --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5a99294b1..9c25aab4e 100644 --- a/Makefile +++ b/Makefile @@ -110,7 +110,7 @@ $(MODULEDIR)/carla_plugin.a: .FORCE $(MODULEDIR)/jackbridge.a: .FORCE @$(MAKE) -C source/jackbridge -$(MODULEDIR)/jackbridge.%.a: .FORCE +$(MODULEDIR)/jackbridge.%.a: $(MODULEDIR)/jackbridge.a @$(MAKE) -C source/jackbridge $* $(MODULEDIR)/native-plugins.a: .FORCE From 08a693c3c98663b6ce2ff4c130a084bdc09cc688 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Thu, 21 Oct 2021 20:32:54 +0200 Subject: [PATCH 6/7] vst3: user common files in the default path --- source/frontend/carla_shared.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/frontend/carla_shared.py b/source/frontend/carla_shared.py index feb010798..bca89c84b 100644 --- a/source/frontend/carla_shared.py +++ b/source/frontend/carla_shared.py @@ -357,6 +357,7 @@ if WINDOWS: splitter = ";" APPDATA = os.getenv("APPDATA") + LOCALAPPDATA = os.getenv("LOCALAPPDATA", APPDATA) PROGRAMFILES = os.getenv("PROGRAMFILES") PROGRAMFILESx86 = os.getenv("PROGRAMFILES(x86)") COMMONPROGRAMFILES = os.getenv("COMMONPROGRAMFILES") @@ -391,6 +392,7 @@ if WINDOWS: DEFAULT_VST2_PATH += ";" + COMMONPROGRAMFILES + "\\VST2" DEFAULT_VST3_PATH = COMMONPROGRAMFILES + "\\VST3" + DEFAULT_VST3_PATH += ";" + LOCALAPPDATA + "\\Programs\\Common\\VST3" DEFAULT_SF2_PATH = APPDATA + "\\SF2" DEFAULT_SFZ_PATH = APPDATA + "\\SFZ" From 14e9ec85fa2866c423e8a7c36490272ec49fb924 Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Wed, 27 Oct 2021 01:42:06 +0200 Subject: [PATCH 7/7] Disable GraphicsScene indexing method to prevent crashes Under certain circumstances Carla would crash when frequent updates on the QGraphicsScene occurred, especially in combination with scrolling or panning by the user. Backtraces showed either a segfault in QGraphicsItem::parentItem() or around QGraphicsSceneBspTree::climbTree(). While the first trace points towards missing calls to pepareGeometryChange() in combination with custom boundingRect() methods, inserting these did not yield a positive change, though people with this issue also had success in disabling the ItemIndexingMethod of their QGraphicsScene[0][1]. Setting this to NoIndex solves this problem. The original problem is reproducible with an ever-reconnecting client: $ while true; do klick 120 & (sleep 0.1; killall klick); done [0] https://bugreports.qt.io/browse/QTBUG-18021?focusedCommentId=367566&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-367566 [1] https://forum.qt.io/topic/71316/qgraphicsscenefinditembsptreevisitor-visit-crashes-due-to-an-obsolete-paintevent-after-qgraphicsscene-removeitem --- source/frontend/patchcanvas/scene.py | 1 + 1 file changed, 1 insertion(+) diff --git a/source/frontend/patchcanvas/scene.py b/source/frontend/patchcanvas/scene.py index 1f3eea4f6..9003ce5cb 100644 --- a/source/frontend/patchcanvas/scene.py +++ b/source/frontend/patchcanvas/scene.py @@ -81,6 +81,7 @@ class PatchScene(QGraphicsScene): self.m_cursor_cut = None self.m_cursor_zoom = None + self.setItemIndexMethod(QGraphicsScene.ItemIndexMethod.NoIndex) self.selectionChanged.connect(self.slot_selectionChanged) def getDevicePixelRatioF(self):