I am developing on Android Samsung galaxy TAB 10.1. After I official updated to 4.0.4 version often get error:
11-01 17:04:35.382: E/gralloc(11657): GetBufferLock timed out for thread 11657 buffer 0x55 usage 0x33 LockState 1
and device immediate restarts. This error appear totally random and if I am debugging my own applications.
Any suggestion?
P.S.
My only one infinite paint loop:
public void run() {
Canvas canvas = null;
while (true) {
try {
Thread.sleep(50);
} catch (InterruptedException e) {
e.printStackTrace();
}
try {
synchronized (lock) {
if (!invalidated)
continue;
}
canvas = mHolder.lockCanvas();
synchronized (mHolder) {
onDraw(canvas);
}
synchronized (lock) {
invalidated = false;
}
} finally {
if (canvas != null) {
mHolder.unlockCanvasAndPost(canvas);
canvas = null;
}
}
synchronized (lock) {
if (painter == null)
break;
}
}
}