Thread related issue
<p>I am trying my hand on thread with basic example. But facing force close.
Here's the code.</p>

<pre><code>   public class ThreadExample extends Activity {

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        Thread myThread=null;
        Runnable runnable=new CountDownRunner();
        myThread=new Thread(runnable);

        myThread.start();
    }
    public void Work(){runOnUiThread(new Runnable() {
        public void run() {


                try{
            EditText ed1= (EditText)findViewById(R.id.ed1);
                        Date dt = new Date(0);
                        int hours = dt.getHours();
                        int minutes = dt.getMinutes();
                        int seconds = dt.getSeconds();
                        String curTime = hours + ":"+minutes + ":"+ seconds;
                        ed1.setText(curTime);
            }catch (Exception e) {

            }
            }
    });
}
class CountDownRunner extends ThreadExample implements Runnable{
    @Override
    public void run() {
        // TODO Auto-generated method stub
        Work();
        Toast.makeText(getApplicationContext(), "PIyush", Toast.LENGTH_LONG).show();

    }
}
</code></pre>

<p>I checked the DDMS and getting this</p>

<pre><code>03-25 00:51:44.145: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 00:54:59.515: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 00:55:44.586: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 00:57:47.935: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 01:01:22.805: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 01:02:00.255: DEBUG/dalvikvm(51): GC freed 16675 objects / 783752 bytes in 171ms
03-25 01:19:34.195: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 01:19:35.235: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 01:20:49.645: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 01:20:57.285: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 01:27:24.475: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 01:28:30.065: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 01:29:44.835: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 01:36:45.355: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 01:38:07.125: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 01:46:00.256: DEBUG/dalvikvm(51): GC freed 16800 objects / 782664 bytes in 205ms
03-25 01:46:58.495: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 01:50:45.075: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 01:58:26.595: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
03-25 01:58:43.965: DEBUG/dalvikvm(51): threadid=15: bogus mon 1+0&gt;0; adjusting
</code></pre>
