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
New Contributor
Posts: 9
Registered: ‎06-16-2010
My Device: Bold 9700
My Carrier: MTN

Redundant Screens, Blackberry App Freezing, Singleton Problem?

Hello Developers,

 

I have been trying to debug a problem with my blackberry app for a while now. The problem is that on Exit of application, I  get to see a screen of my app still displayed. This Screen doesnt respond to interactions i perform on it, unlike the same instance of the Screen when the application is running fine.

 

The only possible problem i see is that I store my main screen instances (3 of them) as Singletons in my UiApplication class (i do not use RuntimeStore). I do this because I radically move between one screen to the other, and also I store a form of alert notifications per screen which i always want to update.

 

Could this be the problem? Please help.

 

Code excerpt below:

 public synchronized PrivateChatScreen getPrivateChatScreen() {
		if (privateChatScreen == null) {
			privateChatScreen = new PrivateChatScreen();
		}
		return privateChatScreen;
	}

Developer
Posts: 19,633
Registered: ‎07-14-2008
My Device: Not Specified

Re: Redundant Screens, Blackberry App Freezing, Singleton Problem?

This problem is typically a result of popping the last screen off the display stack without exiting the application.  From then on, the OS does not know what to display when your Application is in foreground, so just displays the last screen image it had.  There is no interaction with it, because in fact all you have is an image.  So check all your pops and make sure that you don't do one too many.