Can you paste your code: Ideally to stop your thread you have to call yourThread.stop()
also if you can have a while loop like this: public void run() { while(yourThread.isAlive() ) { /*Code*/ } } --Shubham On Dec 9, 6:20 pm, Linker <[EMAIL PROTECTED]> wrote: > 12-09 21:18:28.633: DEBUG/myThread(3114): stop > 12-09 21:18:28.633: INFO/ThreadDialog(3114): Dialog is dismissed > 12-09 21:18:28.643: WARN/WindowManager(58): Attempted to add > application window with unknown token HistoryRecord{432813d8 > {android.HTCG1/android.HTCG1.testHTCG1}}. Aborting. > 12-09 21:18:28.653: DEBUG/AndroidRuntime(3114): Shutting down VM > 12-09 21:18:28.653: WARN/dalvikvm(3114): threadid=3: thread exiting > with uncaught exception (group=0x40013e28) > 12-09 21:18:28.653: ERROR/AndroidRuntime(3114): Uncaught handler: > thread main exiting due to uncaught exception > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): > android.view.WindowManager$BadTokenException: Unable to add window -- > token [EMAIL PROTECTED] is not valid; is your activity > running? > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): at > android.view.ViewRoot.setView(ViewRoot.java:384) > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): at > android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177) > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): at > android.view.WindowManagerImpl.addView(WindowManagerImpl.java:90) > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): at > android.view.Window$LocalWindowManager.addView(Window.java:389) > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): at > android.app.Dialog.show(Dialog.java:204) > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): at > android.HTCG1.ThreadDialog$1.run(ThreadDialog.java:32) > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): at > android.os.Handler.handleCallback(Handler.java:542) > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): at > android.os.Handler.dispatchMessage(Handler.java:86) > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): at > android.os.Looper.loop(Looper.java:123) > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): at > android.app.ActivityThread.main(ActivityThread.java:3742) > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): at > java.lang.reflect.Method.invokeNative(Native Method) > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): at > java.lang.reflect.Method.invoke(Method.java:515) > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): at > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run > (ZygoteInit.java:739) > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): at > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) > 12-09 21:18:28.663: ERROR/AndroidRuntime(3114): at > dalvik.system.NativeStart.main(Native Method) > 12-09 21:18:28.683: INFO/Process(58): Sending signal. PID: 3114 SIG: 3 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---