views:

365

answers:

2

how to rectify this Window Leaked Exception. i cant find why its occured. My LogCat Info:

05-07 17:25:05.402: ERROR/WindowManager(13595): Activity com.codecarpet.fbconnect.FBLoginActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@433b9ae0 that was originally added here
05-07 17:25:05.402: ERROR/WindowManager(13595): android.view.WindowLeaked: Activity com.codecarpet.fbconnect.FBLoginActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@433b9ae0 that was originally added here
05-07 17:25:05.402: ERROR/WindowManager(13595):     at android.view.ViewRoot.<init>(ViewRoot.java:214)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at android.view.Window$LocalWindowManager.addView(Window.java:409)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at android.app.Dialog.show(Dialog.java:238)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at android.app.ProgressDialog.show(ProgressDialog.java:107)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at android.app.ProgressDialog.show(ProgressDialog.java:95)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at com.codecarpet.fbconnect.FBProgressDialog.show(FBProgressDialog.java:106)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at com.codecarpet.fbconnect.FBDialog$WebViewClientImpl.onPageStarted(FBDialog.java:508)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:214)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at android.os.Looper.loop(Looper.java:123)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at android.app.ActivityThread.main(ActivityThread.java:4203)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at java.lang.reflect.Method.invokeNative(Native Method)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at java.lang.reflect.Method.invoke(Method.java:521)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
05-07 17:25:05.402: ERROR/WindowManager(13595):     at dalvik.system.NativeStart.main(Native Method)
+1  A: 

Is it possible that you already left an activity and then you're raising a dialog?

Alex Volovoy
+1  A: 

Call <yourDialog>.dismiss() in the onPause method of your Activity.

molnarm