Modal dialog thread MessageManagerLock deadlock


#1

I am starting a thread from a modal dialog which tries to update gui components in the dialog but cannot acquire the MessageManagerLock. There are no other critical sections in my code. Please help.

Thanks


#2

That should work fine… Are you using the latest version? If so, when you say it fails to get the lock, what exactly is happening?


#3

I am using v1.46. When I try to create the MessageManagerLock, it blocks at “MessageManager::instance->messageDispatchLock.enter()”, so it seems like another thread has the lock.

A workaround I found is to use callFunctionOnMessageThread(), rather than try to acquire the MessageManagerLock. I will try and write some test code that replicates the problem as my current code is a bit involved.

Tks


#4

Ah, no, it won’t work in 1.46, I sorted this out a while ago, but you need to move to 1.50.


#5

Thanks - it works with 1.50