Intojucer's Hello World VST kills the host

I’m new to juce, so maybe I’m doing something stupid, but I don’t see what it would be.

The Introjucer’s generated Hello World plugin causes cubase to hang if I unload it while the editor is open. If I close the editor before unloading it, there’s no problem.

I just got the git head about an hour ago.
OSX 10.7.5
Xcode 4.5.1
Cubase 6.5.3

Here’s what I did.

In Introjucer:

  • created a new project named “hello”, type Audio Plug-In
  • unchecked Build AudioUnit
  • set the VST Folder
  • save and open

In xcode:

  • removed juce_AU_Resources.r from the Build Carbon Resources build phase
  • built it

In cubase:

  • started an empty project
  • added an audio track
  • added the hello plug-in as an insert (the editor opened automatically)
  • removed the hello plug-in by selecting No Effect

Cubase became unresponsive after that. I had to force quit.

[code]Date/Time: 2012-10-09 19:22:16 -0400
OS Version: 10.7.5 (Build 11G56)
Architecture: x86_64
Report Version: 9

Command: Cubase
Path: /Applications/Cubase 6.app/Contents/MacOS/Cubase 6
Version: 6.5.3.153 (6.5.3.153)
Parent: launchd [158]

PID: 19457
Event: hang
Duration: 1.25s
Steps: 14 (100ms sampling interval)

Pageins: 0
Pageouts: 0

Process: Cubase 6 [19457] (zombie)
Path: /Applications/Cubase 6.app/Contents/MacOS/Cubase 6
Architecture: i386
UID: 501

Thread 0x3cbf96
User stack:
13 ??? (in Cubase 6) [0xe3766]
13 ??? (in Cubase 6) [0x12468fc]
13 ??? (in Cubase 6) [0xdc0f1b]
13 CSOLOISTExtendedAnalysis::~CSOLOISTExtendedAnalysis() + 721084 (in Cubase 6) [0x138995c]
13 CSOLOISTExtendedAnalysis::~CSOLOISTExtendedAnalysis() + 1018512 (in Cubase 6) [0x13d2330]
13 CSOLOISTExtendedAnalysis::~CSOLOISTExtendedAnalysis() + 3267860 (in Cubase 6) [0x15f75b4]
13 CSOLOISTExtendedAnalysis::~CSOLOISTExtendedAnalysis() + 3263258 (in Cubase 6) [0x15f63ba]
13 -[NSApplication run] + 791 (in AppKit) [0x92788a49]
13 -[NSAutoreleasePool drain] + 131 (in Foundation) [0x9a49876e]
13 _CFAutoreleasePoolPop + 53 (in CoreFoundation) [0x93e4fe05]
13 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 404 (in libobjc.A.dylib) [0x9c144c58]
13 _objc_rootRelease + 47 (in libobjc.A.dylib) [0x9c14354e]
13 -[__NSArrayI dealloc] + 246 (in CoreFoundation) [0x93e6d8e6]
6 objc_msgSend + 34 (in libobjc.A.dylib) [0x9c141d52]
4 objc_msgSend + 44 (in libobjc.A.dylib) [0x9c141d5c]
3 objc_msgSend + 48 (in libobjc.A.dylib) [0x9c141d60]
Kernel stack:
13 hndl_allintrs + 290 (in mach_kernel) [0xffffff80002da712]
13 interrupt + 192 (in mach_kernel) [0xffffff80002c48d0]
13 lapic_interrupt + 121 (in mach_kernel) [0xffffff80002c9ab9]
13 cpu_signal_handler + 172 (in mach_kernel) [0xffffff80002cb9ac]
13 sync_iss_to_iks + 118 (in mach_kernel) [0xffffff80002c3c76]
1 return_from_trap + 156 (in mach_kernel) [0xffffff80002da52c]
1 i386_astintr + 42 (in mach_kernel) [0xffffff80002c3d3a]
1 ast_taken + 211 (in mach_kernel) [0xffffff800021e143]
1 bsd_ast + 837 (in mach_kernel) [0xffffff8000553755]
1 postsig + 632 (in mach_kernel) [0xffffff8000551d18]
1 exit1 + 425 (in mach_kernel) [0xffffff8000544d49]
1 task_terminate_internal + 400 (in mach_kernel) [0xffffff80002378f0]
1 ipc_space_destroy + 157 (in mach_kernel) [0xffffff800021a1fd]
1 ipc_right_clean + 398 (in mach_kernel) [0xffffff80002199ae]
1 mach_notify_no_senders + 105 (in mach_kernel) [0xffffff80002516f9]
1 mach_msg_send_from_kernel_proper + 51 (in mach_kernel) [0xffffff8000223223]
1 ipc_kmsg_send + 105 (in mach_kernel) [0xffffff80002148a9]
1 ipc_kobject_server + 373 (in mach_kernel) [0xffffff80002230b5]
1 iokit_notify + 146 (in mach_kernel) [0xffffff800029c122]
1 iokit_client_died + 135 (in mach_kernel) [0xffffff8000657c37]
1 IOAccelerationUserClient::clientClose() + 38 (in IOGraphicsFamily) [0xffffff7f80d2b438]
1 IOService::terminate(unsigned int) + 12 (in mach_kernel) [0xffffff8000623068]
1 IOService::terminatePhase1(unsigned int) + 821 (in mach_kernel) [0xffffff8000628a5f]
1 IOService::deliverNotification(OSSymbol const*, unsigned int, unsigned int) + 151 (in mach_kernel) [0xffffff80006265b1]
1 IOService::passiveMatch(OSDictionary*, bool) + 217 (in mach_kernel) [0xffffff800062569f]
1 OSMetaClassBase::metaCast(OSString const*) const + 37 (in mach_kernel) [0xffffff80005e3893]
1 OSMetaClass::checkMetaCastWithName(OSSymbol const*, OSMetaClassBase const*) + 54 (in mach_kernel) [0xffffff80005e34b0]
1 OSDictionary::getObject(OSSymbol const*) const + 45 (in mach_kernel) [0xffffff80005e766f][/code]

Well, there’s nothing in the stack trace that belongs to a plugin, so could just be cubase doing something strange. Did you try any other hosts? And did you try building the juce demo plugin?

I don’t have other hosts to try. With the JuceDemoPlugin instead of hanging, the host crashes. But otherwise, it’s the same problem. If I close the editor before unloading it, it’s fine.

To avoid the rez error, I changed some things.

  • set JucePlugin_Build_AU to 0 in AppConfig.h
  • removed juce_AU_Resources.r from the Build Carbon Resources build phase
  • removed the references to the AU SDK

[code]Process: Cubase 6 [3562]
Path: /Applications/Cubase 6.app/Contents/MacOS/Cubase 6
Identifier: com.steinberg.cubase
Version: 6.5.3.153 (6.5.3.153)
Code Type: X86 (Native)
Parent Process: launchd [147]

Date/Time: 2012-10-10 19:03:42.891 -0400
OS Version: Mac OS X 10.7.5 (11G63)
Report Version: 9

Interval Since Last Report: 66014 sec
Crashes Since Last Report: 2
Per-App Interval Since Last Report: 1690 sec
Per-App Crashes Since Last Report: 2
Anonymous UUID: 6255AE62-BCDF-446A-BD6D-E85299B4D1F8

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000003470756f

VM Regions Near 0x3470756f:
mapped file 0000000029111000-0000000029611000 [ 5120K] rw-/rwx SM=ALI /private/tmp/*
–>
MALLOC_TINY 0000000035200000-0000000035300000 [ 1024K] rw-/rwx SM=PRV

Application Specific Information:
objc_msgSend() selector name: release
objc[3562]: garbage collection is OFF

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x99fe4d5c objc_msgSend + 44
1 com.apple.CoreFoundation 0x9b283039 CFRelease + 169
2 com.apple.CoreFoundation 0x9b2cb8e6 -[__NSArrayI dealloc] + 246
3 libobjc.A.dylib 0x99fe654e _objc_rootRelease + 47
4 libobjc.A.dylib 0x99fe7c58 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 404
5 com.apple.CoreFoundation 0x9b2ade05 _CFAutoreleasePoolPop + 53
6 com.apple.Foundation 0x94c0976e -[NSAutoreleasePool drain] + 131
7 com.apple.AppKit 0x9c4a1a49 -[NSApplication run] + 791
8 com.steinberg.cubase 0x015f63ba CSOLOISTExtendedAnalysis::~CSOLOISTExtendedAnalysis() + 3263258
9 com.steinberg.cubase 0x015f75b4 CSOLOISTExtendedAnalysis::~CSOLOISTExtendedAnalysis() + 3267860
10 com.steinberg.cubase 0x013d2330 CSOLOISTExtendedAnalysis::~CSOLOISTExtendedAnalysis() + 1018512
11 com.steinberg.cubase 0x0138995c CSOLOISTExtendedAnalysis::~CSOLOISTExtendedAnalysis() + 721084
12 com.steinberg.cubase 0x00dc0f1b 0x1000 + 14417691
13 com.steinberg.cubase 0x012468fc 0x1000 + 19159292
14 com.steinberg.cubase 0x000e3766 0x1000 + 927590[/code]

Well, AFAIK it all works, so I guess your modifications have broken something, though I don’t know what. You should try building it normally, without removing the resources.