Same filter: OSX VST asserts, Win VST & All Standalones

I’ve got a fairly simple plugin - The main page has a Tab Component to allow me to switch between Parameter configuration / Main display modes.

Both the pages have a couple of sliders… nothing too clever (even for me!)

The app compiles and runs on PC and OSX - It works fine on PC (VST/Standalone) and as an AU and Standalone on OSX - However, when I use the VST version of the plugin on OSX, an assert is triggered while in the initial stages of scanning for VSTs:

{For clarity, I’m using Juce Audio Host (Debug build), but the same thing seems to be happening in Plogue Bidule Host }

#0	0x95fee402 in __pthread_kill
#1	0x95fee24f in pthread_kill
#2	0x9514a190 in Debugger
#3	0x000b285c in juce::ComponentDeletionWatcher::ComponentDeletionWatcher at juce_amalgamated.cpp:41757
#4	0x0015695f in juce::Component::setVisible at juce_amalgamated.cpp:38347
#5	0x15f0a5b0 in juce::Component::addAndMakeVisible at juce_amalgamated.cpp:39336
#6	0x15f3959f in juce::TabbedButtonBar::TabbedButtonBar at juce_amalgamated.cpp:59796
#7	0x15fb7533 in juce::TabCompButtonBar::TabCompButtonBar at juce_amalgamated.cpp:60166
#8	0x15f396e1 in juce::TabbedComponent::TabbedComponent at juce_amalgamated.cpp:60211
#9	0x15fcac8d in MainTabComponent::MainTabComponent at MainTabComponent.cpp:43
#10	0x15fc1ae7 in EditorComponent::EditorComponent at EditorComponent.cpp:96
#11	0x15fc5130 in JuceFilter::createEditor at JuceFilter.cpp:1283
#12	0x15e6a98b in juce::AudioProcessor::createEditorIfNeeded at juce_amalgamated.cpp:33794
#13	0x15fe4884 in JuceVSTWrapper::open at juce_VST_Wrapper.cpp:446
#14	0x15fe00de in AudioEffect::dispatcher at audioeffect.cpp:155
#15	0x15fe0dce in AudioEffectX::dispatcher at audioeffectx.cpp:297
#16	0x15fe66f9 in JuceVSTWrapper::dispatcher at juce_VST_Wrapper.cpp:1401
#17	0x15fe25a6 in AudioEffect::dispatchEffectClass at audioeffect.cpp:32
#18	0x00093606 in juce::VSTPluginInstance::dispatch at juce_amalgamated.cpp:32782
#19	0x000f6345 in juce::VSTPluginInstance::initialise at juce_amalgamated.cpp:31529
#20	0x0016f6a6 in juce::VSTPluginFormat::createInstanceFromDescription at juce_amalgamated.cpp:33492
#21	0x00111ffb in juce::VSTPluginFormat::findAllTypesForFile at juce_amalgamated.cpp:33399
#22	0x0011a03d in juce::KnownPluginList::scanAndAddFile at juce_amalgamated.cpp:27843
#23	0x0011a245 in juce::PluginDirectoryScanner::scanNextFile at juce_amalgamated.cpp:28303
#24	0x001a52a2 in juce::PluginListComponent::scanFor at juce_amalgamated.cpp:28585
#25	0x001a5646 in juce::PluginListComponent::timerCallback at juce_amalgamated.cpp:28518
#26	0x001c3cfd in juce::InternalTimerThread::handleMessage at juce_amalgamated.cpp:38040
#27	0x000cb5d0 in juce::MessageManager::deliverMessage at juce_amalgamated.cpp:37495
#28	0x001d9b28 in juce::AppDelegateRedirector::deliverMessage at juce_amalgamated.cpp:272357
#29	0x000e8d1a in -[JuceAppDelegate_1_46_2 customEvent:] at juce_amalgamated.cpp:272482
#30	0x92a039bc in __NSThreadPerformPerform
#31	0x90822595 in CFRunLoopRunSpecific
#32	0x90822c78 in CFRunLoopRunInMode
#33	0x92cbe28c in RunCurrentEventLoopInMode
#34	0x92cbe0a5 in ReceiveNextEventCommon
#35	0x92cbdf19 in BlockUntilNextEventMatchingListInMode
#36	0x962acd0d in _DPSNextEvent
#37	0x962ac5c0 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#38	0x962a55fb in -[NSApplication run]
#39	0x00091ebb in juce::MessageManager::runDispatchLoop at juce_amalgamated.cpp:272519
#40	0x0015099c in juce::JUCEApplication::main at juce_amalgamated.cpp:16170
#41	0x00150c04 in juce::JUCEApplication::main at juce_amalgamated.cpp:16252
#42	0x00010331 in main at HostStartup.cpp:117

I thought it may be thread-related (somehow) - and I’m about to add a small debug to see what component names pop-up, in case that sheds any light on the matter… Smoke me a kipper!

Has anyone else experienced this? (or not had any problems with simple tabbed main page in an OSX VST?)

Slightly mystified by that… It looks like it’s complaining about the addAndMakeVisible in TabbedButtonBar::TabbedButtonBar(), but that code’s pretty simple and I can’t see anything wrong with it… Maybe you could step through it and see if there are any strange things happening?

Eppur non si muove

I must admit to not really knowing what’s going on… but it seems to think that the juce::TabAreabehindFrontButtonComponent isn’t an isValidMessageListener…

(I’m probably misunderstanding in the same way a cat doesn’t understand that it can’t be fed because the can-opener’s broken / or like a peasant thinks that the woman with the pointy-nose must be a witch, because she weighs the same as a duck…)

So, if I understand what the assert thinks is: The Tab component isn’t a valid component, because it’s been deleted from the list of valid message listeners and therefore wouldn’t detect someone clicking on it ! (HUH?)

[edit]Wonders if there’s a leak somewhere and my code’s got its BIG BOOTS on, and is stomping around on other objects’ data… after possibly detecting classic leaky-behaviour…

[edit] but hangon… this is all during the main constructor, and the only stuff that’s been going on is “news” and other constructors…

I can’t make any sense of it from the stack-trace… It’s the sort of bug you’d need to step through, looking for dodgy behaviour. Can’t think of any good suggestions of things to look for though…

This is looking more and more like my fault - (as you probly suspected :slight_smile: )
I still haven’t found the cause, but I think something of mine’s leaking