I updated JUCE in SimpleDJ to the latest tip and now I get an unhandled exception writing to location 0x01c19bb4 in Atomic::operator++(), when assigning the String from a SettableTooltipClient in response to lookAndFeelChanged (none of this is my code, this is all standard JUCE base class code).
It looks like it becomes 0xcdcdcdcd AFTER the call to operator new, which is puzzling. This is all on startup of the application (during creation of the interface). It used to work, but when I updated JUCE it broke. I don’t understand why this is happening…but it has something to do with the Slider turning into a pimpl.
Perhaps there’s some kind of callback being invoked during the lookandfeel setup which is deleting your slider while it’s still in the middle of initialising itself. I’d stick a breakpoint in the slider destructor and see what happens.
It looks like the 0xcdcdcdcd was just a false reading from the debugger. I assigned pimpl.get() to a local void* and it was 0x00000000, and got correctly initialized after the call to new.
On further analysis, it seems this is causing the failure:
static inline StringHolder* bufferFromText (const CharPointerType& text) noexcept
{
// (Can't use offsetof() here because of warnings about this not being a POD)
return reinterpret_cast <StringHolder*> (reinterpret_cast <char*> (text.getAddress())
- (reinterpret_cast <size_t> (reinterpret_cast <StringHolder*> (1)->text) - 1));
}
Undefined symbols for architecture i386:
"non-virtual thunk to juce::Button::getTooltip()", referenced from:
vtable for CParamToggleButton in CParamToggleButton.o
"non-virtual thunk to juce::Button::setTooltip(juce::String const&)", referenced from:
vtable for CParamToggleButton in CParamToggleButton.o
"non-virtual thunk to juce::Button::applicationCommandInvoked(juce::ApplicationCommandTarget::InvocationInfo const&)", referenced from:
vtable for CParamToggleButton in CParamToggleButton.o
"non-virtual thunk to juce::Button::applicationCommandListChanged()", referenced from:
vtable for CParamToggleButton in CParamToggleButton.o
"non-virtual thunk to juce::Button::valueChanged(juce::Value&)", referenced from:
vtable for CParamToggleButton in CParamToggleButton.o
"non-virtual thunk to juce::Button::keyPressed(juce::KeyPress const&, juce::Component*)", referenced from:
vtable for CParamToggleButton in CParamToggleButton.o
"non-virtual thunk to juce::Button::keyStateChanged(bool, juce::Component*)", referenced from:
vtable for CParamToggleButton in CParamToggleButton.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Interestingly, the getTooltip() function is on the stack when it crashes on launch (Windows).
Definitely not because the only JUCE directory is the one in the repository. I think…I’m not completely sure to be honest.
Actually I am sure, because the “Module source folder” and the “local JUCE folder” for each of the exporters, all have the same value. They point into “…Extern/JUCE/modules”, which is here:
If I change CParamToggleButton (my class) to not derive from juce::Button or juce::TextButton, the link error goes away and the app runs (but the button of course does not appear).
I’m also seeing another problem where the leak detector complains about a double delete of a File object, with the call stack having something to do with asking the WebKit framework for a standard cursor PNG?
Vinnie, did you import this project from one version of VS to another? The reason I ask is that I attempted to port our 1.4 JUCE code to 2.0, and I ran into a very similar issue regarding my subclassing of Slider. I never solved the issue, and I had to give up on the task (as the priority of others things took precedent). The only other moving piece in my attempt was that I had upgraded from VS2005 to VS 2010 (or 2012, I can’t recall), and just imported the old project. So, I was planning on rebuilding the project in the new VS, and see if that helped.