Skip to content
Commit ed86e19a authored by Dariusz Iwanoczko's avatar Dariusz Iwanoczko Committed by John Eckerdal
Browse files

Race-condition in SoundPool during release

There is race between SoundPoolThread and SoundPool / AudioManager
threads during releasing SoundPool.
AudioManager deletes a global reference before setting SoundPool
callback to NULL. If, at that time, a call to the SoundPool::notify
fuction happens then mCallback is valid but mUserData is not.

The following log will show up to indicate the problem:
  JNI ERROR (app bug): accessed deleted global reference 0xXXXXXXXX

This fix is to clear the SoundPool's callback before releasing global
reference.

Change-Id: I5e6d647edc0444340db879428048e2c0a068a8b4
parent 71f83672
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment