enter "finish" state when not calling finish() causing BadTokenException
<p>I have a very weird behaviour, which I cant find its cause.
the last thing I do on onCreate() is to call a certain method.
in that method i use<br>
<strong>progressDialog = ProgressDialog.show(this, null, "Registering with Moish'd! server", true, false);</strong>.<br>
on the first run i get BadTokenException: Unable to add window on the <em>progressDialog</em> line.
the second run it passes it.<br>
I read in forums that if the activity is in the middle of "finish" process than it might cause such an excetion.<br>
after a long debugging tests, i tried asking for isFinishing(). something odd accoured - before calling the method, <strong>isFinishing() returns false</strong>.in the first line of the method I ask again and now <strong>isFinishing() returns true</strong>. 
how can it be ?!?  in the last line before entering a method its not "finishing" and in the first line of the method its suddenly "finishing", when NOTHING is happening in between (certainly not calling finish()).  anyone ?!?</p>
