Well, the problem is with
releasing the lock (mutex).
You can find mutex unlock instructions in (amuled.cpp):
CAmuledGSocketFuncTable::CAmuledGSocketFuncTable()
CAmuledGSocketFuncTable::AddSocket(GSocket *, GSocketEvent)
CAmuledGSocketFuncTable::RemoveSocket(GSocket *, GSocketEvent)
CAmuledGSocketFuncTable::RunSelect()
CDaemonAppTraits::CDaemonAppTraits(CAmuledGSocketFuncTable *)
CDaemonAppTraits::ScheduleForDestroy(wxObject *)
CDaemonAppTraits::RemoveFromPendingDelete(wxObject *)
CDaemonAppTraits::DeletePending()
You may try adding debug output around m_lock.Unlock() instructions, and also where the code is something like
{
wxMutexLocker lock(m_lock);
[...]
}
you may debug it with
{
{
wxMutexLocker lock(m_lock)
[...]
printf("before release");
}
printf("after release....");
}
This way you may find out which lock operation fails. Beware, though, that this would most likely result in LOTS of debug output, so you'd better redirect output to a file

However, since unlock errors are not restricted to amuled, this may or may not give any result.