1

这些事件最近与电话联系在一起mSurfaceHolder.unlockCanvasAndPost(canvas);

嘿,伙计们,现在已经在这个应用程序上工作了一段时间,并且时不时地它只会冻结我,有时会正常返回,而其他人只会崩溃(有时会导致手机崩溃,让我重新启动)。它大约每 1/5 次尝试才会发生一次,而且由于某种原因,我实际上很难用 DDMS 捕捉到它,因为它在我尝试记录/分析它时根本不会出现故障。

我已经用 DDMS 在整个冻结过程中记录了下面的活动。如果我在此期间碰巧遇到我的解决方案,我将不胜感激任何有关此日志的帮助,我会回复。提前致谢!

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.

还可以使用加速度计、触摸和捕捉按键。所有这一切都是在使用 acanvasThreadsurfaceView. 所有这些都与 UI 线程“分离”。

一直试图从崩溃中获取堆栈跟踪,但是当我将调试器附加到它时,该死的东西不会在我身上出现故障;然而,它似乎以几乎一半的速度从加速度计获取数据?知道这是为什么吗?

[编辑] ---终于得到了堆栈跟踪

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]

新信息,在使用 DDMS 时,我尝试在它冻结时点击“停止进程”,它会杀死应用程序一秒钟,然后它会重新出现并毫不犹豫地继续......奇怪

4

0 回答 0