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

Web and WebWorks Development

Reply
Developer
marchywka
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

4.7 sim, maybe on real phone apparent hang on Thread.sleep()

I started seeing quirks in 4.7 sim a while back and some people have

reported seeing similar problem on real phone. In some cases, the screen

and everything seem to freeze until a key is pressed when no press was

required prior to 4.7. I got a test case in my own code, essentially something

like this. From a background thread,

 

while (x=y.indexOf(foo, x+1))

{

 someStuff();

System.out.println("doing stuff at "+x);

Vector.addElement(thing);

Thread.sleep(1000);

 

}

 

 

I can see in the sim it stops around the sleep until I hit a key  or something.

Removing the sleep fixes the problem. Is there some issue with thread scheduler

or any other small changes that could account for this? I thought maybe this

was on UI thread or some other dumb thing. I can't rule that out but if

anyone has suspects that would help.

 

 

Thanks.

Please use plain text.
Developer
marchywka
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: 4.7 sim, maybe on real phone apparent hang on Thread.sleep()

sorry, wrong forum can someone please move this to java development?

Thanks. I never use this forum and was just replying to an email alert I got

without looking at specific...

 

Please use plain text.