마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

오류 발생원인에 대해서 질문드립니다

0 추천

안드로이드 AsyncTask onPreExecute() 메소드에서 프로그레스바가 무한로딩되는데요

로그 보니까 DisplayListCanvas is started on unbinded RenderNode (without mOwningView)

해당 오류가 발생합니다 구글링 해봤는데 정확한 답변을 얻지 못해서 여기에 질문합니다

답변 부탁드리겠습니다

감사합니다

소스부분

- AsyncTask

class DoAsyncTask extends AsyncTask<Void, Integer, Integer>{
        private Intent m_intent = null;

        @Override
        protected void onPreExecute(){
            m_pgrDlg = s.MyProgressBar.show(PalmBox_FileSecurity.this, "Loading..", "Loading..", false, false, null);

            super.onPreExecute();
        }


* doInBackground 에서는 파일 다운로드를 진행합니다

- ProgressBar

public static MyProgressBar show(Context context, CharSequence title, CharSequence message, boolean indeterminate, boolean cancelable, OnCancelListener cancelListener)
	{
		MyProgressBar dialog = new MyProgressBar(context);
		dialog.setTitle(title);
		dialog.setCancelable(cancelable); 
		dialog.setOnCancelListener(cancelListener);
		
		/* The next line will add the ProgressBar to the dialog. */
//		dialog.addContentView(new ProgressBar(context), new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
		ProgressBar progress = new ProgressBar( context );
		progress.setBackgroundDrawable( new ColorDrawable( Color.TRANSPARENT) );
		dialog.getWindow().setBackgroundDrawable( new ColorDrawable( Color.TRANSPARENT) );
		
		dialog.addContentView(progress, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
 
		dialog.show();

		return dialog;
	}

 

우랴 (3,680 포인트) 님이 2016년 11월 29일 질문
우랴님이 2016년 11월 29일 수정
AsyncTask부분 소스를 올려주세요
이제 봤네요 ㅠㅠ 전체 소스는 올릴수 없어서 일부분만 올렸습니다...

1개의 답변

0 추천
안녕하세요

소스에는 이상이 없어보이고 제한적으로 보여주셔서... 유추하기가 어렵네요

Android Monitor에도 저 에러메세지만 뜨나요? 다른 메세지는 안뜨나요?

프로그레스바 무한 로딩된다는 의미가  혹시 이거 처리 안하셔서 그런거 아닌가요?
protected void onProgressUpdate(Integer... progress){
            progressBar.setProgress(progress[0]);
}
히로시 (10,800 포인트) 님이 2016년 11월 29일 답변
답변감사드립니다 전체소스를 보여드릴수없어서 죄송합니다 ㅠ
오류 증상이 onPreExecute() 메소드에서 계속 무한로딩되서
doInBackground() 메소드를 호출하지 못하고
11-24 15:53:41.758: D/ViewRootImpl(2346): #1 mView = com.android.internal.policy.PhoneWindow$DecorView{25ac5cd I.E...... R.....ID 0,0-0,0}
11-24 15:53:41.808: W/DisplayListCanvas(2346): DisplayListCanvas is started on unbinded RenderNode (without mOwningView)
 11-24 15:53:41.808: W/DisplayListCanvas(2346): DisplayListCanvas is started on unbinded RenderNode (without mOwningView)
 11-24 15:53:41.818: D/ViewRootImpl(2346): MSG_RESIZED_REPORT: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=2
 11-24 15:53:41.818: D/ViewRootImpl(2346): MSG_RESIZED_REPORT: ci=Rect(0, 72 - 0, 0) vi=Rect(0, 72 - 0, 0) or=2
 11-24 15:53:41.848: I/Timeline(2346): Timeline: Activity_idle id: android.os.BinderProxy@4ffdf64 time:427311716
오류를 내뱉습니다
커스텀 프로그레바 말고 일반 프로그레스바 해도 동일한 현상이 나타나나요?
doInBackground() 콜백 메소드라서 바로 호출될텐데 안되는 거면 커스텀 프로그레스바 문제가 있는 것 같습니다.
onPreExecute() 에 아래 내용으로 해보실래요? 프로그래스 다이얼로그임

            ProgressDialogdialog = new ProgressDialog(MainActivity.this);
            dialog.setMessage("조회중");
            dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
            dialog.setButton(DialogInterface.BUTTON_NEGATIVE, "취소",
                    new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int which) {
                            cancel(true);
                        }
                    });
            dialog.show();
답글이 늦어서 죄송합니다
오류 로그를 다시 받아서 확인해봤는데요
처음에 onPreExecute()  메소드를 호출하고 db 오픈을 시도하는데 여기에서
android.system.ErrnoException: chmod failed: EPERM (Operation not permitted) 이 오류가 발생하는 것 같아요
...