Fix audaspace deadlock
Closed, ResolvedPublic


Commit 46036 introduced a deadlock in audaspace. It happens when leaving audaspace, the OpenALDevice destructor waits for the AUD_openalRunThread thread to exit, but it maybe inside AUD_Reference code. Since OpenALDevice object is inside a AUD_Reference, and now AUD_Reference holds a mutex, we have a deadlock here. This patch tries to solve the problem.

Wander Lairson Costa



Applied, however: this makes the code non-threadsafe again, I'll have a look at replacing AUD_Reference by shared_ptr at some point in the future, removing that necessity to be able to create shared pointers out of a pointer which is already shared elsewhere (that works with AUD_Reference but not with shared_ptr).

Joerg Mueller (nexyon) closed this task as "Resolved".May 5 2012, 1:38 AM


I have a drafted an implementation of AUD_Reference based on shared_ptr (of course I will have to update the patch to reflect latest changes in AUD_Reference.h), I can shared it if you are interested.

I submitted a new patch [1] which implements AUD_Reference using boost::shared_ptr.


Any possibility of this patch going into release 2.64?

Ignore my last message, I posted it in the wrong patch topic...

Add Comment