These events have recently been linked to the call mSurfaceHolder.unlockCanvasAndPost(canvas);
Hey guys, been working on this app for a while now and every now-and-then it will simply freeze on me, sometimes returning normally and others simply crashing out (sometimes literally crashing the phone, making me reboot). It only happens roughly every 1/5 attempts, and it was actually hard for me to catch wit开发者_开发百科h DDMS for some reason because it simply wouldn't glitch while I was trying to log/profile it.
I've since logged the activity below throughout the freeze with DDMS. Any help with this log would be much appreciated, if I happen to come across my solution in the mean time I'll post back. Thanks in advance!
04-15 05:14:03.154: WARN/SharedBufferStack(4148): waitForCondition(DequeueCondition) timed out (identity=355, status=0). CPU may be pegged. trying again.
04-15 05:14:04.154: WARN/SharedBufferStack(4148): waitForCondition(DequeueCondition) timed out (identity=355, status=0). CPU may be pegged. trying again.
04-15 05:14:05.154: WARN/SharedBufferStack(4148): waitForCondition(DequeueCondition) timed out (identity=355, status=0). CPU may be pegged. trying again.
04-15 05:14:06.154: WARN/SharedBufferStack(4148): waitForCondition(DequeueCondition) timed out (identity=355, status=0). CPU may be pegged. trying again.
04-15 05:14:07.154: WARN/SharedBufferStack(4148): waitForCondition(DequeueCondition) timed out (identity=355, status=0). CPU may be pegged. trying again.
04-15 05:14:08.123: INFO/ActivityThread(4148): Removing dead content provider: settings
04-15 05:14:08.154: WARN/SharedBufferStack(4148): waitForCondition(DequeueCondition) timed out (identity=355, status=0). CPU may be pegged. trying again.
04-15 05:14:08.186: DEBUG/SensorManager(4148): _sensors_data_poll() failed, we bail out.
Using accelerometer, touch, and capturing keys as well. All of this while using a canvasThread
to do my drawing from a surfaceView
. All of which is "separated" from the UI thread.
Have been trying to get a stack trace off the crash, but when I attach the debugger to it the darn thing won't glitch on me; it does however seem to get data from the accelerometer at almost half the rate? Any idea why this is?
[EDIT] --- Finally got a stack trace
Thread [<9> CanvasThread] (Suspended)
**Surface.unlockCanvasAndPost(Canvas) line: not available [native method]**
SurfaceView$3.unlockCanvasAndPost(Canvas) line: 804
CanvasSurfaceView$CanvasThread.run() line: 233
Thread [<8> AsyncQueryWorker] (Suspended)
**Object.wait(long, int) line: not available [native method]**
MessageQueue(Object).wait() line: 288
MessageQueue.next() line: 146
Looper.loop() line: 123
HandlerThread.run() line: 60
Thread [<7> Binder Thread #2] (Suspended)
**NativeStart.run() line: not available [native method]**
Thread [<6> Binder Thread #1] (Suspended)
**NativeStart.run() line: not available [native method]**
Daemon System Thread [<5> Compiler] (Suspended)
NativeStart.run() line: not available [native method]
Daemon System Thread [<3> Signal Catcher] (Suspended)
NativeStart.run() line: not available [native method]
Daemon System Thread [<2> HeapWorker] (Suspended)
NativeStart.run() line: not available [native method]
New information, while using DDMS I tried hitting "Stop Process" when it freezes, and it kills the app for a second after which it reappears and continues without hesitation... wierd
精彩评论