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
William-08
Posts: 50
Registered: ‎07-17-2008
My Device: 8310

BlackBerry MIDlet isn't closed after clicking "Close" menu

I hope any RIM forum admin to look at this issue and provide any fix or work around. I searched the forum, read similar thread, but the thread doesn't solve my case(which solves the issue by de-register some listeners, but my MIDlet doesn't register listeners).

 

The problem:

A MIDlet always shows "Close" menu. Sometimes clicking it the midlet exits completely. But sometimes it doesn't exit completely. Enter the midlet again, it shows last screen exiting from previously, then the first screen of my MIDlet.

 

Investigations:

I found clicking "Close" calls MIDlet.destroyApp(). In my code in destroyApp() I already released "resources" and call notifyDestroyed().

 

In BlackBerry Eclipse plug-in, in debug mode, I found when the MIDlet exits completely, there isn't any MIDlet thread running any more, when the problem happens, the thread list still has one thread of my MIDlet. I did this after exiting my MIDlet, then select "RIM JVM" in "Debug" window, then click "Pause" button.

 

The running thread after MIDlet exit seems like a timer thread. But I already canceled any timer in destroyApp().

 

Questions:

1.How to solve the issue?

2. what "resource" should be released in MIDlet when exiting midlet?

 

Great appreciation for any reply.

 

 

William

EasyDialer -- Calling card dialer, Google Voice Dialer, Conference Call dialer! Relieve the pain of dialing lengthy numbers...
----------------------------------------
If you love it, please let friends know.
If you hate it, please let me know.

Developer
lovish
Posts: 70
Registered: ‎11-24-2009
My Device: Not Specified

Re: BlackBerry MIDlet isn't closed after clicking "Close" menu

Does this happens on device? I suspect this to be some simulator issue

Developer
William-08
Posts: 50
Registered: ‎07-17-2008
My Device: 8310

Re: BlackBerry MIDlet isn't closed after clicking "Close" menu

[ Edited ]

It happens on OS 5.0 9550/9700 simulator and OS 6/9800 simulator. I have not tried it on real device but I guess it will happen too.

William

EasyDialer -- Calling card dialer, Google Voice Dialer, Conference Call dialer! Relieve the pain of dialing lengthy numbers...
----------------------------------------
If you love it, please let friends know.
If you hate it, please let me know.

Developer
William-08
Posts: 50
Registered: ‎07-17-2008
My Device: 8310

Re: BlackBerry MIDlet isn't closed after clicking "Close" menu

Some update. Please help!!! !!!!!!!!!!!

 

I tested on Bold 9700/OS 5.0, the problem happened too.

 

My app has SignIn screen, which is the first screen.

 

There isn't any error popup, but once the problem happened, click "Close" menu( which is always added by device ) SEEMs having exited the app. But, if run the app again, it just shows the previous screen before exit, and I can do nothing but "Close". it should show signin screen.

 

My app doesn't register any listener, it only uses NotificationsManager.triggerImmediateEvent() to trigger an alert. And the notification registration is done in another BB native app.

William

EasyDialer -- Calling card dialer, Google Voice Dialer, Conference Call dialer! Relieve the pain of dialing lengthy numbers...
----------------------------------------
If you love it, please let friends know.
If you hate it, please let me know.