android - IllegalArgumentException: View not attached to window manager . Dialog.dismiss -


i have little error want rid of. have no idea why error occurs. simulator , test phone runs perfect! info have stacktraces got app users in android market.

java.lang.illegalargumentexception: view not attached window manager @ android.view.windowmanagerimpl.findviewlocked(windowmanagerimpl.java:355) @ android.view.windowmanagerimpl.removeview(windowmanagerimpl.java:200) @ android.view.window$localwindowmanager.removeview(window.java:432) @ android.app.dialog.dismissdialog(dialog.java:278) @ android.app.dialog.access$000(dialog.java:71) @ android.app.dialog$1.run(dialog.java:111) @ android.os.handler.handlecallback(handler.java:587) @ android.os.handler.dispatchmessage(handler.java:92) @ android.os.looper.loop(looper.java:123) @ android.app.activitythread.main(activitythread.java:4627) @ java.lang.reflect.method.invokenative(native method) @ java.lang.reflect.method.invoke(method.java:521) @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:858) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:616) @ dalvik.system.nativestart.main(native method 

first thought code below cause application crash if user change phone's orientation while progress dialog not yet dismissed. made shure orientation not change adding: android:screenorientation="portrait". error still alive.

could 1 me out? code example use:

final progressdialog pd = progressdialog.show(this, "title", "message",  true, false);  new thread(new runnable(){ public void run(){     makehttprequest();     pd.dimiss(); } }).start(); 

did put android:screenorientation="portrait" in activity or in appication? exception occurs when dialog not dismiss, when activity stops, means should handle dialog dismiss in onpause/ onstop. have face issue once.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -