Using Juce in a 64 bit VST plugin (bis)

Hi list,

I’m really struggling to get my 32/64-bit VST plugin running in combination with JUCE.
I already upgraded to the very last version of Juce (1.54.27). I only encounter problems in 64-bit hosts (eg. Plogue Bidule, Cubase 6).
It seems to be a problem of shared allocation space between different 64-bit plugins.
Because I couldn’t really find a solution to my problem, I downloaded the tutorial project from the VSTGUI4.0 library.
It uses VSTSDK2.4 in combination with VSTGUI4.0.
I included the juce_amalgamated.mm file in the XCode project, and added the different frameworks Juce needs to compile.
The only thing is that I added a Juce object to the plugin class (a StrinArray in this case). (and the include statement).
Nothing else changed.
This works in 32-bit, but not in 64-bit. It seems to have a problem with clearing memory. The crash logs are included below the code.
When I remove the statement, the plugin work without crash.

#ifndef __TutorialVST2Effect__
#define __TutorialVST2Effect__

#include "public.sdk/source/vst2.x/audioeffectx.h"

#include "TutorialParameters.h"

#include "juce.h"

class TutorialVST2Effect : public AudioEffectX
{
public:
	TutorialVST2Effect (audioMasterCallback audioMaster);

	void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames);

	void setParameter (VstInt32 index, float value);
	float getParameter (VstInt32 index);

protected:
	float parameters[kNumParameters];
    
    StringArray presets;
};

#endif // __TutorialVST2Effect__

[quote]Process: Plogue Bidule [1833]
Path: /Applications/Plogue Bidule 0.9716 (64-bit)/Plogue Bidule.app/Contents/MacOS/Plogue Bidule
Identifier: com.plogue.bidule
Version: 0.9716 (0.9716)
Code Type: X86-64 (Native)
Parent Process: launchd [192]

Date/Time: 2011-11-09 10:23:27.894 +0100
OS Version: Mac OS X 10.6.8 (10K549)
Report Version: 6

Interval Since Last Report: 244596 sec
Crashes Since Last Report: 119
Per-App Interval Since Last Report: 9277 sec
Per-App Crashes Since Last Report: 30
Anonymous UUID: 16B7315C-82FC-4449-B960-4DA34A3CE4E1

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 com.apple.carbonbundletemplate 0x000000011ad6edbc juce::CharPointer_UTF8::getAddress() const + 12 (juce_amalgamated.h:2529)
1 com.apple.carbonbundletemplate 0x000000011ad7a4b8 juce::StringHolder::bufferFromText(juce::CharPointer_UTF8 const&) + 24 (juce_amalgamated.cpp:11976)
2 com.apple.carbonbundletemplate 0x000000011ae863c8 juce::StringHolder::release(juce::CharPointer_UTF8 const&) + 24 (juce_amalgamated.cpp:11929)
3 com.apple.carbonbundletemplate 0x000000011ab27f4a juce::String::~String() + 24 (juce_amalgamated.cpp:12010)
4 com.apple.carbonbundletemplate 0x000000011af2b08a juce::Array<juce::String, juce::DummyCriticalSection>::~Array() + 46 (juce_amalgamated.h:6963)
5 com.apple.carbonbundletemplate 0x000000011aba5803 juce::StringArray::~StringArray() + 59 (juce_amalgamated.cpp:14232)
6 com.apple.carbonbundletemplate 0x000000011a92c8ee TutorialVST2Effect::~TutorialVST2Effect() + 64 (TutorialVST2Effect.h:44)
7 com.apple.carbonbundletemplate 0x000000011a926c00 AudioEffect::dispatchEffectClass(AEffect*, int, int, long long, void*, float) + 136 (audioeffect.cpp:29)
8 com.plogue.bidule 0x00000001004a1498 plogue::VSTFactory::getVSTInfos(std::string const&, std::string const&, std::vector<plogue::VSTInfo, std::allocatorplogue::VSTInfo >&) + 3000
9 com.plogue.bidule 0x00000001004a9ef5 plogue::VSTFactory::updateCache(wxArrayString*) + 2645
10 com.plogue.bidule 0x00000001004abba6 plogue::VSTFactory::internalUpdate() + 870
11 com.plogue.bidule 0x00000001004ad32f plogue::VSTFactory::update() + 15
12 com.plogue.bidule 0x00000001004ad892 plogue::VSTFactory::VSTFactory() + 1202
13 com.plogue.bidule 0x00000001003491ee plogue::factory::Factory() + 798
14 com.plogue.bidule 0x00000001000d3956 plogue::BiduleApp::OnInit() + 25222
15 com.plogue.bidule 0x0000000100c6d51b wxApp::CallOnInit() + 43
16 com.plogue.bidule 0x0000000100ba056b wxEntry(int&, wchar_t**) + 43
17 com.plogue.bidule 0x00000001000c72c2 main + 34
18 com.plogue.bidule 0x000000010004cf78 start + 52

Thread 1: Dispatch queue: com.apple.libdispatch-manager
0 libSystem.B.dylib 0x00007fff855b8c0a kevent + 10
1 libSystem.B.dylib 0x00007fff855baadd _dispatch_mgr_invoke + 154
2 libSystem.B.dylib 0x00007fff855ba7b4 _dispatch_queue_invoke + 185
3 libSystem.B.dylib 0x00007fff855ba2de _dispatch_worker_thread2 + 252
4 libSystem.B.dylib 0x00007fff855b9c08 _pthread_wqthread + 353
5 libSystem.B.dylib 0x00007fff855b9aa5 start_wqthread + 13

Thread 2:
0 libSystem.B.dylib 0x00007fff855b9a2a __workq_kernreturn + 10
1 libSystem.B.dylib 0x00007fff855b9e3c _pthread_wqthread + 917
2 libSystem.B.dylib 0x00007fff855b9aa5 start_wqthread + 13

Thread 3:
0 libSystem.B.dylib 0x00007fff8559fdce semaphore_timedwait_trap + 10
1 libSystem.B.dylib 0x00007fff855de822 _pthread_cond_wait + 1191
2 com.plogue.bidule 0x00000001007d0db6 plogue::Condition::waitFor(unsigned int) + 86
3 com.plogue.bidule 0x000000010043898c plogue::Streamer::entry() + 444
4 com.plogue.bidule 0x00000001007cfe7b plogue::ThreadDetached::Entry(plogue::ThreadDetached*) + 27
5 libSystem.B.dylib 0x00007fff855d8fd6 _pthread_start + 331
6 libSystem.B.dylib 0x00007fff855d8e89 thread_start + 13

Thread 4:
0 libSystem.B.dylib 0x00007fff855b9a2a __workq_kernreturn + 10
1 libSystem.B.dylib 0x00007fff855b9e3c _pthread_wqthread + 917
2 libSystem.B.dylib 0x00007fff855b9aa5 start_wqthread + 13

Thread 5:
0 libSystem.B.dylib 0x00007fff855daa6a __semwait_signal + 10
1 libSystem.B.dylib 0x00007fff855de881 _pthread_cond_wait + 1286
2 com.plogue.bidule 0x00000001007d0eec plogue::Condition::wait() + 44
3 com.plogue.bidule 0x00000001007dbcde plogue::DSPWorkerThread::entry() + 318
4 com.plogue.bidule 0x00000001007cfe7b plogue::ThreadDetached::Entry(plogue::ThreadDetached*) + 27
5 libSystem.B.dylib 0x00007fff855d8fd6 _pthread_start + 331
6 libSystem.B.dylib 0x00007fff855d8e89 thread_start + 13

Thread 6:
0 libSystem.B.dylib 0x00007fff8559fd7a mach_msg_trap + 10
1 libSystem.B.dylib 0x00007fff855a03ed mach_msg + 59
2 com.apple.audio.midi.CoreMIDI 0x0000000101aa89c1 XServerMachPort::ReceiveMessage(int&, void*, int&) + 155
3 com.apple.audio.midi.CoreMIDI 0x0000000101ac573d MIDIProcess::RunMIDIInThread() + 147
4 com.apple.audio.midi.CoreMIDI 0x0000000101aa9ace XThread::RunHelper(void*) + 10
5 com.apple.audio.midi.CoreMIDI 0x0000000101aa9509 CAPThread::Entry(CAPThread*) + 67
6 libSystem.B.dylib 0x00007fff855d8fd6 _pthread_start + 331
7 libSystem.B.dylib 0x00007fff855d8e89 thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000103142ad0 rcx: 0x0000000000000000 rdx: 0x0000000000000008
rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x00007fff5fbf9700 rsp: 0x00007fff5fbf9700
r8: 0x0000000000000000 r9: 0x0000000000000001 r10: 0x0000000000000011 r11: 0x00000000103142ae
r12: 0x00007fff5fbfa358 r13: 0x00007fff5fbfa2d0 r14: 0x00007fff5fbfa330 r15: 0x0000000103142ba0
rip: 0x000000011ad6edbc rfl: 0x0000000000010202 cr2: 0x0000000000000000

Binary Images:
0x100000000 - 0x101300ff7 +com.plogue.bidule 0.9716 (0.9716) <96D4A262-11BA-6608-A9E1-57DAF5071D4F> /Applications/Plogue Bidule 0.9716 (64-bit)/Plogue Bidule.app/Contents/MacOS/Plogue Bidule
0x101a9a000 - 0x101aeaff7 com.apple.audio.midi.CoreMIDI 1.7.1 (42) /System/Library/Frameworks/CoreMIDI.framework/Versions/A/CoreMIDI
0x101b12000 - 0x101b18ff7 com.apple.agl 3.0.12 (AGL-3.0.12) <1AB34F57-2E8D-42FB-A484-5CCB928CA456> /System/Library/Frameworks/AGL.framework/Versions/A/AGL
0x101b1f000 - 0x101b4bfff com.apple.audio.CoreAudioKit 1.6.1 (1.6.1) <0C84B53D-4B09-FDD4-8CC0-2C7AE26D78D9> /System/Library/Frameworks/CoreAudioKit.framework/Versions/A/CoreAudioKit
0x101fea000 - 0x101fecfef com.apple.textencoding.unicode 2.3 (2.3) /System/Library/TextEncodings/Unicode Encodings.bundle/Contents/MacOS/Unicode Encodings
0x101ff4000 - 0x101ff8fff com.apple.audio.AudioIPCPlugIn 1.1.6 (1.1.6) <917E3DC8-E34D-B130-F61F-50808466E674> /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn
0x1037d5000 - 0x1037dbff7 com.apple.audio.AppleHDAHALPlugIn 2.0.5 (2.0.5f14) /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn
0x115ee0000 - 0x115f1dfff +com.plogue.PLAF ??? (0.001) /Applications/Plogue Bidule 0.9716 (64-bit)/Plogue Bidule.app/Contents/Resources/PLAF.bundle/Contents/MacOS/PLAF
0x115f38000 - 0x115fa1ff7 +com.mega-nerd.libsndfile 1.0.18 (1.0.18) <8B019CFB-3BEE-E0F8-C5D3-9650C41829DC> /Applications/Plogue Bidule 0.9716 (64-bit)/Plogue Bidule.app/Contents/Resources/libsndfile.bundle/Contents/MacOS/libsndfile
0x11a923000 - 0x11b456fff com.apple.carbonbundletemplate 1.0 (1.0) /Library/Audio/Plug-Ins/VST/tutorial.vst/Contents/MacOS/tutorial
0x7fff5fc00000 - 0x7fff5fc3bdef dyld 132.1 (???) /usr/lib/dyld
0x7fff802c8000 - 0x7fff80317fef libTIFF.dylib ??? (???) <1E2593D1-A7F6-84C6-DF8F-0B46AE445926> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
0x7fff80318000 - 0x7fff80318ff7 com.apple.CoreServices 44 (44) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x7fff8047a000 - 0x7fff8054efe7 com.apple.CFNetwork 454.12.4 (454.12.4) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x7fff805fc000 - 0x7fff805fefff libRadiance.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
0x7fff8062f000 - 0x7fff8066afff com.apple.AE 496.5 (496.5) <208DF391-4DE6-81ED-C697-14A2930D1BC6> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x7fff80756000 - 0x7fff80799ff7 libRIP.A.dylib 545.0.0 (compatibility 64.0.0) <5FF3D7FD-84D8-C5FA-D640-90BB82EC651D> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib
0x7fff8079a000 - 0x7fff807d6fe7 libcurl.4.dylib 6.1.0 (compatibility 6.0.0) <1E041185-131C-C237-C250-38BE933A269A> /usr/lib/libcurl.4.dylib
0x7fff807e9000 - 0x7fff80875fef SecurityFoundation ??? (???) <6860DE26-0D42-D1E8-CD7C-5B42D78C1E1D> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
0x7fff8087e000 - 0x7fff8088fff7 libz.1.dylib 1.2.3 (compatibility 1.0.0) /usr/lib/libz.1.dylib
0x7fff80890000 - 0x7fff8128aff7 com.apple.AppKit 6.6.8 (1038.36) <4CFBE04C-8FB3-B0EA-8DDB-7E7D10E9D251> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x7fff8128b000 - 0x7fff8128eff7 com.apple.securityhi 4.0 (36638) <38935851-09E4-DDAB-DB1D-30ADC39F7ED0> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
0x7fff8128f000 - 0x7fff8198bff7 com.apple.CoreGraphics 1.545.0 (???) <58D597B1-EB3B-710E-0B8C-EC114D54E11B> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x7fff819bc000 - 0x7fff819bdfff liblangid.dylib ??? (???) /usr/lib/liblangid.dylib
0x7fff81a98000 - 0x7fff81ac3ff7 libxslt.1.dylib 3.24.0 (compatibility 3.0.0) <8AB4CA9E-435A-33DA-7041-904BA7FA11D5> /usr/lib/libxslt.1.dylib
0x7fff81ac4000 - 0x7fff81ad9ff7 com.apple.LangAnalysis 1.6.6 (1.6.6) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
0x7fff81b2a000 - 0x7fff81ba9fe7 com.apple.audio.CoreAudio 3.2.6 (3.2.6) <79E256EB-43F1-C7AA-6436-124A4FFB02D0> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x7fff81baa000 - 0x7fff81c0afe7 com.apple.framework.IOKit 2.0 (???) <4F071EF0-8260-01E9-C641-830E582FA416> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x7fff81c1a000 - 0x7fff81c1bff7 com.apple.TrustEvaluationAgent 1.1 (1) <306FD9EE-A301-41D5-EBDE-2FC52F28229C> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent
0x7fff81c1c000 - 0x7fff81c1ffff com.apple.help 1.3.2 (41.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
0x7fff81c20000 - 0x7fff81d97fe7 com.apple.CoreFoundation 6.6.6 (550.44) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff81da6000 - 0x7fff81dedff7 com.apple.coreui 2 (114) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
0x7fff81dee000 - 0x7fff81dfdfef com.apple.opengl 1.6.13 (1.6.13) <516098B3-4517-8A55-64BB-195CDAA5334D> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x7fff81dfe000 - 0x7fff81e05fff com.apple.OpenDirectory 10.6 (10.6) <4200CFB0-DBA1-62B8-7C7C-91446D89551F> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
0x7fff81e06000 - 0x7fff82e37ff7 com.apple.WebCore 6534.51 (6534.51.22) <7B51D5D9-55E4-610C-0FBD-E04C9D3F87BA> /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore
0x7fff82e86000 - 0x7fff82e8aff7 libCGXType.A.dylib 545.0.0 (compatibility 64.0.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGXType.A.dylib
0x7fff82e8b000 - 0x7fff82ee0ff7 com.apple.framework.familycontrols 2.0.2 (2020) /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyControls
0x7fff82ee1000 - 0x7fff83051fff com.apple.QTKit 7.7 (1787) /System/Library/Frameworks/QTKit.framework/Versions/A/QTKit
0x7fff83052000 - 0x7fff8309bfef libGLU.dylib ??? (???) <1C050088-4AB2-2BC2-62E6-C969F925A945> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x7fff8309c000 - 0x7fff8309fff7 libCoreVMClient.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
0x7fff830a0000 - 0x7fff830bbff7 com.apple.openscripting 1.3.1 (???) <5A6ECC32-04D0-9A62-635D-1DD03EC6E190> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
0x7fff83125000 - 0x7fff8323ffef libGLProgrammability.dylib ??? (???) <8A4B86E3-0FA7-8684-2EF2-C5F8079428DB> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgrammability.dylib
0x7fff83240000 - 0x7fff83338ff7 libiconv.2.dylib 7.0.0 (compatibility 7.0.0) /usr/lib/libiconv.2.dylib
0x7fff83339000 - 0x7fff83339ff7 com.apple.Cocoa 6.6 (???) <68B0BE46-6E24-C96F-B341-054CF9E8F3B6> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
0x7fff8333a000 - 0x7fff833a4fe7 libvMisc.dylib 268.0.1 (compatibility 1.0.0) <7D8B6D68-7E70-2AF2-BF9F-2CD56145909C> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x7fff833a5000 - 0x7fff833e2ff7 libFontRegistry.dylib ??? (???) <4C3293E2-851B-55CE-3BE3-29C425DD5DFF> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib
0x7fff833e3000 - 0x7fff8366dfff com.apple.JavaScriptCore 6534.51 (6534.51.21) <848CAF7C-CDC4-A280-378C-24A701BA6F1A> /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore
0x7fff8366e000 - 0x7fff839a2fef com.apple.CoreServices.CarbonCore 861.39 (861.39) <1386A24D-DD15-5903-057E-4A224FAF580B> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x7fff83a54000 - 0x7fff83a5aff7 com.apple.CommerceCore 1.0 (9.1) <3691E9BA-BCF4-98C7-EFEC-78DA6825004E> /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Frameworks/CommerceCore.framework/Versions/A/CommerceCore
0x7fff83a5b000 - 0x7fff83af5fff com.apple.ApplicationServices.ATS 275.19 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
0x7fff83af6000 - 0x7fff83b40ff7 com.apple.Metadata 10.6.3 (507.15) <2EF19055-D7AE-4D77-E589-7B71B0BC1E59> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
0x7fff83b41000 - 0x7fff83b4cff7 com.apple.speech.recognition.framework 3.11.1 (3.11.1) <60484D84-BA63-13DD-50E9-ABDA402C3C45> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
0x7fff83b4d000 - 0x7fff83bbeff7 com.apple.AppleVAFramework 4.10.27 (4.10.27) <6CDBA3F5-6C7C-A069-4716-2B6C3AD5001F> /System/Library/PrivateFrameworks/AppleVA.framework/Versions/A/AppleVA
0x7fff83c09000 - 0x7fff83c87ff7 com.apple.CoreText 151.10 (???) <54961997-55D8-DC0F-2634-674E452D5A8E> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText
0x7fff83c88000 - 0x7fff83caaff7 libexpat.1.dylib 7.2.0 (compatibility 7.0.0) <8EC31253-B585-D05E-F35D-AE3292FB790B> /usr/lib/libexpat.1.dylib
0x7fff83d31000 - 0x7fff83d62fff libGLImage.dylib ??? (???) <7F102A07-E4FB-9F52-B2F6-4E2D2383CA13> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
0x7fff83d64000 - 0x7fff83da5fff com.apple.SystemConfiguration 1.10.8 (1.10.2) <78D48D27-A9C4-62CA-2803-D0BBED82855A> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x7fff83da6000 - 0x7fff83dcefff com.apple.DictionaryServices 1.1.2 (1.1.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
0x7fff84012000 - 0x7fff840eaff7 com.apple.DiscRecording 5.0.9 (5090.4.2) <1559C58F-ABD2-0C13-7E1D-75450FEC41D4> /System/Library/Frameworks/DiscRecording.framework/Versions/A/DiscRecording
0x7fff84355000 - 0x7fff844f2fe7 com.apple.WebKit 6534.51 (6534.51.22) <957BAD21-4FC4-9A9D-6E8F-644F474D7E30> /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit
0x7fff844f3000 - 0x7fff84937fef libLAPACK.dylib 219.0.0 (compatibility 1.0.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x7fff84938000 - 0x7fff8497dfff com.apple.CoreMediaIOServices 140.0 (1496) /System/Library/PrivateFrameworks/CoreMediaIOServices.framework/Versions/A/CoreMediaIOServices
0x7fff84990000 - 0x7fff849dcfff libauto.dylib ??? (???) /usr/lib/libauto.dylib
0x7fff849e4000 - 0x7fff849fdfff com.apple.CFOpenDirectory 10.6 (10.6) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
0x7fff849fe000 - 0x7fff84a23ff7 com.apple.CoreVideo 1.6.2 (45.6) /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
0x7fff84a24000 - 0x7fff84a73ff7 com.apple.DirectoryService.PasswordServerFramework 6.1 (6.1) <01B370FB-D524-F660-3826-E85B7F0D85CD> /System/Library/PrivateFrameworks/PasswordServer.framework/Versions/A/PasswordServer
0x7fff84b0b000 - 0x7fff84b88fef libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <35ECA411-2C08-FD7D-11B1-1B7A04921A5C> /usr/lib/libstdc++.6.dylib
0x7fff84ba4000 - 0x7fff84be5fef com.apple.CoreMedia 0.484.60 (484.60) <6B73A514-C4D5-8DC7-982C-4E4F0231ED77> /System/Library/PrivateFrameworks/CoreMedia.framework/Versions/A/CoreMedia
0x7fff84be6000 - 0x7fff84c06ff7 com.apple.DirectoryService.Framework 3.6 (621.11) /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryService
0x7fff84c6a000 - 0x7fff84cabfef com.apple.QD 3.36 (???) <5DC41E81-32C9-65B2-5528-B33E934D5BB4> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
0x7fff84cac000 - 0x7fff84d91fef com.apple.DesktopServices 1.5.11 (1.5.11) <39FAA3D2-6863-B5AB-AED9-92D878EA2438> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
0x7fff84dd6000 - 0x7fff84f14fff com.apple.CoreData 102.1 (251) <782F29CA-ACC7-4A77-5772-52FBE2CEFB5E> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
0x7fff84f15000 - 0x7fff84f15ff7 com.apple.ApplicationServices 38 (38) <10A0B9E9-4988-03D4-FC56-DDE231A02C63> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
0x7fff8523f000 - 0x7fff85253ff7 com.apple.speech.synthesis.framework 3.10.35 (3.10.35) <63C87CF7-56B3-4038-8136-8C26E96AD42F> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x7fff85254000 - 0x7fff8525aff7 com.apple.DiskArbitration 2.3 (2.3) <857F6E43-1EF4-7D53-351B-10DE0A8F992A> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x7fff8559f000 - 0x7fff85760fef libSystem.B.dylib 125.2.11 (compatibility 1.0.0) <9AB4F1D1-89DC-0E8A-DC8E-A4FE4D69DB69> /usr/lib/libSystem.B.dylib
0x7fff85761000 - 0x7fff85767ff7 IOSurface ??? (???) <04EDCEDE-E36F-15F8-DC67-E61E149D2C9A> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
0x7fff85a1d000 - 0x7fff85b45ff7 com.apple.MediaToolbox 0.484.60 (484.60) /System/Library/PrivateFrameworks/MediaToolbox.framework/Versions/A/MediaToolbox
0x7fff85b8e000 - 0x7fff85b8eff7 com.apple.Accelerate.vecLib 3.6 (vecLib 3.6) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x7fff85b8f000 - 0x7fff85c3ffff edu.mit.Kerberos 6.5.11 (6.5.11) <085D80F5-C9DC-E252-C21B-03295E660C91> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
0x7fff85c9f000 - 0x7fff85d3ffff com.apple.LaunchServices 362.3 (362.3) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x7fff85d70000 - 0x7fff85dadfff com.apple.LDAPFramework 2.0 (120.1) <1683330C-2908-9A45-AFF1-2282792C2570> /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP
0x7fff85dae000 - 0x7fff85db0fff com.apple.print.framework.Print 6.1 (237.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
0x7fff85db1000 - 0x7fff86039fef com.apple.security 6.1.2 (55002) <015C9A08-3D07-9462-8E91-DB1924349621> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x7fff860d7000 - 0x7fff86190fff libsqlite3.dylib 9.6.0 (compatibility 9.0.0) <2C5ED312-E646-9ADE-73A9-6199A2A43150> /usr/lib/libsqlite3.dylib
0x7fff8629c000 - 0x7fff862aefe7 libsasl2.2.dylib 3.15.0 (compatibility 3.0.0) <76B83C8D-8EFE-4467-0F75-275648AFED97> /usr/lib/libsasl2.2.dylib
0x7fff862af000 - 0x7fff8646dfff libicucore.A.dylib 40.0.0 (compatibility 1.0.0) <4274FC73-A257-3A56-4293-5968F3428854> /usr/lib/libicucore.A.dylib
0x7fff865ab000 - 0x7fff865c8ff7 libPng.dylib ??? (???) <6D8E515B-E0A2-2BA1-9CAC-8CB8A8B35879> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
0x7fff865c9000 - 0x7fff86603fff libcups.2.dylib 2.8.0 (compatibility 2.0.0) <539EBFDD-96D6-FB07-B128-40232C408757> /usr/lib/libcups.2.dylib
0x7fff86604000 - 0x7fff8664cff7 libvDSP.dylib 268.0.1 (compatibility 1.0.0) <170DE04F-89AB-E295-0880-D69CAFBD7979> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x7fff86652000 - 0x7fff86b58ff7 com.apple.VideoToolbox 0.484.60 (484.60) /System/Library/PrivateFrameworks/VideoToolbox.framework/Versions/A/VideoToolbox
0x7fff86b7d000 - 0x7fff87387fe7 libBLAS.dylib 219.0.0 (compatibility 1.0.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x7fff87388000 - 0x7fff8738cff7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <95718673-FEEE-B6ED-B127-BCDBDB60D4E5> /usr/lib/system/libmathCommon.A.dylib
0x7fff8738d000 - 0x7fff87392ff7 com.apple.CommonPanels 1.2.4 (91) <4D84803B-BD06-D80E-15AE-EFBE43F93605> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
0x7fff8741d000 - 0x7fff8742bff7 libkxld.dylib ??? (???) <8145A534-95CC-9F3C-B78B-AC9898F38C6F> /usr/lib/system/libkxld.dylib
0x7fff8742c000 - 0x7fff87439fe7 libCSync.A.dylib 545.0.0 (compatibility 64.0.0) <1C35FA50-9C70-48DC-9E8D-2054F7A266B1> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib
0x7fff8743a000 - 0x7fff87450fe7 com.apple.MultitouchSupport.framework 207.11 (207.11) <8233CE71-6F8D-8B3C-A0E1-E123F6406163> /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
0x7fff8745a000 - 0x7fff87571fef libxml2.2.dylib 10.3.0 (compatibility 10.0.0) <1B27AFDD-DF87-2009-170E-C129E1572E8B> /usr/lib/libxml2.2.dylib
0x7fff87572000 - 0x7fff87589fff com.apple.ImageCapture 6.1 (6.1) <79AB2131-2A6C-F351-38A9-ED58B25534FD> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
0x7fff8758a000 - 0x7fff87888fff com.apple.HIToolbox 1.6.5 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x7fff87889000 - 0x7fff878bcff7 libTrueTypeScaler.dylib ??? (???) <69D4A213-45D2-196D-7FF8-B52A31DFD329> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libTrueTypeScaler.dylib
0x7fff878bd000 - 0x7fff8794dfff com.apple.SearchKit 1.3.0 (1.3.0) <3403E658-A54E-A79A-12EB-E090E8743984> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x7fff8798b000 - 0x7fff87a68fff com.apple.vImage 4.1 (4.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x7fff87a69000 - 0x7fff87abcff7 com.apple.HIServices 1.8.3 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x7fff87abd000 - 0x7fff87abdff7 com.apple.Accelerate 1.6 (Accelerate 1.6) <2BB7D669-4B40-6A52-ADBD-DA4DB3BC0B1B> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x7fff87ac2000 - 0x7fff87ac7fff libGFXShared.dylib ??? (???) <1D0D3531-9561-632C-D620-1A8652BEF5BC> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
0x7fff88269000 - 0x7fff8828cfff com.apple.opencl 12.3.6 (12.3.6) <42FA5783-EB80-1168-4015-B8C68F55842F> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
0x7fff8828d000 - 0x7fff88312ff7 com.apple.print.framework.PrintCore 6.3 (312.7) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x7fff88313000 - 0x7fff88334fff libresolv.9.dylib 41.0.0 (compatibility 1.0.0) <6993F348-428F-C97E-7A84-7BD2EDC46A62> /usr/lib/libresolv.9.dylib
0x7fff88335000 - 0x7fff885b7fff com.apple.Foundation 6.6.8 (751.63) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x7fff885b8000 - 0x7fff885cefef libbsm.0.dylib ??? (???) <83676D2E-23CD-45CD-BE5C-35FCFFBBBDBB> /usr/lib/libbsm.0.dylib
0x7fff885cf000 - 0x7fff885f6ff7 libJPEG.dylib ??? (???) <46A413EA-4FD1-A050-2EF0-6279F3EAD581> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
0x7fff88b35000 - 0x7fff88ed2fe7 com.apple.QuartzCore 1.6.3 (227.37) <16DFF6CD-EA58-CE62-A1D7-5F6CE3D066DD> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x7fff88ed3000 - 0x7fff88f10ff7 libssl.0.9.8.dylib 0.9.8 (compatibility 0.9.8) /usr/lib/libssl.0.9.8.dylib
0x7fff88f11000 - 0x7fff890cfff7 com.apple.ImageIO.framework 3.0.4 (3.0.4) <0A4F51A1-4502-767B-8A4E-F14C6214EF88> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
0x7fff89add000 - 0x7fff89b9afff com.apple.CoreServices.OSServices 359.2 (359.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x7fff89b9b000 - 0x7fff89c5cfef com.apple.ColorSync 4.6.6 (4.6.6) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x7fff89c8d000 - 0x7fff89c9cfff com.apple.NetFS 3.2.2 (3.2.2) <7CCBD70E-BF31-A7A7-DB98-230687773145> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
0x7fff89c9d000 - 0x7fff89d5efff libFontParser.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib
0x7fff89e3c000 - 0x7fff89f71fff com.apple.audio.toolbox.AudioToolbox 1.6.7 (1.6.7) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x7fff8a20a000 - 0x7fff8a2c0ff7 libobjc.A.dylib 227.0.0 (compatibility 1.0.0) <03140531-3B2D-1EBA-DA7F-E12CC8F63969> /usr/lib/libobjc.A.dylib
0x7fff8a2c1000 - 0x7fff8a2c6fff libGIF.dylib ??? (???) <201B8077-B5CC-11AA-E1B0-1D057ABE416A> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
0x7fff8a2c7000 - 0x7fff8a2c7ff7 com.apple.Carbon 150 (152) <19B37B7B-1594-AD0A-7F14-FA2F85AD7241> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x7fff8a4cb000 - 0x7fff8a580fe7 com.apple.ink.framework 1.3.3 (107) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
0x7fff8a581000 - 0x7fff8a582ff7 com.apple.audio.units.AudioUnit 1.6.7 (1.6.7) <53299948-2554-0F8F-7501-04B34E49F6CF> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x7fff8a583000 - 0x7fff8a597fff libGL.dylib ??? (???) <2ECE3B0F-39E1-3938-BF27-7205C6D0358B> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x7fff8a5b9000 - 0x7fff8a5b9ff7 com.apple.vecLib 3.6 (vecLib 3.6) <08D3D45D-908B-B86A-00BA-0F978D2702A7> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
0x7fff8a5ba000 - 0x7fff8a6d9fe7 libcrypto.0.9.8.dylib 0.9.8 (compatibility 0.9.8) <14115D29-432B-CF02-6B24-A60CC533A09E> /usr/lib/libcrypto.0.9.8.dylib
0x7fffffe00000 - 0x7fffffe01fff libSystem.B.dylib ??? (???) <9AB4F1D1-89DC-0E8A-DC8E-A4FE4D69DB69> /usr/lib/libSystem.B.dylib

Model: MacBookPro6,2, BootROM MBP61.0057.B0C, 2 processors, Intel Core i5, 2.4 GHz, 4 GB, SMC 1.58f15
Graphics: NVIDIA GeForce GT 330M, NVIDIA GeForce GT 330M, PCIe, 256 MB
Graphics: Intel HD Graphics, Intel HD Graphics, Built-In, 288 MB
Memory Module: global_name
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x93), Broadcom BCM43xx 1.0 (5.10.131.42.4)
Network Service: AirPort, AirPort, en1
Serial ATA Device: Hitachi HTS545032B9SA02, 298,09 GB
Serial ATA Device: MATSHITADVD-R UJ-898
USB Device: Hub, 0x0424 (SMSC), 0x2514, 0xfa100000 / 2
USB Device: eLicenser, 0x0819, 0x0101, 0xfa140000 / 5
USB Device: Internal Memory Card Reader, 0x05ac (Apple Inc.), 0x8403, 0xfa130000 / 4
USB Device: Apple Internal Keyboard / Trackpad, 0x05ac (Apple Inc.), 0x0237, 0xfa120000 / 3
USB Device: Hub, 0x0424 (SMSC), 0x2514, 0xfd100000 / 2
USB Device: Microsoft Notebook/Mobile Optical Mouse 2.0, 0x045e (Microsoft Corporation), 0x007d, 0xfd130000 / 5
USB Device: Built-in iSight, 0x05ac (Apple Inc.), 0x8507, 0xfd110000 / 4
USB Device: IR Receiver, 0x05ac (Apple Inc.), 0x8242, 0xfd120000 / 3
[/quote]

And sometimes the following

Nobody?

Could this have something to do with autorelease in cocoa?

Looks like a pretty straightforward dangling pointer type of mistake to me. Use your debugger!

When I put JUCE_CHECK_MEMORY_LEAKS=0 the crash doesn’t occur anymore in this case (simple example plugin provided in the VST SDK).
I don’t use a pointer… I just put StringArray presets as a class member. How can this lead to a dangling pointer?

Still I have some very random crashes when using JUCE classes in other VST plugin. The debugger doesn’t really tell me a lot more. Is it because I’m accessing the JUCE objects from different threads (Audio and GUI)?

Gilles

If you’ve been messing with that stringarray from two threads at once, then yeah, that might just possibly be the problem(!)