Publisher closed input channel or an error occurred. events=0x8

若如初见. 提交于 2019-12-03 08:42:43

问题


02-12 18:48:57.049: E/InputQueue-JNI(4659): channel '2be9da40 com.forwardapps.liveItems.LiveItemsService (client)' ~ Publisher closed input channel or an error occurred. events=0x8

I'm getting this error in Ice Cream Sandwidth(ICS) whenever I set my livewallpaper as the background. It works fine on all other versions of android.

Does anyone know what's going on here or could they explain it?


回答1:


Are you actually seeing a problem, or just being troubled by the error message? This message is printed I believe when the client side of the input event pipe fails because the server has closed the connection. This could happen for example if you don't close a window when your activity is being destroyed.




回答2:


Place a try, catch block around the code that draws the canvas.

More specifically:

Canvas canvas = null;

    try {
        canvas = _surfaceHolder.lockCanvas(null);
        synchronized (_surfaceHolder) 
        {
            onDraw(canvas);
        }

        if(canvas != null)
        {
            _surfaceHolder.unlockCanvasAndPost(canvas);
        }
    } catch (Exception e) {
        e.printStackTrace();
    }


来源:https://stackoverflow.com/questions/9251649/publisher-closed-input-channel-or-an-error-occurred-events-0x8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!