03-22-2010 12:56 PM
I am developing an application for BlackBerry with around 20 -25 MainScreens after navigating through the screens for some time the application crashes with too many threads exception. I am using invokeLater to push each screen
any way to resolve this issue ??
Solved! Go to Solution.
03-22-2010 01:20 PM
Without actually seeing your code it will be hard to point you to where it may be going wrong. But 20 to 25 screens sounds already a lot. Are you pushing them all one after the other? I think a stack of more than 10 screens should alarm you.
Also you don't always have to use invokeLater to push a screen. You only have to use that if you want to push a screen from a non UI thread.
03-22-2010 01:41 PM
My application is a having 23 different screens and based on the states different screens need to be pushed.
The overall architecture is as follows
screen = mainScreen1();
screen = mainScreen2();
screen = mainScreen3();
screen = mainScreen20();
This is how we had implemented. Do u have any suggestion for this implementation.
03-22-2010 01:58 PM
I am not quite sure yet if I really follow your thoughts but why would you initialise 23 screens all at once and then push only one?
The code below doesn't make any sense as it stands there. Why would you assign the return value of mainScreen1() to the local variable of screen and then the mainScreen2() overwrites it straight after?
03-22-2010 02:05 PM
All the 23 screns are not initialized in one shot
its actually as follows
static MainScreen screen;-global variable
case 1:screen = new MainScreen1();
case 2: screen = new MainScreen2()