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

前端 未结 2 1056
天命终不由人
天命终不由人 2021-02-04 03:36

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.

2条回答
  •  一个人的身影
    2021-02-04 04:19

    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();
        }
    

提交回复
热议问题