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
Contributor
endscha
Posts: 38
Registered: ‎06-07-2010
My Device: BlackBerry Bold 9790
Accepted Solution

Previous instance still active (report to http://go/memoryleaks)

 

I get the above message very sporadically, but it is still a message that should defenitely not appear on a user`s mobile. The message appears as a dialog when I start my app on Bold Touch 9900.

 

The issue has already been discussed in a different thread but the solution found there didn't work for me:

http://supportforums.blackberry.com/t5/Java-Development/Previous-instance-still-active-issue/td-p/37...

 

The app works fine on all other devices, running OS 5.0 or 6.0. This error just occurs on Bold Touch 9900, running OS 7.0.

 

What could be the reason for this message and how can this issue be solved?

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Previous instance still active (report to http://go/memoryleaks)

if you use eclipse:
set a breakpoint and check the running threads in the debug view.

in the JDE i also see the running class if there is one, i had similar problems once with a PushListener.

as you say the other thread did nothing for you: do you use no listeners?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
endscha
Posts: 38
Registered: ‎06-07-2010
My Device: BlackBerry Bold 9790

Re: Previous instance still active (report to http://go/memoryleaks)

Thank you for the quick reply!

 

The problem just occurs on OS 7.0, the app runs just fine on all other platforms ... this is what made me think there might be another reason for my issue.

 

As suggested in the thread stated above, I've checked all of the listeners added since the last release for deregistration before calling System.exit(0). I couldn't find a problem here, but I'll check again.

 

Where should I set a breakpoint to check the running threads? Right before the call of System.exit(0)? What should I be looking for especially?

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Previous instance still active (report to http://go/memoryleaks)

the breakpoint position is not important as you are looking for a thread that is still active in your old application instance.

it seems the JDE has the better display there, it shows my the type of the application running (for example the PushListener).
maybe you can enable this information in eclipse, but i don't know how
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
endscha
Posts: 38
Registered: ‎06-07-2010
My Device: BlackBerry Bold 9790

Re: Previous instance still active (report to http://go/memoryleaks)

thank you for the tip, I'll check that right after the weekend and let you know the results.

Contributor
endscha
Posts: 38
Registered: ‎06-07-2010
My Device: BlackBerry Bold 9790

Re: Previous instance still active (report to http://go/memoryleaks)

[ Edited ]

I have checked the app for threads from a previous instance that are still active. Everything worked as expected (no threads of old instances active).

 

This was followed by another check of all listeners used in the app. I eventually found out that I used a Player object (for music playback) to which I added 2 PlayerListeners but only removed one of them. I hope this was the reason for this error. At least up to now, the error has not been shown again.

 

Thank you very much for your support!