Code Monkey home page Code Monkey logo

juce-framework / juce Goto Github PK

View Code? Open in Web Editor NEW
6.1K 262.0 1.6K 258.9 MB

JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, LV2 and AAX audio plug-ins.

Home Page: https://juce.com

License: Other

C++ 75.67% C 17.97% Makefile 0.20% Objective-C++ 2.76% Objective-C 0.25% Java 0.36% CMake 2.78% Python 0.01%
juce c-plus-plus cpp audio framework plugin vst vst3 audiounit au

juce's Introduction

alt text

JUCE is an open-source cross-platform C++ application framework for creating high quality desktop and mobile applications, including VST, VST3, AU, AUv3, AAX and LV2 audio plug-ins and plug-in hosts. JUCE can be easily integrated with existing projects via CMake, or can be used as a project generation tool via the Projucer, which supports exporting projects for Xcode (macOS and iOS), Visual Studio, Android Studio, Code::Blocks and Linux Makefiles as well as containing a source code editor.

Getting Started

The JUCE repository contains a master and develop branch. The develop branch contains the latest bugfixes and features and is periodically merged into the master branch in stable tagged releases (the latest release containing pre-built binaries can be also downloaded from the JUCE website).

JUCE projects can be managed with either the Projucer (JUCE's own project-configuration tool) or with CMake.

The Projucer

The repository doesn't contain a pre-built Projucer so you will need to build it for your platform - Xcode, Visual Studio and Linux Makefile projects are located in extras/Projucer/Builds (the minimum system requirements are listed in the System Requirements section below). The Projucer can then be used to create new JUCE projects, view tutorials and run examples. It is also possible to include the JUCE modules source code in an existing project directly, or build them into a static or dynamic library which can be linked into a project.

For further help getting started, please refer to the JUCE documentation and tutorials.

CMake

Version 3.22 or higher is required. To use CMake, you will need to install it, either from your system package manager or from the official download page. For comprehensive documentation on JUCE's CMake API, see the JUCE CMake documentation. For examples which may be useful as starting points for new CMake projects, see the CMake examples directory.

Building Examples

To use CMake to build the examples and extras bundled with JUCE, simply clone JUCE and then run the following commands, replacing "DemoRunner" with the name of the target you wish to build.

cd /path/to/JUCE
cmake . -B cmake-build -DJUCE_BUILD_EXAMPLES=ON -DJUCE_BUILD_EXTRAS=ON
cmake --build cmake-build --target DemoRunner

Minimum System Requirements

Building JUCE Projects

  • C++ Standard: 17+
  • macOS/iOS: Xcode 10.1 (macOS 10.13.6)
  • Windows: Windows 8.1 and Visual Studio 2017
  • Linux: g++ 7.0 or Clang 6.0 (for a full list of dependencies, see here).
  • Android: Android Studio on Windows, macOS or Linux

Deployment Targets

  • macOS: macOS 10.9
  • Windows: Windows Vista
  • Linux: Mainstream Linux distributions
  • iOS: iOS 9.0
  • Android: Jelly Bean (API 16)

Contributing

Please see our contribution guidelines.

Licensing

The core JUCE modules (juce_audio_basics, juce_audio_devices, juce_core and juce_events) are permissively licensed under the terms of the ISC license. Other modules are covered by a GPL/Commercial license.

There are multiple commercial licensing tiers for JUCE, with different terms for each:

  • JUCE Personal (developers or startup businesses with revenue under 50K USD) - free
  • JUCE Indie (small businesses with revenue under 500K USD) - $40/month or $800 perpetual
  • JUCE Pro (no revenue limit) - $130/month or $2600 perpetual
  • JUCE Educational (no revenue limit) - free for bona fide educational institutes

For full terms see LICENSE.md.

The JUCE framework contains the following dependencies:

The JUCE examples are licensed under the terms of the ISC license.

Dependencies in the examples:

Dependencies in the bundled applications:

Dependencies in the build system:

juce's People

Contributors

aggniesz avatar anthony-nicholls avatar azeteg avatar cesaref avatar chromadevlabs avatar dimitriroli avatar ed95 avatar fangcunwuchang avatar felixfaire avatar figbug avatar hogliux avatar julianstorer avatar lukaszkozakiewicz avatar luzpaz avatar miketoon avatar musicalentropy avatar ncblair avatar noahdayan avatar omgtechy avatar pintsized avatar reuk avatar robux4 avatar rsusser avatar szarvas avatar tomduncalf avatar tommaisey avatar tomroli avatar tpoole avatar weliveindetail avatar xmasrights avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

juce's Issues

MenuBar disappears, reappears when resizing Projucer - develop branch, windows, vs2015 64bit

Environment details:
This is on Windows 10 pro, building with VS2015, 64 bit Release and Debug. I have not tried 32 bit.

To Reproduce:
Build latest Projucer on develop branch. Run it and open a project. Resize the window. As you resize, the main menu bar will disappear, and the tree view and code editor will shift up, leaving blank space at the bottom of the window. If you stop resizing while it's gone, it will stay like that, if you resize more, the menu bar will reappear. Maximizing the window also makes it disappear.

Possibly wrong handling of MIDI data in AudioProcessorGraph::AudioGraphIOProcessor

Method AudioProcessorGraph::AudioGraphIOProcessor::processAudio is possibly not handling the MIDI buffer copying correctly:

graph->currentMidiOutputBuffer.addEvents (midiMessages, 0, buffer.getNumSamples(), 0);

since buffer.getNumSamples() is not relevant here.

See here and here

Also, maybe swapping the buffer would be more appropriate in this context, instead of the looping, right?

Visual Studio 2015 : '_InterlockedDecrement': ambiguous call to overloaded function

Hi there,

I have been playing with the faust2juce script of the Faust language which generate a ready to compile JUCE project. Here is the generated cpp file I'm using: https://gist.github.com/xaviergodart/66e3b7ac9483735bb8ec1bba82ec923b

I'm targeting VST 64bits. It works perfectly when using the Linux Makefile exporter.
However, when using the Visual Studio 2015 exporter on Windows 7 64bits, I get the following error:

Error	C2668	'_InterlockedDecrement': ambiguous call to overloaded function (compiling source file ..\..\FaustPluginProcessor.cpp)	gainCtl	c:\users\xavier\documents\juce\juce-grapefruit-windows\juce\modules\juce_core\memory\juce_Atomic.h	260	

It seems that there is some sort of collision between Windows headers. I'm fairly new to cpp development, especially on Windows, and I can't figure out if the problem is coming from the faust generated file, JUCE, or my side.

I tried both 4.3.1 and the develop branch.

Here is the build log:

1>c:\users\xavier\documents\juce\juce-grapefruit-windows\juce\modules\juce_core\memory/juce_Atomic.h(260): error C2668: '_InterlockedDecrement': ambiguous call to overloaded function (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\intrin.h(209): note: could be 'long _InterlockedDecrement(volatile long *)' (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winbase.h(8875): note: or       'unsigned __int64 `anonymous-namespace'::_InterlockedDecrement(volatile unsigned __int64 *)' (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winbase.h(8864): note: or       'unsigned long `anonymous-namespace'::_InterlockedDecrement(volatile unsigned long *)' (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winbase.h(8855): note: or       'unsigned int `anonymous-namespace'::_InterlockedDecrement(volatile unsigned int *)' (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2706): note: or       '`anonymous-namespace'::LONG `anonymous-namespace'::_InterlockedDecrement(volatile `anonymous-namespace'::LONG *)' (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  c:\users\xavier\documents\juce\juce-grapefruit-windows\juce\modules\juce_core\memory/juce_Atomic.h(260): note: while trying to match the argument list '(volatile long *)' (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  c:\users\xavier\documents\juce\juce-grapefruit-windows\juce\modules\juce_core\memory/juce_Atomic.h(259): note: while compiling class template member function 'int juce::WindowsInterlockedHelpersBase<Type,4>::dec(volatile Type *) noexcept'
1>          with
1>          [
1>              Type=int
1>          ] (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  c:\users\xavier\documents\juce\juce-grapefruit-windows\juce\modules\juce_core\memory/juce_Atomic.h(381): note: see reference to function template instantiation 'int juce::WindowsInterlockedHelpersBase<Type,4>::dec(volatile Type *) noexcept' being compiled
1>          with
1>          [
1>              Type=int
1>          ] (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  c:\users\xavier\documents\juce\juce-grapefruit-windows\juce\modules\juce_core\memory/juce_Atomic.h(305): note: see reference to class template instantiation 'juce::WindowsInterlockedHelpersBase<Type,4>' being compiled
1>          with
1>          [
1>              Type=int
1>          ] (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  c:\users\xavier\documents\juce\juce-grapefruit-windows\juce\modules\juce_core\memory/juce_Atomic.h(322): note: see reference to class template instantiation 'juce::WindowsInterlockedHelpers<Type>' being compiled
1>          with
1>          [
1>              Type=int
1>          ] (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  c:\users\xavier\documents\juce\juce-grapefruit-windows\juce\modules\juce_core\memory/juce_Atomic.h(317): note: while compiling class template member function 'int juce::Atomic<int>::get(void) noexcept const' (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  c:\users\xavier\documents\juce\juce-grapefruit-windows\juce\modules\juce_core\memory/juce_ReferenceCountedObject.h(103): note: see reference to function template instantiation 'int juce::Atomic<int>::get(void) noexcept const' being compiled (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  c:\users\xavier\documents\juce\juce-grapefruit-windows\juce\modules\juce_core\memory/juce_LeakedObjectDetector.h(101): note: see reference to class template instantiation 'juce::Atomic<int>' being compiled (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  c:\users\xavier\documents\juce\juce-grapefruit-windows\juce\modules\juce_core\memory/juce_LeakedObjectDetector.h(88): note: see reference to class template instantiation 'juce::LeakedObjectDetector<OwnerClass>::LeakCounter' being compiled (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  c:\users\xavier\documents\juce\juce-grapefruit-windows\juce\modules\juce_core\memory/juce_LeakedObjectDetector.h(114): note: see reference to class template instantiation 'juce::LeakedObjectDetector<OwnerClass>' being compiled (compiling source file ..\..\FaustPluginProcessor.cpp)
1>  juce_osc.cpp
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Thank you very much for your help.

Compilation error on OS X with old LLVM/Clang version

Environment:
OS X 10.8.2 with Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix

Compiling the latest master branch (b09a236) generates the following error:

In file included from src/core/../deps/juce/modules/juce_audio_processors/juce_audio_processors.h:111:
src/core/../deps/juce/modules/juce_audio_processors/processors/juce_AudioPluginInstance.h:83:74: error: no matching constructor for initialization of 'juce::AudioProcessor'
    AudioPluginInstance (const short channelLayoutList[numLayouts][2]) : AudioProcessor (channelLayoutList) {}
                                                                         ^               ~~~~~~~~~~~~~~~~~
src/core/../deps/juce/modules/juce_audio_processors/processors/juce_AudioProcessor.h:63:5: note: candidate constructor not viable: no known conversion from 'const short (*)[2]' to 'const juce::AudioProcessor::BusesProperties' for 1st argument
    AudioProcessor (const BusesProperties& ioLayouts);
    ^
src/core/../deps/juce/modules/juce_audio_processors/processors/juce_AudioProcessor.h:1550:51: note: candidate constructor not viable: no known conversion from 'const short (*)[2]' to 'const juce::AudioProcessor' for 1st argument
    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioProcessor)
                                                  ^
./src/deps/juce/modules/juce_core/system/juce_PlatformDefs.h:231:31: note: expanded from macro 'JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR'
    JUCE_DECLARE_NON_COPYABLE(className) \
                              ^
./src/deps/juce/modules/juce_core/system/juce_PlatformDefs.h:224:5: note: expanded from macro 'JUCE_DECLARE_NON_COPYABLE'
    className (const className&) JUCE_DELETED_FUNCTION;\
    ^
src/core/../deps/juce/modules/juce_audio_processors/processors/juce_AudioProcessor.h:76:5: note: candidate template ignored: failed template argument deduction
    AudioProcessor (const short (&channelLayoutList) [numLayouts][2])
    ^
src/core/../deps/juce/modules/juce_audio_processors/processors/juce_AudioProcessor.h:56:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
    AudioProcessor();
    ^
1 error generated.

I double checked: my ancient LLVM does not support the std-powered initializer lists, hence the section JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS gets skipped in juce_AudioProcessor.h

OSC blobs are lost above 4076 bytes of size

When sending OSC blobs with size above 4076 bytes, nothing is received on the other end, at least in Windows 10 x64.
It can easily be reproduced.

  • test case: see below
  • expected: blobs should be sent above 4076 bytes size
  • OS: Windows 10
  • Architecture: 64 bit
  • tested with JUCE 4.3.0 and /develop branch

Test case:

#include "../JuceLibraryCode/JuceHeader.h"

// start size ob blobs sent via OSC - increasing every 10 times
#define START_TEST_SIZE_BYTES 4070

class TestOSC : public JUCEApplication, OSCReceiver, OSCReceiver::Listener<>, Timer {
public:
    TestOSC() {
        // connect OSC sender&receiver
        jassert(sender.connect("127.0.0.1", 9002));
        jassert(connect(9002));
        // listen for OSC messages
        addListener(this);

        // initial size
        data.ensureSize(size);
        // sender timer
        startTimerHz(10);
    }

private:
    MemoryBlock data;
    OSCSender sender;
    int32 size = START_TEST_SIZE_BYTES, counterSender = 0, counterReceiver = 0, counterBlob = 0;


    virtual void timerCallback() override
    {
        // send counter and blob
        sender.send("/test/counter", ++counterSender);
        jassert(sender.send("/test/data", data));

        // after 10 Blobs, increase size by 1
        if (!(counterSender % 10))
            data.ensureSize(++size);
    }

    void oscMessageReceived(const OSCMessage& message) override
    {
        jassert(message.size() == 1);
        String address = message.getAddressPattern().toString();
        // receive counter
        if (message[0].isInt32()) {
            Logger::outputDebugString("Received counter: " + address + " - value: " + String(counterSender));
            // before evaluating next counter, check if corresponding blob was already received
            if (counterBlob != counterReceiver)
                // THIS IS THE BUG I WANT TO SHOW
                Logger::outputDebugString("ERROR: missing blobs are " + String(counterReceiver - counterBlob));
            // store recieved counter
            counterReceiver = message[0].getInt32();
        // receive blob
        } else if (message[0].isBlob()) {
            int32 messageSize = message[0].getBlob().getSize();
            Logger::outputDebugString("Received blob   : " + address + "    - size: " + String(messageSize));
            // count received blobs
            counterBlob++;
        } else
            jassert(false);
    }

    // Inherited via JUCEApplication - not needed here
    virtual const String getApplicationName() override { return String(); }
    virtual const String getApplicationVersion() override { return String(); }
    virtual void initialise(const String & commandLineParameters) override {}
    virtual void shutdown() override {}
};

START_JUCE_APPLICATION(TestOSC)

Issue with SVG fill (+ partial fix patch)

Hello, I'm having trouble displaying this SVG image
from Juce (I tried git snapshots from 2016-10-04 and 2016-10-08). The image appears to lack fill in certain areas.

Expected behavior: Image should look like it does when browsing the above link from a standard web browser (firefox, chrome, etc.)

Observed behavior: (attached png from Juce Demo to show observed behavior)
knightbad

To reproduce: load the SVG into icons.zip and re-generate the Demo's BinaryData, then run the Demo and try the SVG demo.

OS used: Linux 64-bit (Debian Jessie)

Root cause is probably a failure to adhere to the SVG Tiny 1.2 spec, section 11.3:
"Open subpaths must be filled by performing the fill operation as if an additional "closepath" command were added to the path to connect the last point of the subpath with the first point of the subpath."

A partial fix (good enough to solve my issue, but I think I only addressed top-level path fill, not subpath fill) is attached as a patchfile against the 20161008 snapshot. I disclaim all ownership of the patch, assuming copyright is an issue.
gitpatch.txt

Xenial UNITY display issue with full-screen

  1. Steps to reproduce
cd ~/
git clone https://github.com/julianstorer/JUCE
cd JUCE/Examples/HelloWorld/Builds/Linux
make
cd build
./HelloWorld
  1. Expectations
  • App launches 👍
  • Application makes some sense 👍
  • Window controls behave consistently with OS norms 😢

image

Maximizing the window takes the entire screen size, which seems to interfere with unity.

  • Presentation of window controls is well designed, or conforms to OS standards (nice to have, complex issue as is subjective) 😕

image

Note the window handle icons seem to be slightly non-uniformly aligned with close having a larger gap between than other handles.

  1. Ubuntu Xenial 16.04 (All updates applied)
  2. x64 architecture

Output of uname -a

Linux lewis-HP-ENVY-17-Notebook-PC 4.4.0-42-generic #62-Ubuntu SMP Fri Oct 7 23:11:45 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  1. N/A
  2. N/A
  3. N/A

Juice version

image

InputStream::readIntoMemoryBlock() returns size_t but other InputStream methods return int64

readIntoMemoryBlock () returns a size_t, but all other methods in InputStream that return a number of bytes, return an int64. E.g.

virtual size_t readIntoMemoryBlock (MemoryBlock& destBlock,
                                        ssize_t maxNumBytesToRead = -1);
virtual int64 getTotalLength() = 0;

This means that, e.g. getTotalLength() can't faithfully return the actual total length in bytes, if the number of bytes read is greater than LONG_MAX

Error on Windows with JuceDemoPlugin

Hi, with Juce 4.3.1.
On Windows 7 64 bit using VS2015 as a target.
When i load JuceDemoPlugin ( the one in C:\Program Files\JUCE\examples\audio plugin demo )
in the Build tag of Projucer i have this error

error: C:\Program Files\Juce\examples\audio plugin demo\JuceLibraryCode\juce_audio_plugin_client_VST3.cpp: pragma comment requires parenthesized identifier and optional string

the code line at wich the error points to is

#pragma comment(linker, "/EXPORT:" FUNCTION "=" FUNCDNAME)

Assertion failure false-positives when using OpenGL in audio plugins in OS X

To trigger this bug we need to modify the JUCE demo plugin to use OpenGL with continuous rendering enabled.

Demo plugin modifications:

  • Add the juce_opengl module via the projucer
  • Add an OpenGLContext context; member in JuceDemoPluginAudioProcessorEditor.
  • Add context.attachTo (*this); context.setContinuousRepainting (true); in JuceDemoPluginAudioProcessorEditor's constructor and context.detach(); in its destructor.

Then debug the plugin in Xcode when running via Traction 7.1.1 (though I believe the behavior is similar across all hosts), and use the plugin as either AU, VST, or VST3. Just open a plugin window and then either close it or switch to a different application. This triggers the assertion error in checkGLError about 90% of the time.

Tested on OS X 10.11.6 using Xcode 7.3.1, in 64-bit mode, with either the JUCE master branch or the develop branch.

The following patch which adds some additional checks in checkGLError for these cases seems to almost solve the problem but it still occasionally triggers: soundradix@7d371d7
When combined with changes making the OpenGL rendering on OS X use CVDisplayLink (these new changes are available in soundradix's branch but are not yet thoroughly tested), the above patch appears to solve the issue completely.

Standalone plugin target does not support plugins with more than 2 channel outputs (on most hardware)

  1. Create a new audio plugin project using the Jucer tool, set the input channels to 2 and output to 8
  2. The audio unit project is created and works as expected in Ableton, however the standalone player target has an assert when running.
  3. MAC OSX 10.12
  4. 64-bit
  5. jassert (processorToPlay->getTotalNumOutputChannels() == numOutputChans); in AudioProcessorPlayer
  6. AU
  7. N/A

This is due to the device output channels (2) not matching the plugin output channels (8). Therefore the standalone test environment only supports testing plugins with the same number of channels as device channels.

Projucer won't launch on Ubuntu 14.04

I am having a trouble launching the Projucer binary on Ubuntu 14.04 64-bits system.
I re-downloaded the sources and the problem is still here. I have this error :

./Projucer
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 10 requests (10 known processed) with 0 events remaining.

The demo example works tho. It is just the Projucer binary that seems to have this problem.
bitmoji

ValueTreeSynchroniser does not reflect removed properties (implementation missing)

When removing a property on a ValueTree, the ValueTreeSynchroniser does not remove it on the sync'ed tree.
Instead, it just sets the value empty.

An additional strange effect when sync'ing 2 trees bidirectionally is that properties can appear again from the void (without values) after deleting all properties on both sides!
See attached testcases to reproduce.
In that case, a lot of changes are applied in both directions (see log when running test cases).

The root cause is that there is no propertyRemoved implemented in

namespace ValueTreeSynchroniserHelpers
{
    enum ChangeType
    {
        propertyChanged  = 1,
        fullSync         = 2,
        childAdded       = 3,
        childRemoved     = 4,
        childMoved       = 5
    };

Testcases to reproduce this:

#include "../JuceLibraryCode/JuceHeader.h"

// create 2 ValueTrees
ValueTree treeA("A"), treeB("B");

// Simple Synchroniser just applying all changes to a specified other tree
class ValueTreeSyncTest : public ValueTreeSynchroniser {
public:
    ValueTreeSyncTest(String name, ValueTree& valueTree, ValueTree& target) : ValueTreeSynchroniser(valueTree), 
        target(&target), name(name) {
    }

private:
    ValueTree * target;
    String name;
    void stateChanged(const void * encodedChange, size_t encodedChangeSize)
    {
       Logger::outputDebugString("Apply from " + name + " to other tree...");
       ValueTreeSynchroniser::applyChange(*target, encodedChange, encodedChangeSize, nullptr);
    }
};

// create 2 Syncers to have bidirectional sync
ValueTreeSyncTest syncA ("treeA", treeA, treeB), syncB ("treeB", treeB, treeA);

//==============================================================================
int main (int argc, char* argv[])
{
    // adding properties works fine
    Logger::outputDebugString("# Set property testA on treeA");
    treeA.setProperty("testA", "valA", nullptr);
    jassert (treeB.hasProperty("testA"));
    Logger::outputDebugString("# Set property testB on treeB");
    treeB.setProperty("testB", "valB", nullptr);
    jassert(treeA.hasProperty("testB"));
    Logger::outputDebugString("# Set property testC on treeA");
    treeA.setProperty("testC", "valC", nullptr);
    jassert(treeB.hasProperty("testC"));
    Logger::outputDebugString("# Set property testD on treeB");
    treeB.setProperty("testD", "valD", nullptr);
    jassert(treeA.hasProperty("testD"));
    Logger::outputDebugString("## treeA as XML: \n" + treeA.toXmlString());
    Logger::outputDebugString("## treeB as XML: \n" + treeB.toXmlString());

    // changing properties works fine
    Logger::outputDebugString("\n# Change property testA on treeA");
    treeA.setProperty("testA", "newValA", nullptr);
    jassert(treeB.getProperty("testA").equals("newValA"));
    Logger::outputDebugString("## treeA as XML: \n" + treeA.toXmlString());
    Logger::outputDebugString("## treeB as XML: \n" + treeB.toXmlString());

    // remove properties does not work
    Logger::outputDebugString("\n# Remove property testA on treeA");
    treeA.removeProperty("testA", nullptr);
    // Property remove is not reflected (only values are set epmty)!
    // jassert(!treeB.hasProperty("testA"));
    Logger::outputDebugString("## treeA as XML: \n" + treeA.toXmlString());
    Logger::outputDebugString("## treeB as XML: \n" + treeB.toXmlString());

    Logger::outputDebugString("\n# Remove all properties on treeA");
    treeA.removeAllProperties(nullptr);
    jassert(treeA.getNumProperties() == 0);
    // Property remove is not reflected (only values are set epmty)!
    // jassert(treeB.getNumProperties() == 0);
    Logger::outputDebugString("## treeA as XML: \n" + treeA.toXmlString());
    Logger::outputDebugString("## treeB as XML: \n" + treeB.toXmlString());

    Logger::outputDebugString("\n# Remove all properties on treeB");
    treeB.removeAllProperties(nullptr);
    // strangest thing: treeA gets properties back from the void (with empty values)!!!
    // jassert(treeA.getNumProperties() == 0);
    jassert(treeB.getNumProperties() == 0);
    Logger::outputDebugString("## treeA as XML: \n" + treeA.toXmlString());
    Logger::outputDebugString("## treeB as XML: \n" + treeB.toXmlString());
    return 0;
}

Setting Project Name in Projucer doesn't update Target Name in Xcode

Please include:

  1. detailed steps on how to reproduce the bug, preferably with already
    existing JUCE code such as the demo plugin or the demo code
  • Create a Projucer project, e.g. a console app called "My App"

  • Save Project and Open in IDE... Xcode(MacOSX)

  • See the target name is "My App"

  • Change the Project Name to e.g. "Foo App"

  • Save Project and Open in IDE... Xcode(MacOSX)

    1. the expected behaviour
  • The target name is changed to "Foo App"

2a) the actual behaviour

  • The target name is still "My App"

    1. the operating system

Mac OS X 10.11

  1. the architecture (32-bit or 64-bit)

64-bit

Note: there appears to be no way to make the target name change in Xcode from the Projucer. The only way I could change it is by editing the targetName property in .jucer XML:

<EXPORTFORMATS> <XCODE_MAC targetFolder="Builds/MacOSX"> <CONFIGURATIONS> <CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="ODE_MAC targetFolder="Builds/MacOSX"> <CONFIGURATIONS> <CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="Foo App"/> <CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="Foo App"</CONFIGURATIONS></CONFIGURATION> <CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="Foo App"/>

Projucer doesn’t redraw components on mouseEnter / mouseExit

STR:

  1. Open JuceDemo.jucer in Projucer 4.2.3
  2. Build > Enable Compilation
  3. Build > Launch Application
  4. In the running Demo app, browse to Tabs & Widgets > Buttons [tab]
  5. Try hovering over buttons - note that their mouseOver state is not shown
  6. Try clicking on a button - note that after clicking, the mouseOver state is shown until you click outside the Component

Expected Behaviour

Buttons are drawn with mouseOver state whilst, and only whilst the mouse coordinates are within the Button bounds

Actual Behaviour

  • Buttons are not drawn with mouseOver state on mouseEnter
  • Once clicked, buttons are drawn with mouseOver state until you subsequently click outside the button bounds

Note* This affects individual components running in the JIT engine as well as whilst running the whole application inside the Projucer. It does not seem to be limited to Button and its subclasses.


OS X 10.11.6 (64-bit)
JUCE / Projucer 4.2.3 (3592d61)
Retina MBP 13" 10,2

VST3 Samplitude X2/X3 black screen

Steps to reproduce:

  1. build juce demo plugin as VST3
  2. open samplitude X2 or X3 (x64)
  3. make sure VST plug-ins show up correctly.
  4. insert the JuceDemoPlugin.
  5. right-click it few times.
    Result:
  • Eventually you get a black view instead of drawing the view.

BEFORE:
image

AFTER: (where something goes wrong)
image

Insights:

  • There is no destruction/constructing of AudioProcessorEditor during those redraws.
  • This does NOT happen with VST2 plug-ins.
  • This is NOT OpenGL related*.
  • It worked as expected with Voxengo SPAN v3.0 under VST3.
  • It's for a while now (I've tested older JUCE commits) but yet to bisect it if it got broken (or was there since the beginning).
  • Happens with latest head.

Resize broken under Samplitude X3!

Please include:

  1. Compile juce demo plugin under VS2015 Debug x64.
  2. Copy .vst3 to VST3 folder (C:\Program Files\Common Files\VST3)
  3. Launch Samplitude X3 and Insert on any track juce demo plugin.
  4. Resize from resize corner handler.
    Result: it's looping / stuck instead of simply resizing properly.

I've used latest dev:
commit a816a44
Author: hogliux [email protected]
Date: Sun Dec 4 12:31:23 2016 +0000

Disabled Ableton Live's plug-in auto-suspend if the plug-in reports an infinite tail-time

Memory Leak in MouseCursorHelpers::fromHIServices

Please include:

On startup of JUCE UI I am getting memory leaks reported in Instruments. NSImage in MouseCursorHelpers::fromHIServices. OSX 10.11 64bit. Adding [originalImage release]; as below seems to solve it. Unfortunately I don't have a test program. My knowledge of OSX APIs (thanks to the ease of use of JUCE...) is terrible, so this might be way off.

const String cursorPath (String ("/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/"
                                    "HIServices.framework/Versions/A/Resources/cursors/")
                            + filename);

NSImage* originalImage = [[NSImage alloc] initByReferencingFile: juceStringToNS (cursorPath + "/cursor.pdf")];
NSSize originalSize = [originalImage size];
NSImage* resultImage   = [[NSImage alloc] initWithSize: originalSize];

for (int scale = 1; scale <= 4; ++scale)
{
    NSAffineTransform* scaleTransform = [NSAffineTransform transform];
    [scaleTransform scaleBy: (float) scale];

    if (CGImageRef rasterCGImage = [originalImage CGImageForProposedRect: nil
                                                                    context: nil
                                                                    hints: [NSDictionary dictionaryWithObjectsAndKeys:
                                                                                NSImageHintCTM, scaleTransform, nil]])
    {
        NSBitmapImageRep* imageRep = [[NSBitmapImageRep alloc] initWithCGImage: rasterCGImage];
        [imageRep setSize: originalSize];

        [resultImage addRepresentation: imageRep];
        [imageRep release];
    }
    else
    {
        return nil;
    }
}

[originalImage release]; // <----

NSDictionary* info = [NSDictionary dictionaryWithContentsOfFile: juceStringToNS (cursorPath + "/info.plist")];

const float hotspotX = (float) [[info valueForKey: nsStringLiteral ("hotx")] doubleValue];
const float hotspotY = (float) [[info valueForKey: nsStringLiteral ("hoty")] doubleValue];

return fromNSImage (resultImage, NSMakePoint (hotspotX, hotspotY));

DialogWindow closes immediately in VST2 on macOS

Please include:

  1. detailed steps on how to reproduce the bug, preferably with already
    existing JUCE code such as the demo plugin or the demo code

Change the GainPlugin createEditor() to:

AudioProcessorEditor* createEditor() override {
    DialogWindow::LaunchOptions o;
    o.content.setOwned (new TextButton("btn"));
    o.dialogTitle                   = TRANS("Log In");
    o.content->setBounds(0,0,200,200);
    o.dialogBackgroundColour        = Colours::red;
    o.escapeKeyTriggersCloseButton  = false;
    o.useNativeTitleBar             = false;
    o.resizable                     = false;
    o.launchAsync();
    // note: you could also do that in the constructor of the AudioProcessorEditor, the effect is the same
    return new GenericEditor (*this);
}
  1. the expected behaviour
    A DialogWindow is shown

  2. the operating system
    macOS 10.11.5

  3. the architecture (32-bit or 64-bit)
    64-bit

  4. a stack trace

    SuperSecretProject`juce::ModalComponentManager::ModalItem::cancel(this=0x0000000100c1ec20) + 30 at juce_ModalComponentManager.cpp:65
    SuperSecretProject`juce::ModalComponentManager::endModal(this=0x000000010087b220, component=0x0000000100cbe6d0, returnValue=0) + 120 at juce_ModalComponentManager.cpp:142
    SuperSecretProject`juce::Component::exitModalState(this=0x0000000100cbe6d0, returnValue=0) + 96 at juce_Component.cpp:1756
    SuperSecretProject`JuceVSTWrapper::deleteEditor(this=0x000000010103f000, canDeleteLaterIfModal=true) + 258 at juce_VST_Wrapper.cpp:1376
    SuperSecretProject`JuceVSTWrapper::dispatcher(this=0x000000010103f000, opCode=14, index=0, value=0, ptr=0x000000010086e970, opt=0) + 277 at juce_VST_Wrapper.cpp:1428
    SuperSecretProject`AudioEffect::dispatchEffectClass(e=0x000000010103f030, opCode=14, index=0, value=0, ptr=0x000000010086e970, opt=0) + 211 at audioeffect.cpp:54
    Plugin Host`juce::VSTPluginInstance::dispatch(int, int, long long, void*, float) const + 150
    Plugin Host`juce::VSTPluginWindow::openPluginWindow(void*) + 114
    Plugin Host`juce::Component::sendVisibilityChangeMessage() + 69
    Plugin Host`juce::Component::setVisible(bool) + 292
    Plugin Host`juce::VSTPluginWindow::VSTPluginWindow(juce::VSTPluginInstance&) + 263
    Plugin Host`juce::VSTPluginInstance::createEditor() + 50
    Plugin Host`juce::AudioProcessor::createEditorIfNeeded() + 63
    Plugin Host`PluginWindow::getWindowFor(juce::AudioProcessorGraph::Node*, PluginWindow::WindowFormatType) + 95
    Plugin Host`FilterComponent::mouseUp(juce::MouseEvent const&) + 77
    Plugin Host`juce::Component::internalMouseUp(juce::MouseInputSource, juce::Point<float>, juce::Time, juce::ModifierKeys) + 544
    Plugin Host`juce::MouseInputSourceInternal::sendMouseUp(juce::Component&, juce::Point<float>, juce::Time, juce::ModifierKeys) + 96
    Plugin Host`juce::MouseInputSourceInternal::setButtons(juce::Point<float>, juce::Time, juce::ModifierKeys) + 278
    Plugin Host`juce::MouseInputSourceInternal::handleEvent(juce::ComponentPeer&, juce::Point<float>, juce::Time, juce::ModifierKeys, float) + 355
    Plugin Host`juce::MouseInputSource::handleEvent(juce::ComponentPeer&, juce::Point<float>, long long, juce::ModifierKeys, float) + 90
    Plugin Host`juce::ComponentPeer::handleMouseEvent(int, juce::Point<float>, juce::ModifierKeys, float, long long) + 113
    Plugin Host`juce::NSViewComponentPeer::sendMouseEvent(NSEvent*) + 132
    Plugin Host`juce::NSViewComponentPeer::redirectMouseUp(NSEvent*) + 84
    Plugin Host`juce::JuceNSViewClass::asyncMouseUp(objc_object*, objc_selector*, NSEvent*) + 50
    AppKit`-[NSWindow _handleMouseUpEvent:isDelayedEvent:] + 119
    AppKit`-[NSWindow _reallySendEvent:isDelayedEvent:] + 212
    AppKit`-[NSWindow sendEvent:] + 517
    AppKit`-[NSApplication sendEvent:] + 2540
    AppKit`-[NSApplication run] + 796
    Plugin Host`juce::MessageManager::runDispatchLoop() + 81
    Plugin Host`juce::JUCEApplicationBase::main() + 53
    Plugin Host`juce::JUCEApplicationBase::main(int, char const**) + 158
    Plugin Host`start + 52
  1. the plugin format (VST2, VST3, AU, AAX, RTAS) - if applicable
    does not work with VST2, works fine with VST3 and AU

  2. which DAW you observed the bug in - if applicable
    Juce Plugin Host and Ableton Live 9

I'm on 3592d61

The reason for that appears to be, that JuceVSTWrapper::deleteEditor(canDeleteLaterIfModal=true) is called after the AudioProcessorEditor is created.

See https://github.com/julianstorer/JUCE/blob/630ab88f8bf11c8389f99a9ffb6daa3a0e891f14/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp#L2114

FeatureRequest: configurable background colour of AudioDeviceSelectorComponent created by the StandalonePluginHolder

It would be nice to be able to configure the background colour of the AudioDeviceSelectorComponent created by the StandalonePluginHolder via the LookAndFell or some other means.

The line with the hard-coded background colour is here:
https://github.com/julianstorer/JUCE/blob/630ab88f8bf11c8389f99a9ffb6daa3a0e891f14/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h#L198

Thanks for your consideration,
Ben

JUCE Plugin host crashes on exit with Kontakt 5 AU

When I load the Kontakt 5 AudioUnit in JUCE's Plugin Host example app, I can use the plugin, but it crashes when I exit the Plugin Host. The VST version doesn't cause it to crash. I've noticed similarly random crashes with other AudioUnits, but I'm choosing Kontakt here because it's well-established and something that should work.

I'm not doing anything in the Kontakt GUI, just loading the AU. Sometimes, a message box saying "Error: Memory corruption" is showing very briefly before the crash.

How can I fix this? I realize that this may or may not be JUCE's fault, there could be something wrong with NI's code, and the code of other 3rd party plugin vendors. But in any case, Kontakt is so popular that users expect it to work. You can't really sell a product that hosts plugins but cannot host Kontakt.

It crashes in different parts, and on different threads, but it never exits cleanly. When I run it from Xcode, it breaks in juce_AudioUnitPluginFormat.mm, at the call to AudioComponentInstanceDispose. Below are some call stacks from crash reports:

Thread 6 Crashed:: Built-in Output
0 Kontakt 5.MusicDevice.component 0x000000010d0894eb NI::UIA::Application::getApplication() + 27
1 Kontakt 5.MusicDevice.component 0x000000010d167521 NI::AB::InterfaceBase::processAudio() + 113
2 Kontakt 5.MusicDevice.component 0x000000010d162c9d NI::AB::InterfaceAU::Render(unsigned int&, AudioTimeStamp const&, unsigned int) + 3325
3 Kontakt 5.MusicDevice.component 0x000000010d03a863 AUBase::DoRenderBus(unsigned int&, AudioTimeStamp const&, unsigned int, AUOutputElement_, unsigned int, AudioBufferList&) + 127
4 Kontakt 5.MusicDevice.component 0x000000010d039466 AUBase::DoRender(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int, AudioBufferList&) + 438
5 Kontakt 5.MusicDevice.component 0x000000010d03bf9a AUBase::ComponentEntryDispatch(ComponentParameters_, AUBase_) + 882
6 Kontakt 5.MusicDevice.component 0x000000010cd91fb8 NIAudioUnitSynthEntry + 360
7 com.apple.audio.toolbox.AudioToolbox 0x00007fff9546b46d AT_AudioUnitRender + 215
8 com.roli.pluginhost 0x00000001059fcbfc juce::AudioUnitPluginInstance::processBlock(juce::AudioBuffer&, juce::MidiBuffer&) + 748 (juce_AudioUnitPluginFormat.mm:616)
9 com.roli.pluginhost 0x0000000105a07186 juce::GraphRenderingOps::ProcessBufferOp::callProcess(juce::AudioBuffer&, juce::MidiBuffer&) + 70 (juce_AudioProcessorGraph.cpp:273)
10 com.roli.pluginhost 0x0000000105a070d4 void juce::GraphRenderingOps::ProcessBufferOp::perform(juce::AudioBuffer&, juce::OwnedArray<juce::MidiBuffer, juce::DummyCriticalSection> const&, int) + 276 (juce_AudioProcessorGraph.cpp:267)
11 com.roli.pluginhost 0x0000000105a06d56 juce::GraphRenderingOps::AudioGraphRenderingOpjuce::GraphRenderingOps::ProcessBufferOp::perform(juce::AudioBuffer&, juce::OwnedArray<juce::MidiBuffer, juce::DummyCriticalSection> const&, int) + 54 (juce_AudioProcessorGraph.cpp:86)
12 com.roli.pluginhost 0x00000001059ea218 void juce::AudioProcessorGraph::processAudio(juce::AudioBuffer&, juce::MidiBuffer&) + 376 (juce_AudioProcessorGraph.cpp:1457)
13 com.roli.pluginhost 0x00000001059b6515 juce::AudioProcessorGraph::processBlock(juce::AudioBuffer&, juce::MidiBuffer&) + 37 (juce_AudioProcessorGraph.cpp:1481)
14 com.roli.pluginhost 0x0000000105a79343 juce::AudioProcessorPlayer::audioDeviceIOCallback(float const
_, int, float__, int, int) + 1427 (juce_AudioProcessorPlayer.cpp:198)
15 com.roli.pluginhost 0x000000010595f7f1 juce::AudioDeviceManager::audioDeviceIOCallbackInt(float const__, int, float__, int, int) + 705 (juce_AudioDeviceManager.cpp:796)
16 com.roli.pluginhost 0x000000010596839f juce::AudioDeviceManager::CallbackHandler::audioDeviceIOCallback(float const__, int, float__, int, int) + 63 (juce_AudioDeviceManager.cpp:57)
17 com.roli.pluginhost 0x0000000105974557 juce::CoreAudioClasses::AudioIODeviceCombiner::run() + 1063 (juce_mac_CoreAudio.cpp:1427)
18 com.roli.pluginhost 0x000000010597471c non-virtual thunk to juce::CoreAudioClasses::AudioIODeviceCombiner::run() + 28 (juce_mac_CoreAudio.cpp:1389)
19 com.roli.pluginhost 0x0000000105abf48a juce::Thread::threadEntryPoint() + 362 (juce_Thread.cpp:102)
20 com.roli.pluginhost 0x0000000105abf785 juce::juce_threadEntryPoint(void_) + 21 (juce_Thread.cpp:118)
21 com.roli.pluginhost 0x0000000105addd4e threadEntryProc + 30 (juce_posix_SharedCode.h:905)
22 libsystem_pthread.dylib 0x00007fff960ba05a _pthread_body + 131
23 libsystem_pthread.dylib 0x00007fff960b9fd7 _pthread_start + 176
24 libsystem_pthread.dylib 0x00007fff960b73ed thread_start + 13
And a different time:

Thread 0 Crashed:: Juce Message Thread Dispatch queue: com.apple.main-thread
0 ??? 0x00007fff7b8ae300 thread + 0
1 com.apple.HIToolbox 0x00007fff8b4cf42a HIObject::EventHook(OpaqueEventHandlerCallRef
, OpaqueEventRef_, void_) + 128
2 com.apple.HIToolbox 0x00007fff8b4ceb6c DispatchEventToHandlers(EventTargetRec_, OpaqueEventRef_, HandlerCallRec_) + 1260
3 com.apple.HIToolbox 0x00007fff8b4cdfae SendEventToEventTargetInternal(OpaqueEventRef_, OpaqueEventTargetRef_, HandlerCallRec_) + 386
4 com.apple.HIToolbox 0x00007fff8b4cde22 SendEventToEventTargetWithOptions + 43
5 com.apple.HIToolbox 0x00007fff8b4d6311 HIObject::Destruct() + 123
6 com.apple.CoreFoundation 0x00007fff8e23ee20 CFRelease + 416
7 com.apple.HIToolbox 0x00007fff8b4d601b ReleaseMenu(MenuData) + 9
8 com.apple.HIToolbox 0x00007fff8b4d5fe0 ReleaseRootMenus(RootMenus_) + 50
9 com.apple.HIToolbox 0x00007fff8b4d5f9d MenuIterRelease + 14
10 com.apple.HIToolbox 0x00007fff8b4eb96d HIMenuBarView::EnsureBarLayout() + 59
11 com.apple.HIToolbox 0x00007fff8b5264fa HIMenuBarView::SetFocusPartSelf(short, unsigned char, short
) + 30
12 com.apple.HIToolbox 0x00007fff8b5264b2 HIView::SendSetFocusPart(short, unsigned char, unsigned char, short_) + 324
13 com.apple.HIToolbox 0x00007fff8b5262c2 HIView::SetFocusPartInternal(short, unsigned char, unsigned char, short_, short, unsigned char, unsigned char) + 86
14 com.apple.HIToolbox 0x00007fff8b5260cb HIView::SetFocusPart(short, unsigned char, unsigned char, unsigned int, FocusData_) + 241
15 com.apple.HIToolbox 0x00007fff8b525f48 HIViewSetFocus + 181
16 com.apple.HIToolbox 0x00007fff8b525e90 SetKeyboardFocus + 18
17 com.apple.HIToolbox 0x00007fff8b4d7592 MBWindows::ForEachDisplayWindowDo(void (OpaqueWindowPtr_, unsigned int, unsigned char) block_pointer) + 160
18 com.apple.HIToolbox 0x00007fff8b4d766c ForEachMenuBarViewDo + 93
19 com.apple.HIToolbox 0x00007fff8b525c9d HiliteMenuTitle(MenuData, MenuData_, unsigned int, unsigned char) + 100
20 com.apple.HIToolbox 0x00007fff8b525c26 HiliteMenuTitleOnDisplay + 108
21 com.apple.AppKit 0x00007fff924e2447 unhighlightMenuBarAtTime + 99
22 com.apple.AppKit 0x00007fff924e232b NSUnhighlightCarbonMenu + 94
23 com.apple.AppKit 0x00007fff924df4a2 -[NSApplication commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo:] + 1352
24 com.apple.AppKit 0x00007fff924def47 -[NSApplication beginModalSessionForWindow:] + 37
25 com.apple.AppKit 0x00007fff924dee61 -[NSApplication runModalForWindow:] + 98
26 com.apple.AppKit 0x00007fff92590953 -[NSAlert runModal] + 144
27 Kontakt 5.MusicDevice.component 0x0000000110592f62 NI::GP::Message::show(NI::GP::CharSequence const&, NI::GP::Message::eType, NI::GP::Message::eButton, NI::GP::Message::eIcon, unsigned short const
) + 1714
28 Kontakt 5.MusicDevice.component 0x0000000110a568e2 BMessage::ShowInternal(BString const&, NI::GP::Message::eIcon, NI::GP::Message::eType, NI::GP::Message::eButton) + 162
29 Kontakt 5.MusicDevice.component 0x0000000110a567b7 BMessage::Show(BString const&, BMessage::eIcon, NI::GP::Message::eType, NI::GP::Message::eButton) + 103
30 Kontakt 5.MusicDevice.component 0x0000000110a6698c BPoolMemCorruptionError + 60
31 Kontakt 5.MusicDevice.component 0x0000000110a547f7 hmm_free + 775
32 Kontakt 5.MusicDevice.component 0x0000000110a6579d BPoolMem::Free(void
) + 77
33 Kontakt 5.MusicDevice.component 0x0000000110a7dc39 BString::operator=(char const
) + 41
34 Kontakt 5.MusicDevice.component 0x0000000110b81a82 BOutputConfiguration::OutputPartition::SetName(NI::GP::String const&) + 66
35 Kontakt 5.MusicDevice.component 0x0000000110adbf28 BOutputConfiguration::InitializeMinimumStereo() + 328
36 Kontakt 5.MusicDevice.component 0x0000000110adcb0c BBank::DoResetParameters() + 28
37 Kontakt 5.MusicDevice.component 0x0000000110adddfa BBank::Clear() + 58
38 Kontakt 5.MusicDevice.component 0x0000000110b036f7 BEngine::ShutdownEngine(bool) + 71
39 Kontakt 5.MusicDevice.component 0x00000001102a8a09 non-virtual thunk to BPlugin::deInit() + 89
40 Kontakt 5.MusicDevice.component 0x0000000110560b60 ComponentBase::ComponentEntryDispatch(ComponentParameters_, ComponentBase_) + 52
41 Kontakt 5.MusicDevice.component 0x000000011055efc6 AUBase::ComponentEntryDispatch(ComponentParameters_, AUBase_) + 926
42 Kontakt 5.MusicDevice.component 0x00000001102b4f80 NIAudioUnitSynthEntry + 304
43 com.apple.CoreServices.CarbonCore 0x00007fff8c65585e CallComponentClose + 46
44 com.apple.CoreServices.CarbonCore 0x00007fff8c655794 CloseComponentInternal(ComponentInstanceRecord_) + 98
45 com.apple.CoreServices.CarbonCore 0x00007fff8c65571f CloseComponent + 33
46 com.apple.audio.toolbox.AudioToolbox 0x00007fff9553d29f AudioComponentMgr::DisposeInstance(ComponentInstanceRecord_) + 41
47 com.roli.pluginhost 0x0000000108f6b615 juce::AudioUnitPluginInstance::cleanup() + 117
48 com.roli.pluginhost 0x0000000108f6b2a1 juce::AudioUnitPluginInstance::~AudioUnitPluginInstance() + 289
49 com.roli.pluginhost 0x0000000108f1f355 juce::AudioUnitPluginInstance::~AudioUnitPluginInstance() + 21
50 com.roli.pluginhost 0x0000000108f1f379 juce::AudioUnitPluginInstance::~AudioUnitPluginInstance() + 25
51 com.roli.pluginhost 0x0000000108f6f841 juce::ContainerDeletePolicyjuce::AudioProcessor::destroy(juce::AudioProcessor_) + 65
52 com.roli.pluginhost 0x0000000108f6f7e4 juce::ScopedPointerjuce::AudioProcessor::~ScopedPointer() + 20
53 com.roli.pluginhost 0x0000000108f0ee15 juce::ScopedPointerjuce::AudioProcessor::~ScopedPointer() + 21
54 com.roli.pluginhost 0x0000000108f8f9c7 juce::AudioProcessorGraph::Node::~Node() + 71
55 com.roli.pluginhost 0x0000000108f210f5 juce::AudioProcessorGraph::Node::~Node() + 21
56 com.roli.pluginhost 0x0000000108f21119 juce::AudioProcessorGraph::Node::~Node() + 25
57 com.roli.pluginhost 0x0000000108e22721 juce::ContainerDeletePolicyjuce::AudioProcessorGraph::Node::destroy(juce::AudioProcessorGraph::Node_) + 65
58 com.roli.pluginhost 0x0000000108e2260c juce::ReferenceCountedObjectPtrjuce::AudioProcessorGraph::Node::decIfNotNull(juce::AudioProcessorGraph::Node_) + 60
59 com.roli.pluginhost 0x0000000108e225c8 juce::ReferenceCountedObjectPtrjuce::AudioProcessorGraph::Node::~ReferenceCountedObjectPtr() + 24
60 com.roli.pluginhost 0x0000000108e21615 juce::ReferenceCountedObjectPtrjuce::AudioProcessorGraph::Node::~ReferenceCountedObjectPtr() + 21
61 com.roli.pluginhost 0x0000000108f29fab juce::GraphRenderingOps::ProcessBufferOp::~ProcessBufferOp() + 107
62 com.roli.pluginhost 0x0000000108f29ce5 juce::GraphRenderingOps::ProcessBufferOp::~ProcessBufferOp() + 21
63 com.roli.pluginhost 0x0000000108f29d09 juce::GraphRenderingOps::ProcessBufferOp::~ProcessBufferOp() + 25
64 com.roli.pluginhost 0x0000000108ed89b7 juce::deleteRenderOpArray(juce::Array<void*, juce::DummyCriticalSection, 0>&) + 87
65 com.roli.pluginhost 0x0000000108ed7b41 juce::AudioProcessorGraph::clearRenderingSequence() + 97
66 com.roli.pluginhost 0x0000000108ed7970 juce::AudioProcessorGraph::~AudioProcessorGraph() + 48
67 com.roli.pluginhost 0x0000000108ed7be5 juce::AudioProcessorGraph::~AudioProcessorGraph() + 21
68 com.roli.pluginhost 0x0000000108e1e10f FilterGraph::~FilterGraph() + 79
69 com.roli.pluginhost 0x0000000108e1e185 FilterGraph::~FilterGraph() + 21
70 com.roli.pluginhost 0x0000000108e2579b GraphDocumentComponent::~GraphDocumentComponent() + 427
71 com.roli.pluginhost 0x0000000108e25835 GraphDocumentComponent::~GraphDocumentComponent() + 21
72 com.roli.pluginhost 0x0000000108e25859 GraphDocumentComponent::~GraphDocumentComponent() + 25
73 com.roli.pluginhost 0x0000000109276692 juce::Component::SafePointerjuce::Component::deleteAndZero() + 50
74 com.roli.pluginhost 0x00000001091f7153 juce::ResizableWindow::clearContentComponent() + 51
75 com.roli.pluginhost 0x0000000108e3044e MainHostWindow::~MainHostWindow() + 398
76 com.roli.pluginhost 0x0000000108e30645 MainHostWindow::~MainHostWindow() + 21
77 com.roli.pluginhost 0x0000000108e30759 MainHostWindow::~MainHostWindow() + 25
78 com.roli.pluginhost 0x0000000108e2eb01 juce::ContainerDeletePolicy::destroy(MainHostWindow_) + 65
79 com.roli.pluginhost 0x0000000108e2ebc0 juce::ScopedPointer::operator=(MainHostWindow_) + 64
80 com.roli.pluginhost 0x0000000108e2e36a PluginHostApp::shutdown() + 42
81 com.roli.pluginhost 0x0000000109098891 juce::JUCEApplicationBase::shutdownApp() + 177
82 com.roli.pluginhost 0x0000000109098787 juce::JUCEApplicationBase::appWillTerminateByForce() + 71
83 com.roli.pluginhost 0x00000001090a8a39 juce::AppDelegate::AppDelegateClass::applicationWillTerminate(objc_object_, objc_selector_, NSNotification*) + 25
84 com.apple.CoreFoundation 0x00007fff8e34645c CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 12
85 com.apple.CoreFoundation 0x00007fff8e236634 _CFXNotificationPost + 3140
86 com.apple.Foundation 0x00007fff8d3e7aa1 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
87 com.apple.AppKit 0x00007fff9260695f -[NSApplication terminate:] + 1759
88 libsystem_trace.dylib 0x00007fff8a3d9cd7 _os_activity_initiate + 75
89 com.apple.AppKit 0x00007fff924daeb1 -[NSApplication sendAction:to:from:] + 452
90 com.apple.AppKit 0x00007fff924dac4e -[NSMenuItem _corePerformAction] + 382
91 com.apple.AppKit 0x00007fff924da97c -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 114
92 libsystem_trace.dylib 0x00007fff8a3d9cd7 _os_activity_initiate + 75
93 com.apple.AppKit 0x00007fff924d98ad -[NSMenu performKeyEquivalent:] + 359
94 com.apple.AppKit 0x00007fff924d8a6f -[NSApplication _handleKeyEquivalent:] + 920
95 com.apple.AppKit 0x00007fff923e383a -[NSApplication sendEvent:] + 4080
96 com.apple.AppKit 0x00007fff9230cb68 -[NSApplication run] + 711
97 com.roli.pluginhost 0x0000000109099313 juce::MessageManager::runDispatchLoop() + 147
98 com.roli.pluginhost 0x00000001090991fa juce::JUCEApplicationBase::main() + 394
99 com.roli.pluginhost 0x000000010909900c juce::JUCEApplicationBase::main(int, char const**) + 60
100 com.roli.pluginhost 0x0000000108e2dcb3 main + 51
101 libdyld.dylib 0x00007fff9089b5c9 start + 1
And yet another part of the code:

Thread 0 Crashed:: Juce Message Thread Dispatch queue: com.apple.main-thread
0 Kontakt 5.MusicDevice.component 0x000000010d8fda46 NI::GP::CriticalSection::enter() + 6
1 Kontakt 5.MusicDevice.component 0x000000010dddf77b BPoolMem::Free(void_) + 43
2 Kontakt 5.MusicDevice.component 0x000000010ddf7c39 BString::operator=(char const_) + 41
3 Kontakt 5.MusicDevice.component 0x000000010defba82 BOutputConfiguration::OutputPartition::SetName(NI::GP::String const&) + 66
4 Kontakt 5.MusicDevice.component 0x000000010de55f28 BOutputConfiguration::InitializeMinimumStereo() + 328
5 Kontakt 5.MusicDevice.component 0x000000010de56b0c BBank::DoResetParameters() + 28
6 Kontakt 5.MusicDevice.component 0x000000010de57dfa BBank::Clear() + 58
7 Kontakt 5.MusicDevice.component 0x000000010de7d6f7 BEngine::ShutdownEngine(bool) + 71
8 Kontakt 5.MusicDevice.component 0x000000010d622a09 non-virtual thunk to BPlugin::deInit() + 89
9 Kontakt 5.MusicDevice.component 0x000000010d8dab60 ComponentBase::ComponentEntryDispatch(ComponentParameters_, ComponentBase_) + 52
10 Kontakt 5.MusicDevice.component 0x000000010d8d8fc6 AUBase::ComponentEntryDispatch(ComponentParameters_, AUBase_) + 926
11 Kontakt 5.MusicDevice.component 0x000000010d62ef80 NIAudioUnitSynthEntry + 304
12 com.apple.CoreServices.CarbonCore 0x00007fff8c65585e CallComponentClose + 46
13 com.apple.CoreServices.CarbonCore 0x00007fff8c655794 CloseComponentInternal(ComponentInstanceRecord_) + 98
14 com.apple.CoreServices.CarbonCore 0x00007fff8c65571f CloseComponent + 33
15 com.apple.audio.toolbox.AudioToolbox 0x00007fff9553d29f AudioComponentMgr::DisposeInstance(ComponentInstanceRecord_) + 41
16 com.roli.pluginhost 0x00000001062e5615 juce::AudioUnitPluginInstance::cleanup() + 117 (juce_AudioUnitPluginFormat.mm:391)
17 com.roli.pluginhost 0x00000001062e52a1 juce::AudioUnitPluginInstance::~AudioUnitPluginInstance() + 289 (juce_AudioUnitPluginFormat.mm:365)
18 com.roli.pluginhost 0x0000000106299355 juce::AudioUnitPluginInstance::~AudioUnitPluginInstance() + 21 (juce_AudioUnitPluginFormat.mm:374)
19 com.roli.pluginhost 0x0000000106299379 juce::AudioUnitPluginInstance::~AudioUnitPluginInstance() + 25 (juce_AudioUnitPluginFormat.mm:336)
20 com.roli.pluginhost 0x00000001062e9841 juce::ContainerDeletePolicyjuce::AudioProcessor::destroy(juce::AudioProcessor_) + 65 (juce_ContainerDeletePolicy.h:59)
21 com.roli.pluginhost 0x00000001062e97e4 juce::ScopedPointerjuce::AudioProcessor::~ScopedPointer() + 20 (juce_ScopedPointer.h:107)
22 com.roli.pluginhost 0x0000000106288e15 juce::ScopedPointerjuce::AudioProcessor::~ScopedPointer() + 21 (juce_ScopedPointer.h:107)
23 com.roli.pluginhost 0x00000001063099c7 juce::AudioProcessorGraph::Node::~Node() + 71 (juce_AudioProcessorGraph.h:60)
24 com.roli.pluginhost 0x000000010629b0f5 juce::AudioProcessorGraph::Node::~Node() + 21 (juce_AudioProcessorGraph.h:60)
25 com.roli.pluginhost 0x000000010629b119 juce::AudioProcessorGraph::Node::~Node() + 25 (juce_AudioProcessorGraph.h:60)
26 com.roli.pluginhost 0x000000010619c721 juce::ContainerDeletePolicyjuce::AudioProcessorGraph::Node::destroy(juce::AudioProcessorGraph::Node_) + 65 (juce_ContainerDeletePolicy.h:59)
27 com.roli.pluginhost 0x000000010619c60c juce::ReferenceCountedObjectPtrjuce::AudioProcessorGraph::Node::decIfNotNull(juce::AudioProcessorGraph::Node_) + 60 (juce_ReferenceCountedObject.h:374)
28 com.roli.pluginhost 0x000000010619c5c8 juce::ReferenceCountedObjectPtrjuce::AudioProcessorGraph::Node::~ReferenceCountedObjectPtr() + 24 (juce_ReferenceCountedObject.h:336)
29 com.roli.pluginhost 0x000000010619b615 juce::ReferenceCountedObjectPtrjuce::AudioProcessorGraph::Node::~ReferenceCountedObjectPtr() + 21 (juce_ReferenceCountedObject.h:336)
30 com.roli.pluginhost 0x00000001062a3fab juce::GraphRenderingOps::ProcessBufferOp::~ProcessBufferOp() + 107 (juce_AudioProcessorGraph.cpp:238)
31 com.roli.pluginhost 0x00000001062a3ce5 juce::GraphRenderingOps::ProcessBufferOp::~ProcessBufferOp() + 21 (juce_AudioProcessorGraph.cpp:238)
32 com.roli.pluginhost 0x00000001062a3d09 juce::GraphRenderingOps::ProcessBufferOp::~ProcessBufferOp() + 25 (juce_AudioProcessorGraph.cpp:238)
33 com.roli.pluginhost 0x00000001062529b7 juce::deleteRenderOpArray(juce::Array<void_, juce::DummyCriticalSection, 0>&) + 87 (juce_AudioProcessorGraph.cpp:1290)
34 com.roli.pluginhost 0x0000000106251b41 juce::AudioProcessorGraph::clearRenderingSequence() + 97 (juce_AudioProcessorGraph.cpp:1303)
35 com.roli.pluginhost 0x0000000106251970 juce::AudioProcessorGraph::~AudioProcessorGraph() + 48 (juce_AudioProcessorGraph.cpp:1044)
36 com.roli.pluginhost 0x0000000106251be5 juce::AudioProcessorGraph::~AudioProcessorGraph() + 21 (juce_AudioProcessorGraph.cpp:1046)
37 com.roli.pluginhost 0x000000010619810f FilterGraph::~FilterGraph() + 79 (FilterGraph.cpp:54)
38 com.roli.pluginhost 0x0000000106198185 FilterGraph::~FilterGraph() + 21 (FilterGraph.cpp:54)
39 com.roli.pluginhost 0x000000010619f79b GraphDocumentComponent::~GraphDocumentComponent() + 427 (GraphEditorPanel.cpp:1128)
40 com.roli.pluginhost 0x000000010619f835 GraphDocumentComponent::~GraphDocumentComponent() + 21 (GraphEditorPanel.cpp:1128)
41 com.roli.pluginhost 0x000000010619f859 GraphDocumentComponent::~GraphDocumentComponent() + 25 (GraphEditorPanel.cpp:1117)
42 com.roli.pluginhost 0x00000001065f0692 juce::Component::SafePointerjuce::Component::deleteAndZero() + 50 (juce_Component.h:2140)
43 com.roli.pluginhost 0x0000000106571153 juce::ResizableWindow::clearContentComponent() + 51 (juce_ResizableWindow.cpp:100)
44 com.roli.pluginhost 0x00000001061aa44e MainHostWindow::~MainHostWindow() + 398 (MainHostWindow.cpp:137)
45 com.roli.pluginhost 0x00000001061aa645 MainHostWindow::~MainHostWindow() + 21 (MainHostWindow.cpp:138)
46 com.roli.pluginhost 0x00000001061aa759 MainHostWindow::~MainHostWindow() + 25 (MainHostWindow.cpp:124)
47 com.roli.pluginhost 0x00000001061a8b01 juce::ContainerDeletePolicy::destroy(MainHostWindow_) + 65 (juce_ContainerDeletePolicy.h:59)
48 com.roli.pluginhost 0x00000001061a8bc0 juce::ScopedPointer::operator=(MainHostWindow_) + 64 (juce_ScopedPointer.h:151)
49 com.roli.pluginhost 0x00000001061a836a PluginHostApp::shutdown() + 42 (HostStartup.cpp:102)
50 com.roli.pluginhost 0x0000000106412891 juce::JUCEApplicationBase::shutdownApp() + 177 (juce_ApplicationBase.cpp:298)
51 com.roli.pluginhost 0x0000000106412787 juce::JUCEApplicationBase::appWillTerminateByForce() + 71 (juce_ApplicationBase.cpp:56)
52 com.roli.pluginhost 0x0000000106422a39 juce::AppDelegate::AppDelegateClass::applicationWillTerminate(objc_object_, objc_selector_, NSNotification_) + 25 (juce_mac_MessageManager.mm:145)
53 com.apple.CoreFoundation 0x00007fff8e34645c CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 12
54 com.apple.CoreFoundation 0x00007fff8e236634 _CFXNotificationPost + 3140
55 com.apple.Foundation 0x00007fff8d3e7aa1 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
56 com.apple.AppKit 0x00007fff9260695f -[NSApplication terminate:] + 1759
57 libsystem_trace.dylib 0x00007fff8a3d9cd7 _os_activity_initiate + 75
58 com.apple.AppKit 0x00007fff924daeb1 -[NSApplication sendAction:to:from:] + 452
59 com.apple.AppKit 0x00007fff924dac4e -[NSMenuItem _corePerformAction] + 382
60 com.apple.AppKit 0x00007fff924da97c -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 114
61 libsystem_trace.dylib 0x00007fff8a3d9cd7 _os_activity_initiate + 75
62 com.apple.AppKit 0x00007fff924d98ad -[NSMenu performKeyEquivalent:] + 359
63 com.apple.AppKit 0x00007fff924d8a6f -[NSApplication handleKeyEquivalent:] + 920
64 com.apple.AppKit 0x00007fff923e383a -[NSApplication sendEvent:] + 4080
65 com.apple.AppKit 0x00007fff9230cb68 -[NSApplication run] + 711
66 com.roli.pluginhost 0x0000000106413313 juce::MessageManager::runDispatchLoop() + 147 (juce_mac_MessageManager.mm:251)
67 com.roli.pluginhost 0x00000001064131fa juce::JUCEApplicationBase::main() + 394 (juce_ApplicationBase.cpp:240)
68 com.roli.pluginhost 0x000000010641300c juce::JUCEApplicationBase::main(int, char const
*) + 60 (juce_ApplicationBase.cpp:218)
69 com.roli.pluginhost 0x00000001061a7cb3 main + 51 (HostStartup.cpp:133)
70 libdyld.dylib 0x00007fff9089b5c9 start + 1

BugReport: MouseMovement in VST3 in Plugin Host

having some trouble with the mosueMove (...) in VST3 in Plugin Host, it gets only called on a mouse down event not on a mouse move.

To reproduce, make a new Plugin with the Projucer and add this to the Editor and Debug with Plugin Host in VST3

public:
   void mouseMove (const MouseEvent& e) override
    {
        DBG ("mouse moved");
    }

The weird thing is, it works with the Demo Plugin project, but not with a new generated one.

I'm on latest develop with a freshly built Projucer and freshly built Plugin Host, Mac OS X 10.11.4, XCode 7.3.1

Projucer - Illegal instruction, core dumped

I've downloaded the latest version of JUCE from the website, and I have tried to run projucer, and I get this when I try to run it:
[1] 1671 illegal hardware instruction (core dumped) ./Projucer
I'm running antergos linux 64-bit, if that helps.

Mac menu bar flashes when invoking commands registered with dontTriggerVisualFeedback flag

The dontTriggerVisualFeedback flag should be checked in juce_mac_MainMenu.mm menuCommandInvoked() before flashMenuBar.

In addition to this, it seems commands registered with modifier keys or keycodes flash the OS X menu bar twice when the shortcut keys are pressed. This can be observed in the JuceDemo App -> Tabs & Widgets -> Use Native Menu Bar -> Press Command + P

Projucer steals keystrokes from JIT components / running app

STR:

  1. Open JuceDemo.jucer in Projucer 4.2.3
  2. Build > Enable Compilation
  3. Build > Launch Application
  4. In the running Demo app, browse to the Code Editor, or HTTP demos
  5. Attempt data entry from keyboard

Expected behaviour:

Keystroke events make it to the running application / JIT component when it is the foreground window.

Actual behaviour:

Keystroke events are consumed by the Projucer. If the code editor has keyboardFocus in the Projucer, then keystrokes will end up there instead of making it to the running application, even if the application / JIT component is the foreground window. If Projucer doesn't want keyboardFocus the events are discarded.

Note* This affects individual components running in the JIT engine as well as whilst running the whole application inside the Projucer.


OS X 10.11.6 (64-bit)
JUCE / Projucer 4.2.3 (3592d61)
Retina MBP 13" 10,2

Please add possibility to view JUCE version in Projucer.exe

As a developer, I want to easily be able to get the information about which exact version (major.miner.maitenance / build / revision) of JUCE i have installed in Projucer.exe which is the main entry point for me to create new Projects.

Maybe an "About" menu entry will do the job.

AudioProcessorValueTreeState::SliderAttachment() does not respect skew of the parameters NormalisableRange (with fix/low hanging fruit :) )

First of all: the AudioProcessorValueTreeState is pretty awesome. I was able to throw away a lot of code I had to write to syncronize parameters between the UI and the processor. Well done.

The Problem:
I'm using

state.createAndAddParameter(... NormalisableRange<float>(-100.0f, 0.0f, -6.0f, skewFactor))

where skewFactor is calculated as is Slider::setSkewFactorFromMidPoint(); roughtly 11.2 in this case.

I then use

new AudioProcessorValueTreeState::SliderAttachment(filter->state, "gain", *gain)

in my AudioProcessorEditor to keep the values in sync.

While the double-click return value is set, the skew is not.

The fix is to simply add:

slider.setSkewFactor(range.skew);

in juce_AudioProcessorValueTreeState.cpp(384)

kAudioUnitProperty_SupportsMPE clash - can't build on Xcode 8

juce::kAudioUnitProperty_SupportsMPE is defined in juce_AudioUnitPluginFormat.h as a "Custom AudioUnit property used to indicate MPE support" with value 75001. :: kAudioUnitProperty_SupportsMPE, which shares the exact same name, is defined in the macOS 10.12 SDK (comes with Xcode 8 beta) and has the value 58.

The JUCE demo plugin fails building in Xcode 8 due to this clash in two locations in the code which reference kAudioUnitProperty_SupportsMPE without qualifying its namespace.

(Previously reported in the forum)

Projucer menu item "Close all documents" does not always do what it says

  1. detailed steps on how to reproduce the bug, preferably with already
    existing JUCE code such as the demo plugin or the demo code

Open any .jucer project, and open lots of source files of the project in the Projucer (like 20 or more).
Then click the menu item "Close all documents".
Sometimes a bunch of files will get closed leaving many still open, sometimes only 1 file will close, and sometimes all will close. I didn't notice a pattern as to when this goes wrong...
Note that this happens even when you don't make any changes to the files, and after closing them all manually, they are still unmodified (so it's not that the Projucer modifies some of them and it keeps them from being closed or something).

  1. the expected behaviour

All open documents should be closed (and for all files that were changed, a Save dialog box should be shown, but this is irrelevant for this bug I think as it also happens when nothing was changed).
Post-condition: no document should still be open after this command.

  1. the operating system

Windows 7 64-bit, English, latest service packs and updates.

  1. the architecture (32-bit or 64-bit)

64-bit release version of the Projucer.

  1. a stack trace - if the bug causes a crash

(not a crashing bug)

It's there for a long time already, but to make sure it's there with the latest versions, I just pulled the Juce develop branch, rebuilt the Projucer and also tried in that very last version: same problem.

It's not critical, but rather anoying if you have lots of files open.

AudioProcessorValueTreeState: VST3 doesn't use interval value of Parameter

  1. steps: create a plugin with the AudioProcessorValueTeeState. use createAndAddParameter and specify an interval value with the NormelisableRange
  2. expected behavior: The DAW uses the interval value and the value jumps between the different intervals, but with VST3 all values are possible. It's working as expected with VST and AU but not with VST3
  3. OS: any
  4. architecture any
  5. Stack Trace not applicable
  6. format VST3
  7. DAWs tested: Plugin-Host, Reaper

Memory leak: ChoicePropertyComponent with CallOutBox

I get a memory leak when I combine a PropertyPanel with CallOutBox::launchAsynchronously. The problem only occurs when:

  1. The PropertyPanel includes a ChoicePropertyComponent.
  2. The application exits before the CallOutBox is destroyed.
JUCE v4.3.0
JUCE Assertion failure in juce_DeletedAtShutdown.cpp:70

If the CallOutBox is destroyed before the application quits, or if there is no ChoicePropertyComponent in the PropertyPanel, then there is no problem. I am on OSX 10.10.

Many apologies if this is user error. Below is a diff which should reproduce the problem in the JUCE demo application. Hit the "Click to change color..." button on the "Buttons" tab of the "Tabs and Widgets" section.

diff --git a/examples/Demo/Source/Demos/WidgetsDemo.cpp b/examples/Demo/Source/Demos/WidgetsDemo.cpp
index f5886f8..eb60728 100644
--- a/examples/Demo/Source/Demos/WidgetsDemo.cpp
+++ b/examples/Demo/Source/Demos/WidgetsDemo.cpp
@@ -78,14 +78,22 @@ public:
 
     void clicked() override
     {
-        ColourSelector* colourSelector = new ColourSelector();
-        colourSelector->setName ("background");
-        colourSelector->setCurrentColour (findColour (TextButton::buttonColourId));
-        colourSelector->addChangeListener (this);
-        colourSelector->setColour (ColourSelector::backgroundColourId, Colours::transparentBlack);
-        colourSelector->setSize (300, 400);
-
-        CallOutBox::launchAsynchronously (colourSelector, getScreenBounds(), nullptr);
+        Value foo;
+        StringArray keys;
+        Array<var> vals;
+
+        keys.add("key");
+        vals.add("value");
+        ChoicePropertyComponent *colours = new ChoicePropertyComponent(foo,
+                                                                       "foo",
+                                                                       keys,
+                                                                       vals);
+        Array<PropertyComponent*> comps;
+        comps.add(colours);
+        PropertyPanel *panel = new PropertyPanel;
+        panel->addSection("Foo", comps);
+        panel->setSize(128, 128);
+        CallOutBox::launchAsynchronously (panel, getScreenBounds(), nullptr);
     }
 
     void changeListenerCallback (ChangeBroadcaster* source) override

AudioProcessorValueTreeState: valueToTextFunction, textToValueFunction

  1. steps: create a plugin with the AudioProcessorValueTeeState. use createAndAddParameter, but don't specify a valueToTextFunction or textToValueFunction
  2. expected behavior: the plugins shows an unnormalised Value in its parameter list (any DAW, but most easily visble in the Plugin Host). For example I added a parameter 0% - 100% and the hosts show it as 0.0% - 1.0%
  3. OS: any
  4. architecture any
  5. Stack Trace not applicable
  6. format VST, VST3, AU
  7. DAWs tested: Plugin-Host, Ableton, Reaper

timerExists assert hit in ~Timer() when destroyed from DeletedAtShutdown

If creating & deleting a Timer class from an DeletedAtShutdown object it is possible to hit the following assert in removeTimer()

void removeTimer (Timer* const t) noexcept { #if JUCE_DEBUG // trying to remove a timer that's not here - shouldn't get to this point, // so if you get this assertion, let me know! jassert (timerExists (t)); #endif

The issue can be seen under the following circumstances:

  1. A Timer/DeletedAtShutdown object is created
  2. startTimer() creates Timer::TimerThead
  3. DeletedAtShutdown::deleteAll() called
  4. Timer::TimerThread destroyed
  5. startTimer() creates a new Timer::TimerThead
  6. Timer/DeletedAtShutdown destroyed
  7. Timer/DeletedAtShutdown removeTimer() called on new Timer::TimerThead which asserts

DrawableRectangle doesn't work in DrawableButton

In latest develop branch, (as well as in older versions as when reported previously in the forum),
if we change the JUCE Demo's WidgetsDemo.cpp to use DrawableRectangles in its DrawableButton, the buttons become invisible.

Happened on OS X 10.11.6 but I believe that this happens on all platforms as the linked forum post also explains the bug and suggests a fix.

Number of input / output channels is incorrect in prepareToPlay() for certain VST3 plugins

If the constructor in GainPlugIn is changed to just AudioProcessor(), and isBusesLayoutSupported is altered to support a channel config of {2, 2}, then prepareToPlay is called with {0, 0} input / output channels (instead of the expected {2, 2}).

Notes:

  • processBlock is correctly called with {2, 2} channels.
  • prepareToPlay is called before any calls to isBusesLayoutSupported are observed. Is this expected?
  • Tested in REAPER, Mac OS X 10.11, JUCE 4.3.0

OpenGL in VST plugins in Wavelab on OS X doesn't work

The fix for #88 also made OpenGL not work in VST2 plugins in Steinberg's Wavelab (both on 7.2.1 build 600 and Wavelab Elements 9.0.20 build 585). This is due to Wavelab moving the plugin window off-screen and then back, which causes the OpenGL contexts to detach but not get reattached. I guess NSViewComponentPeer::redirectWillMoveToWindow shouldn't call detach but do something that doesn't interfere with the context reattaching later?

Windows Start Key not accessible usign ModiferKeys

https://forum.juce.com/t/start-modifier-key/17556

Testing of the Start key is required for implementing some AAX/Protools specific features as Protools treats it like a regular modifier key.

In particular Control-Alt-Start plus clicking on parameter is supposed to be handled in some special way.

Suggest isStartDown() etc. should be added to the ModifierKeys class, even though this may only apply on Windows systems. (We already have special handling for Command/Ctrl in there...)

NDK-bundle on Windows only detects up to version 11c

Please include:

  1. On clean system, after downloading the ndk from android-studio (version 13, right now) it wont detect it. Also tried with version 12 and was a no go.

Version 11C and belowwill detect it ok

  1. In the tools preferece for ndk-bundle its not detected in version 12 and above
  2. Windows, tested 7,8,10
  3. 64-bit

D82 Sonic Maximizer Crashes Juce Plugin Host

On latest tip, compiled the plugin host demo
Running Windows 7 x64
64 bit version of host.
VST version of plugin (Only available)

I Use the host load vst plugin(D82 Sonic Maximizer)

An error code in this file ( juce_VSTPluginFormat.cpp )

void closeEffect (VstEffectInterface* eff)
{
eff->dispatchFunction (eff, plugInOpcodeClose, 0, 0, 0, 0);
}

I usr vs 2015 to debug the error below:

ntdll.dll!_RtlReportCriticalFailure@8�()	未知
ntdll.dll!_RtlpReportHeapFailure@4�()	未知
ntdll.dll!_RtlpLogHeapFailure@24�()	未知
ntdll.dll!_RtlFreeHeap@12�()	未知
kernel32.dll!_HeapFree@12�()	未知
D82 Sonic Maximizer .dll!0d482d3a()	未知
[下面的框架可能不正确和/或缺失,没有为 D82 Sonic Maximizer .dll 加载符号]	
D82 Sonic Maximizer .dll!0d471223()	未知
D82 Sonic Maximizer .dll!0d472a78()	未知
D82 Sonic Maximizer .dll!0d476ded()	未知

Plugin Host.exe!juce::ModuleHandle::closeEffect(juce::anonymous-namespace'::VstEffectInterface * eff) 行 444 C++ Plugin Host.exe!juce::VSTPluginInstance::cleanup() 行 658 C++ Plugin Host.exe!juce::VSTPluginInstance::~VSTPluginInstance'::`5'::VSTDeleter::messageCallback() 行 620 C++
Plugin Host.exe!juce::WindowsMessageHelpers::dispatchMessageFromLParam(long lParam) 行 49 C++
Plugin Host.exe!juce::MessageManager::dispatchNextMessageOnSystemQueue(bool returnIfNoPendingMessages) 行 122 C++
Plugin Host.exe!juce::MessageManager::runDispatchLoop() 行 130 C++
Plugin Host.exe!juce::JUCEApplicationBase::main() 行 244 C++
Plugin Host.exe!WinMain(HINSTANCE__ * formal, HINSTANCE * __formal, char * __formal, int __formal) 行 136 C++
[外部代码]

What causes this problem ??? How to fix. ths.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.