Deadlock problem

I just started trying to port a Juce mixer application I wrote on windows to linux. 

The windows version of juce is about a year old, but the linux install I took the latest git verison.  (where do I find the version in the code?)

I start the audio by doing addAudioCallback.  If I the try to do a removeAudioCallback it hangs.   It hands if I terminate the program too since it does the remove as well.  I traced it with a gdb and found that juce_AudioDeviceManager.cpp:767 locking like this;

const ScopedLock sl (audioCallbackLock) which goes to GenericScopedLoc. where it stops.  I do not use the audioCallbackLock in my code.  I don't see in the stack where a caller took the lock.  Since this is a scoped lock I don't see how this can deadlock.


Any one else seen anything like this?



It takes two threads to deadlock.. Without a stack trace of both the deadlocking threads there's no way to guess what's going on.

It turned out that the call back thread was hanging and not returning.  I had not made the connect that lock is held while in the callback handler.  I corrected the problem so the handler returneds and the deadlock is gone.