Today I did a GIT update and I had to do the Image and popup menu changes to get my plugin compiled.
But as soon as it gets started I got a windows triggered breakpoint here:
MessageListener::MessageListener() throw()
{
// are you trying to create a messagelistener before or after juce has been intialised??
jassert (MessageManager::instance != 0);
if (MessageManager::instance != 0)
MessageManager::instance->messageListeners.add (this);
}
I would like to debug but it doesn’t matter where ever I set a debug point, I never reach him becaus of the
problem above.
Could somebody please tell me where to start debugging or any idea what could go wrong?
Again, I only did the Image and Popup menu changes.
No, if you’re using a static juce::Value class, then it’ll assert on starting. Juce is made so that you can’t do anything serious out of App::initialise and App::shutdown.
If you’re using a static (or global) Value, change the code from :
namespace juce
{
// Don't do that
Value a(0);
static Value b(0);
// But this instead:
Value & getA() { static Value a(0); return a; }
Value & getB() { static Value b(0); return b; }
}
This will only work, if the class using such Value are created after initialise is called.
It’s a good idea to wrap all your more complex static objects in functions like that anyway, because if you just let the compiler decide the order in which to instantiate them, you can hit all sorts of nasty problems.