JuceDemoPlugin (Mac) crashes Live and has bugs under Logic


#1

Hi Jules,

Some tests I’ve made show that there is/are probably some bug(s) in key receiving/forwarding from plugin to host. The reason I suppose so is that as I remember it changes not so long ago after your changes made to the tip.

Tested on MacOSX 10.5.8, Xcode 3.1.3 and the latest tip from GIT (2009-09-29 19:20).

I’ve compiled the JuceDemoPlugin - the only changes I did in original project to compile was to change PublicUtility and AUPublic paths from Extras/CoreAudio/… to Examples/CoreAudio/…

I tried to simplify some scenarios to reproduce the bugs.
All of them are 100% reproducible in my environment.

Here we go…


Logic 8.0.5

  1. Start Logic
  2. Put JuceDemoPlugin to the insert slot
  3. All the keyobards action made on JuceDemoPlugin’s GUI are forwarded to the Logic without processing. No matter if you click on TextEdit, musical keyboard etc. all keystrokes just fly to the host.

Live 7.0.10

  1. Start Live
  2. Insert JuceDemoPlugin AU version
  3. Mouse click on any key of plugin’s keyobard
  4. Press any key on computer keyobard
  5. Live is hanging (the only way to quit is with ‘kill’ in command line)

Live 8.0.5

  1. Start Live
  2. Insert JuceDemoPlugin VST version (with double click on Plug-In Devices panel)
  3. Insert JuceDemoPlugin AU version (the same way)
  4. Using the Live’s bottom panel on which two effects should be placed, press the 3rd button on AU’s version device title bar (with the wrench icon) to hide the AU version’s GUI.
  5. Click it once again with the intent to show the AU version GUI
  6. Live is hanging

some hints:

  • when you do the same without inserting the VST version everything is fine
  • when you try to hide and open the VST version’s GUI everything is fine
  • the order in which the versions are put to the host DOES matter
  • if you try to drag the slider of the AU version after 3rd step you’ll notice that GUI is not responsible

There are generally some problems if you put two instances of JuceDemoPlugin and try to click on the TextEdit with slider’s value. Eg. then you click on TextEdit in first instance and type the value, then click in TextEdit of the second it doesn’t receive the focus and can’t be edited with keyboard. Tested with two AUs.

Try to experiment with this because it is sensitive to what you do and order in which you do it. I noticed several bugs with different versions, taken actions etc. but I thought that maybe these crashes described above lead you to the problem.

That’s three from what I experienced. If you have a problems with reproducing these bugs let me know. I can include maybe some logs but I don’t want to do unnecessary mess here without a reason.

Cheers,
Przemek


#2

Here is the log from the crashed thread under Live 8.0.5 (the third example I wrote about).

Process:         Live [435]
Path:            /Applications/Live 8.0.5 OS X/Live.app/Contents/MacOS/Live
Identifier:      com.ableton.live
Version:         8.0.5 (8.0.5)
Code Type:       X86 (Native)
Parent Process:  launchd [91]

Date/Time:       2009-10-01 11:18:39.463 +0200
OS Version:      Mac OS X 10.5.8 (9L31a)
Report Version:  6
Anonymous UUID:  195D9A4A-ED94-4A2C-83A1-9AD5E4FE341C

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000c67e0b2b
Crashed Thread:  0

Thread 0 Crashed:
0   ...rialsoftware.JuceDemoPlugin	0x1b1aad7c juce::Component::addAndMakeVisible(juce::Component*, int) + 26 (juce_amalgamated.cpp:38747)
1   ...rialsoftware.JuceDemoPlugin	0x1b265786 EditorCompHolder::EditorCompHolder(juce::AudioProcessorEditor*) + 170
2   ...rialsoftware.JuceDemoPlugin	0x1b2634a1 -[JuceUIViewClass_1_50_JuceDemoAU initWithFilter:withAU:withComponent:] + 71 (juce_AU_Wrapper.mm:998)
3   ...rialsoftware.JuceDemoPlugin	0x1b263417 -[JuceUICreationClass_1_50_JuceDemoAU uiViewForAudioUnit:withSize:] + 225 (juce_AU_Wrapper.mm:1116)
4   com.ableton.live              	0x000cc650 OMxDMemoryManager::~OMxDMemoryManager() + 5046
5   com.ableton.live              	0x000ccafb OMxDMemoryManager::~OMxDMemoryManager() + 6241
6   com.ableton.live              	0x000aaf8d OMidiAllNotesOffEvent::~OMidiAllNotesOffEvent() + 5767
7   com.ableton.live              	0x000c4572 void OProcessorCreateManager::SOnProcessorCreate<OVstProcessor>(OThreadMessage&) + 21456
8   com.ableton.live              	0x0005f908 OMessageAllocator::~OMessageAllocator() + 19028
9   com.ableton.live              	0x00040e8e void OProcessorCreateManager::SOnProcessorCreate<ODoubleProcessor>(OThreadMessage&) + 50254
10  com.ableton.live              	0x000627f1 OMessageAllocator::~OMessageAllocator() + 31037
11  com.ableton.live              	0x00070f54 OBeatEvent::~OBeatEvent() + 5210
12  com.ableton.live              	0x00cb57fd ACollision::~ACollision() + 16263
13  com.ableton.live              	0x00d7a6e6 OVstParameterRecord::OVstParameterRecord(OVstParameterRecord const&) + 7394
14  com.ableton.live              	0x003b213e ARemoteableEnum::~ARemoteableEnum() + 762
15  com.ableton.live              	0x003b88f7 APtrBase::~APtrBase() + 445
16  com.ableton.live              	0x003a9266 AManeuver::~AManeuver() + 518
17  com.ableton.live              	0x00d7b218 OVstParameterRecord::OVstParameterRecord(OVstParameterRecord const&) + 10260
18  com.ableton.live              	0x003a9227 AManeuver::~AManeuver() + 455
19  com.ableton.live              	0x0135645b AVolumePack::~AVolumePack() + 13059
20  com.ableton.live              	0x01356b09 AVolumePack::~AVolumePack() + 14769
21  com.ableton.live              	0x01356bd4 AVolumePack::~AVolumePack() + 14972
22  com.ableton.live              	0x014a3a6d AScalingGraphPort::~AScalingGraphPort() + 25537
23  com.ableton.live              	0x014a5c23 AScalingGraphPort::~AScalingGraphPort() + 34167
24  com.ableton.live              	0x01451d14 AHyperLinkBitmapView::~AHyperLinkBitmapView() + 1350
25  com.ableton.live              	0x014a4da0 AScalingGraphPort::~AScalingGraphPort() + 30452
26  com.ableton.live              	0x013c2141 AWindowBase::DoBeforePrepareClose() + 49547
27  com.ableton.live              	0x013c22c2 AWindowBase::DoBeforePrepareClose() + 49932
28  com.ableton.live              	0x013bde12 AWindowBase::DoBeforePrepareClose() + 32348
29  com.apple.AppKit              	0x930e8b95 -[NSWindow sendEvent:] + 5539
30  com.apple.AppKit              	0x930b56a5 -[NSApplication sendEvent:] + 2939
31  com.apple.AppKit              	0x93012fe7 -[NSApplication run] + 867
32  com.ableton.live              	0x013bca4e AWindowBase::DoBeforePrepareClose() + 27288
33  com.ableton.live              	0x013b2ecb AApplication::~AApplication() + 7671
34  com.ableton.live              	0x00002fd2 0x1000 + 8146
35  com.ableton.live              	0x00002ef9 0x1000 + 7929 

I cannot include crash log from Live 7 issue because the application just hangs up being completely irresponsible and no crash log is generated then.


#3

Thanks, I’ll debug this asap


#4

I thought that maybe a hint with different JUCE_ObjCExtraSuffix values for VST and AU versions may help (as it’s described here http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?p=23949#23949 but unfortunately not.

AU and VST versions working together still crash the Live.

Cheers,
Przemek


#5

I found two solutions how can I avoid the crash under Live 8.0.5 when VST version of JuceDemoPlugin collide with the AU one.
Just to mention - in the meantime I’ve upgraded the MacOSX to the latest 10.6.1 and all the time I try the Juce from the latest GIT tip - the problem still occurs.

The first solution is to differentiate the settings of two builds and then take the AU version from first build and VST from second.
So what I found that NEED to be different is the JUCE_ObjCExtraSuffix and JucePlugin_AUExportPrefix/JucePlugin_AUExportPrefixQuoted defines from JucePluginCharacteristics.h

the first build has following settings:

JUCE_ObjCExtraSuffix              JuceDemoPlugin_v1
JucePlugin_AUExportPrefix         JuceDemoAU_v1
JucePlugin_AUExportPrefixQuoted   "JuceDemoAU_v1"

and the second one:

JUCE_ObjCExtraSuffix              JuceDemoPlugin_v2
JucePlugin_AUExportPrefix         JuceDemoAU_v2
JucePlugin_AUExportPrefixQuoted   "JuceDemoAU_v2"

Besides of that the ONLY change I’m doing to the JuceDemo project from tip is removing RTAS files according to your instructions.

The AU version from one build doesn’t collide from the VST from the second build. However the versions taken from the same build crash Live each time.

The interesting thing is that differentiating builds only with AUExportPrefixes prevents versions from crash during the open/close GUI test I described in the first post. But if there is no difference in JUCE_ObjCExtraSuffixes in builds then I got a crash every time I try to quit Live when such two versions are used.
So the complete solution is to make differences in both Prefixes and ObjCExtraSuffix.

That’s strange, I know, but it’s really 100% deterministic. I use the latest Live and the latest JUCE, the latest MacOSX and XCode too so there should be quite easy to reproduce.

The second solution is based on building two versions (VST/AU) NOT using the polymorphic plugins mechanism.
So I built the AU version excluding VST wrapper files during the build.
Then I built the VST version excluding all the unnecessary AU files (wrapper, AUBase, PublicUtility etc.)
Before starting I restored all juce so there was no differences in defines from example above.

Versions built in this way don’t crash the Live during the open/close gui test. But crash during closing Live still exists. To avoid it I had once again to differentiate versions with JUCE_ObjCExtraSuffix values. Then all the things run smoothly.

I noticed also another thing. When I had the versions which cause crash during Live exit (no matter about the solution) I found that VST influences key receiving in AU somehow. I mean that when you put only AU to Live and then click to the TextEdit, put some numbers from keyboard and then press Enter everything is fine. But when you first put the VST, then put the AU and click the TextEdit in AU, type some numbers you are not able to use Enter. You can leave the TextEdit area with Tab or by clicking somewhere else on the GUI but Enter does nothing. And then when you try to quit Live it will crash.

Do you have any ideas Jules, why it may happen? I digged across the Juce files but didn’t found anything.

Here is once again updated crash log from the open/close gui test. It’s crash when you test the regular JuceDemoPlugin from the tip without any changes. Just the procedure to test I described in first post.

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   ...rialsoftware.JuceDemoPlugin	0x19eaf32e juce::Component::addAndMakeVisible(juce::Component*, int) + 26 (juce_amalgamated.cpp:38898)
1   ...rialsoftware.JuceDemoPlugin	0x19f695f2 EditorCompHolder::EditorCompHolder(juce::AudioProcessorEditor*) + 170 (juce_AU_Wrapper.mm:946)
2   ...rialsoftware.JuceDemoPlugin	0x19f672d9 -[JuceUIViewClass_1_50_JuceDemoAU initWithFilter:withAU:withComponent:] + 71 (juce_AU_Wrapper.mm:998)
3   ...rialsoftware.JuceDemoPlugin	0x19f6724f -[JuceUICreationClass_1_50_JuceDemoAU uiViewForAudioUnit:withSize:] + 225 (juce_AU_Wrapper.mm:1116)
4   com.ableton.live              	0x000cc650 OMxDMemoryManager::~OMxDMemoryManager() + 5046
5   com.ableton.live              	0x000ccafb OMxDMemoryManager::~OMxDMemoryManager() + 6241
6   com.ableton.live              	0x000aaf8d OMidiAllNotesOffEvent::~OMidiAllNotesOffEvent() + 5767
7   com.ableton.live              	0x000c4572 void OProcessorCreateManager::SOnProcessorCreate<OVstProcessor>(OThreadMessage&) + 21456
8   com.ableton.live              	0x0005f908 OMessageAllocator::~OMessageAllocator() + 19028
9   com.ableton.live              	0x00040e8e void OProcessorCreateManager::SOnProcessorCreate<ODoubleProcessor>(OThreadMessage&) + 50254
10  com.ableton.live              	0x000627f1 OMessageAllocator::~OMessageAllocator() + 31037
11  com.ableton.live              	0x00070f54 OBeatEvent::~OBeatEvent() + 5210
12  com.ableton.live              	0x00cb57fd ACollision::~ACollision() + 16263
13  com.ableton.live              	0x00d7a6e6 OVstParameterRecord::OVstParameterRecord(OVstParameterRecord const&) + 7394
14  com.ableton.live              	0x003b213e ARemoteableEnum::~ARemoteableEnum() + 762
15  com.ableton.live              	0x003b88f7 APtrBase::~APtrBase() + 445
16  com.ableton.live              	0x003a9266 AManeuver::~AManeuver() + 518
17  com.ableton.live              	0x00d7b218 OVstParameterRecord::OVstParameterRecord(OVstParameterRecord const&) + 10260
18  com.ableton.live              	0x003a9227 AManeuver::~AManeuver() + 455
19  com.ableton.live              	0x0135645b AVolumePack::~AVolumePack() + 13059
20  com.ableton.live              	0x01356b09 AVolumePack::~AVolumePack() + 14769
21  com.ableton.live              	0x01356bd4 AVolumePack::~AVolumePack() + 14972
22  com.ableton.live              	0x014a3a6d AScalingGraphPort::~AScalingGraphPort() + 25537
23  com.ableton.live              	0x014a5c23 AScalingGraphPort::~AScalingGraphPort() + 34167
24  com.ableton.live              	0x01451d14 AHyperLinkBitmapView::~AHyperLinkBitmapView() + 1350
25  com.ableton.live              	0x014a4da0 AScalingGraphPort::~AScalingGraphPort() + 30452
26  com.ableton.live              	0x013c2141 AWindowBase::DoBeforePrepareClose() + 49547
27  com.ableton.live              	0x013c22c2 AWindowBase::DoBeforePrepareClose() + 49932
28  com.ableton.live              	0x013bde12 AWindowBase::DoBeforePrepareClose() + 32348
29  com.apple.AppKit              	0x901a3154 -[NSWindow sendEvent:] + 5693
30  com.apple.AppKit              	0x900bbceb -[NSApplication sendEvent:] + 6431
31  com.apple.AppKit              	0x9004f6fb -[NSApplication run] + 917
32  com.ableton.live              	0x013bca4e AWindowBase::DoBeforePrepareClose() + 27288
33  com.ableton.live              	0x013b2ecb AApplication::~AApplication() + 7671
34  com.ableton.live              	0x00002fd2 0x1000 + 8146
35  com.ableton.live              	0x00002ef9 0x1000 + 7929 

Cheers…


#6

Agh… You’ve hit a very good point there.

Of course with the polymorphic build, the two modules will be identical, and there’ll inevitably be cross-linking between the class names. Even though the code is the same, each one will have different statics, so any code that uses singletons or allocates objects will go horribly wrong. Damned obj-C linking.

But… having a quick look in juce_AUWrapper.mm, line 240, I’ve used bundleForClass to try to find the current bundle. That might be where it’s going wrong, because it might be picking up the VST’s bundle. So I’ve not tried this, but maybe:

const File bundleFile (File::getSpecialLocation (File::currentApplicationFile)); NSString* bundlePath = [NSString stringWithUTF8String: (const char*) bundleFile.getFullPathName().toUTF8()]; NSBundle* b = [NSBundle bundleWithPath: bundlePath];

…might help? Would appreciate if you’d give that a spin, I’m kind of in the middle of some other stuff right now…


#7

I checked it and now the bundlePath really points to AU bundle, but:

  1. If you put AU and then VST to Live everything seems to be fine. Both GUIs can be opened and closed without crash, however the problem with steeling the Enter key input in AU still occurs (but it’s minor issue). Live also don’t crash during quit.

  2. When you put first VST and then AU, the AU’s GUI don’t even show. Now if we want to quit the Live it cause crash (I attach the crash log)

0   libobjc.A.dylib               	0x92c36917 objc_msgSend + 23
1   ...rialsoftware.JuceDemoPlugin	0x1a8695f4 juce::MessageManager::~MessageManager() + 70 (juce_amalgamated.cpp:37011)
2   ...rialsoftware.JuceDemoPlugin	0x1a872f27 juce::shutdownJuce_GUI() + 81 (juce_amalgamated.cpp:16490)
3   ...rialsoftware.JuceDemoPlugin	0x1a96bb8c JuceAU::~JuceAU() + 492 (juce_AU_Wrapper.mm:172)
4   ...rialsoftware.JuceDemoPlugin	0x1a7158e6 ComponentBase::ComponentEntryDispatch(ComponentParameters*, ComponentBase*) + 126 (ComponentBase.cpp:81)
5   ...rialsoftware.JuceDemoPlugin	0x1a710c69 AUBase::ComponentEntryDispatch(ComponentParameters*, AUBase*) + 2437 (AUDispatch.cpp:402)
6   ...rialsoftware.JuceDemoPlugin	0x1a96d42b AUMIDIEffectBase::ComponentEntryDispatch(ComponentParameters*, AUMIDIEffectBase*) + 111 (AUMIDIEffectBase.cpp:135)
7   ...rialsoftware.JuceDemoPlugin	0x1a96b8c1 ComponentEntryPoint<JuceAU>::Dispatch(ComponentParameters*, JuceAU*) + 233 (ComponentBase.h:135)
8   ...rialsoftware.JuceDemoPlugin	0x1a9675ca JuceDemoAUEntry + 30 (juce_AU_Wrapper.mm:1399)  /* it's probably 1394 in your code because of 5 lines added by me to check it */
9   ...ple.CoreServices.CarbonCore	0x927c2cb6 CallComponentDispatch + 29
10  ...ple.CoreServices.CarbonCore	0x927c303f CallComponentClose + 43
11  ...ple.CoreServices.CarbonCore	0x927c2f68 CloseComponentInternal(ComponentInstanceRecord*) + 101
12  ...ple.CoreServices.CarbonCore	0x927c2ee9 CloseComponent + 46
13  com.ableton.live              	0x000b7465 OAasModulationPolarizerProcessor::~OAasModulationPolarizerProcessor() + 7591
14  com.ableton.live              	0x000ad5e4 OMidiAllNotesOffEvent::~OMidiAllNotesOffEvent() + 15582
15  com.ableton.live              	0x0004278e OQueuePool::~OQueuePool() + 146
16  com.ableton.live              	0x0005f908 OMessageAllocator::~OMessageAllocator() + 19028
17  com.ableton.live              	0x00040e8e void OProcessorCreateManager::SOnProcessorCreate<ODoubleProcessor>(OThreadMessage&) + 50254
18  com.ableton.live              	0x000627f1 OMessageAllocator::~OMessageAllocator() + 31037
19  com.ableton.live              	0x011858c8 AGroovePool::~AGroovePool() + 23338
20  com.ableton.live              	0x01160b19 ASong::~ASong() + 45563
21  com.ableton.live              	0x00eafa49 ASampleData::~ASampleData() + 2865
22  com.ableton.live              	0x00e3a0b3 AGroupTrackDeviceChain::~AGroupTrackDeviceChain() + 11791
23  com.ableton.live              	0x00c3d054 AMidiSong::~AMidiSong() + 170
24  com.ableton.live              	0x01599e12 AChooserBarDefault::~AChooserBarDefault() + 57660
25  com.ableton.live              	0x01442342 AMouseOverCellView::~AMouseOverCellView() + 1020
26  com.ableton.live              	0x0158d370 AChooserBarDefault::~AChooserBarDefault() + 5786
27  com.ableton.live              	0x00be646f ASamplerInfo::~ASamplerInfo() + 1215
28  com.ableton.live              	0x0149f7a1 AScalingGraphPort::~AScalingGraphPort() + 8437
29  com.ableton.live              	0x013b288f AApplication::~AApplication() + 6075
30  com.ableton.live              	0x013b8565 AWindowBase::DoBeforePrepareClose() + 9647
31  com.apple.AppKit              	0x902c700e -[NSApplication _docController:shouldTerminate:] + 84
32  com.apple.AppKit              	0x902c6b34 -[NSDocumentController(NSInternal) _continueTerminationHavingClosedAllDocuments:context:] + 160
33  com.apple.AppKit              	0x902c6912 -[NSDocumentController(NSInternal) _shouldTerminateWithDelegate:shouldTerminateSelector:] + 1376
34  com.apple.AppKit              	0x902c61eb -[NSApplication _shouldTerminate] + 373
35  com.apple.AppKit              	0x902c5d5d -[NSApplication terminate:] + 519
36  com.apple.AppKit              	0x900cc14a -[NSApplication sendAction:to:from:] + 112
37  com.apple.AppKit              	0x900cbffd -[NSMenuItem _corePerformAction] + 435
38  com.apple.AppKit              	0x900cbcee -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 174
39  com.apple.AppKit              	0x901c774b -[NSMenu _performActionWithHighlightingForItemAtIndex:] + 49
40  com.apple.AppKit              	0x901c6ef7 -[NSMenu performKeyEquivalent:] + 314
41  com.apple.AppKit              	0x901c56a1 -[NSApplication _handleKeyEquivalent:] + 581
42  com.apple.AppKit              	0x900bb6c6 -[NSApplication sendEvent:] + 4858
43  com.apple.AppKit              	0x9004f6fb -[NSApplication run] + 917
44  com.ableton.live              	0x013bca4e AWindowBase::DoBeforePrepareClose() + 27288
45  com.ableton.live              	0x013b2ecb AApplication::~AApplication() + 7671
46  com.ableton.live              	0x00002fd2 0x1000 + 8146
47  com.ableton.live              	0x00002ef9 0x1000 + 7929

If you have any ideas I can check it…


#8

Well, that’s an improvement, I suppose!

Ok… we need to figure out why the gui doesn’t show - did you try stepping through the new code you added, it kind of feels like that might not be working correctly when the VST is already loaded?


#9

Yes definitely it IS an improvement :slight_smile:

As I wrote I debugged the obtained bundlePath. In both cases the value of bundlePath is correct but I checked also some other messages from the console. Maybe they make something more clear :slight_smile:

10/13/09 5:36:57 PM	[0x0-0x7e07e].com.ableton.live[3908]	objc[3908]: Class AudioTrackProducer_1_50_3 is implemented in both /Users/bld/Library/Audio/Plug-Ins/VST/JuceDemoPlugin.vst/Contents/MacOS/JuceDemoPlugin and /Users/bld/Library/Audio/Plug-Ins/Components/JuceDemoPlugin.component/Contents/MacOS/JuceDemoPlugin. One of the two will be used. Which one is undefined.
10/13/09 5:36:57 PM	[0x0-0x7e07e].com.ableton.live[3908]	objc[3908]: Class OpenDiskDevice_1_50_3 is implemented in both /Users/bld/Library/Audio/Plug-Ins/VST/JuceDemoPlugin.vst/Contents/MacOS/JuceDemoPlugin and /Users/bld/Library/Audio/Plug-Ins/Components/JuceDemoPlugin.component/Contents/MacOS/JuceDemoPlugin. One of the two will be used. Which one is undefined.
10/13/09 5:36:57 PM	[0x0-0x7e07e].com.ableton.live[3908]	objc[3908]: Class JuceFileChooserDelegate_1_50_3 is implemented in both /Users/bld/Library/Audio/Plug-Ins/VST/JuceDemoPlugin.vst/Contents/MacOS/JuceDemoPlugin and /Users/bld/Library/Audio/Plug-Ins/Components/JuceDemoPlugin.component/Contents/MacOS/JuceDemoPlugin. One of the two will be used. Which one is undefined.
10/13/09 5:36:57 PM	[0x0-0x7e07e].com.ableton.live[3908]	objc[3908]: Class JuceMenuCallback_1_50_3 is implemented in both /Users/bld/Library/Audio/Plug-Ins/VST/JuceDemoPlugin.vst/Contents/MacOS/JuceDemoPlugin and /Users/bld/Library/Audio/Plug-Ins/Components/JuceDemoPlugin.component/Contents/MacOS/JuceDemoPlugin. One of the two will be used. Which one is undefined.
10/13/09 5:36:57 PM	[0x0-0x7e07e].com.ableton.live[3908]	objc[3908]: Class ThreadSafeNSOpenGLView_1_50_3 is implemented in both /Users/bld/Library/Audio/Plug-Ins/VST/JuceDemoPlugin.vst/Contents/MacOS/JuceDemoPlugin and /Users/bld/Library/Audio/Plug-Ins/Components/JuceDemoPlugin.component/Contents/MacOS/JuceDemoPlugin. One of the two will be used. Which one is undefined.
10/13/09 5:36:57 PM	[0x0-0x7e07e].com.ableton.live[3908]	objc[3908]: Class JuceNSWindow_1_50_3 is implemented in both /Users/bld/Library/Audio/Plug-Ins/VST/JuceDemoPlugin.vst/Contents/MacOS/JuceDemoPlugin and /Users/bld/Library/Audio/Plug-Ins/Components/JuceDemoPlugin.component/Contents/MacOS/JuceDemoPlugin. One of the two will be used. Which one is undefined.
10/13/09 5:36:57 PM	[0x0-0x7e07e].com.ableton.live[3908]	objc[3908]: Class JuceNSView_1_50_3 is implemented in both /Users/bld/Library/Audio/Plug-Ins/VST/JuceDemoPlugin.vst/Contents/MacOS/JuceDemoPlugin and /Users/bld/Library/Audio/Plug-Ins/Components/JuceDemoPlugin.component/Contents/MacOS/JuceDemoPlugin. One of the two will be used. Which one is undefined.
10/13/09 5:36:57 PM	[0x0-0x7e07e].com.ableton.live[3908]	objc[3908]: Class JuceURLConnection_1_50_3 is implemented in both /Users/bld/Library/Audio/Plug-Ins/VST/JuceDemoPlugin.vst/Contents/MacOS/JuceDemoPlugin and /Users/bld/Library/Audio/Plug-Ins/Components/JuceDemoPlugin.component/Contents/MacOS/JuceDemoPlugin. One of the two will be used. Which one is undefined.
10/13/09 5:36:57 PM	[0x0-0x7e07e].com.ableton.live[3908]	objc[3908]: Class JuceUICreationClass_1_50_JuceDemoAU is implemented in both /Users/bld/Library/Audio/Plug-Ins/VST/JuceDemoPlugin.vst/Contents/MacOS/JuceDemoPlugin and /Users/bld/Library/Audio/Plug-Ins/Components/JuceDemoPlugin.component/Contents/MacOS/JuceDemoPlugin. One of the two will be used. Which one is undefined.
10/13/09 5:36:57 PM	[0x0-0x7e07e].com.ableton.live[3908]	objc[3908]: Class JuceUIViewClass_1_50_JuceDemoAU is implemented in both /Users/bld/Library/Audio/Plug-Ins/VST/JuceDemoPlugin.vst/Contents/MacOS/JuceDemoPlugin and /Users/bld/Library/Audio/Plug-Ins/Components/JuceDemoPlugin.component/Contents/MacOS/JuceDemoPlugin. One of the two will be used. Which one is undefined.
10/13/09 5:36:57 PM	[0x0-0x7e07e].com.ableton.live[3908]	JUCE v1.50
10/13/09 5:36:57 PM	[0x0-0x7e07e].com.ableton.live[3908]	/Users/bld/Library/Audio/Plug-Ins/Components/JuceDemoPlugin.component

… you can see in the last line the value of bundlePath - the log is from the case where AU’s gui doesn’t show.

but maybe the previous lines tell you something more… aren’t they any conflicts between VST/AU versions

Cheers…


#10

Well, the other messages are telling us what we already know - that two identical libraries will obviously have conflicts. I guess it must be one of the other juce classes that’s causing the problem, though not sure why.

Seems very odd that there’s no gui at all though - I’m a bit stumped by that…


#11

Thanks Jules,

I’ll try to debug it and see what’s going on…


#12

Well, don’t know if I have something valuable to add but:

  • both values needed to fill the AudioUnitCocoaViewInfo structure are obtained correctly with the changes you’ve suggested

  • when we try to load the AU after VST is already loaded then JuceUICreationClass is not initialized, so the method uiViewForAudioUnit (which creates the editor) is never called too

  • if I exclude eg. only two AU wrapper files from the VST build then there is no conflict with the classes JuceUICreationClass_1_50_JuceDemoAU and JuceUIViewClass_1_50_JuceDemoAU because VST binary simply doesn’t contain it and there is no bug

  • these conflicts with ObjC linking are also sensitive to Live version. These bug doesn’t occur in Live 7.

I’m also stumped with this and don’t know what to do… The only fully working solution is to build the versions without polymorphic mechanism with different JUCE_ObjCExtraSuffix values … but this one build - one binary idea is too great to loose it :frowning:

Cheers


#13

Hmm. I wonder why the Live version makes a difference. Probably because the older version isn’t using the cocoa UI, but falling back to the carbon version…

I’m really not sure what’s going on. Will keep pondering. As you say, it’d be a terrible shame to lose (not “loose”, agh!) the single-binary solution just because of a quirk of obj-c.


#14

Yes, “lose” not “loose” :slight_smile: sorry for the typo…

Unfortunately it is the only solution for me at the moment. I’ve switched completely to 1.50 with my plugins and there is no way back but this feature has to be disabled if such bugs can appear. If I find any other solution I’ll back to the polymorphic mechanism with the greatest pleasure :slight_smile:

Cheers,
Przemek


#15

Hello,

For me I’ll keep using polymorphic and just mention to my user to not use both AU & VST version of the same plugin at the same time. Why would we use both version anyway ?

Surely instead of a crash I would prefer a polite message like ‘can’t load VST : AU version already loaded’, but I’m rather concerned by bigger issue, like the PT crash of the other thread :lol:

Thanks !

Salvator


#16

…that’s actually a very good point!


#17

I agree that it’s not very important problem but surely it’s a bug - that’s why I posted about it. I know that using VST together with AU seems to be strange but I thought that this problem can be related to the other bugs I wrote about (crashing Live 7.x and problems with key receiving under Logic 8). These problems still exist and we can’t just forget about Live 7.x and Logic 8 users who will definitely have the same problems.

Cheers,
Przemek


#18

it is indeed a bug… Unfortunately it might actually be impossible to solve!

No, this has no relationship at all with any other problems - it’s clearly only caused by AUs and VSTs getting in each other’s way.


#19

With the patch by friscokid made in juce_mac_NSViewComponentPeer (http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?p=24594) we can assume that this problem is fixed :smiley:

Cheers,
Przemek


#20