Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Sunilkumar
Posts: 75
Registered: ‎07-21-2009
My Device: Not Specified

process terminated

Hi all,

 I got this issue when i restart the phone and start a thread.below is my  code.

 

 

 

 

//in main    
iMainAppClass = new MainAppClass();    
    iMainAppClass.enterEventDispatcher();   
 .............................................
    
    MainAppClass()
    {
    
     iAppThread =new AppThread ();
     iAppThread .startthread();
     iAppThread .start();
    
    }

........................................................


private class AppThread extends Thread { public void run() { for(;;) { if(condition) return; try { Thread.sleep(600); Thread.yield(); } catch (InterruptedException e) { // TODO Auto-generated catch e.printStackTrace(); } } } }

 

 

Please use plain text.
Developer
Sunilkumar
Posts: 75
Registered: ‎07-21-2009
My Device: Not Specified

Re: process terminated

Hi, Please anybody reply on above issue .i need to know what is wrong in above code.

 

Thanks,

sunil

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: process terminated

And exactly what issue do you get?  Have you run this in the simulator so you know what line is causing the problem?

 

And what does this line do?

iAppThread .startthread();

Please use plain text.
Developer
Sunilkumar
Posts: 75
Registered: ‎07-21-2009
My Device: Not Specified

Re: process terminated

[ Edited ]

Hi peter,

 Thanks for reply. i got app 169 process terminated. app is not responding.actaully startthread  just set the condition flag false nothing else in that funtion.this thread continuesly run at background after reboot the real device 8900 curve.

is that becouse i sleep the thread, does it create the problem?

 

Thanks,

sunil

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: process terminated

There doesn't appear to be anything wrong with your Thread.  I would try the application with everything remaining the same, except that I would not start the Thread (i.e. comment out  .start()).  That will see if the problem is in your Thread or elsewhere. 

Please use plain text.