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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 65
Registered: ‎01-05-2010
My Device: Not Specified

Installing app on device restarts (or crashes?) the device

Is this normal?  

 

I am using the following commands (in a batch file) to install my application on the device:

 

@echo offset JAVALOADER=C:\Java\Blackberry-1.1\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.14\components\bin\javaloader.exe
cd deliverables\5.0.0
"%JAVALOADER%" -usb load Summit.jad
cd ..\..

SInce my last build (a small change to a URL in the code) when I try and load this application, it resets the device (which I then have to wait several minutes for it to boot up).  

 

 

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Installing app on device restarts (or crashes?) the device

if your app is still running, or has a background process running, the BB has to reboot to replace it.

----------------------------------------------------------
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
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Installing app on device restarts (or crashes?) the device

To expand on simon_hain's comment, most likely an object of a class that is defined in your application is still referenced (hard- or soft-) from somewhere (a process hosting your app is still running, or it may be a listener you forgot to unregister, or an object of yours stored in the RuntimeStore or Persistent Store).

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

Re: Installing app on device restarts (or crashes?) the device

Some additonal reasons here:

 

What Is - The reason a reset is required when upgrading an application
Article Number: DB-00602
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800620/What_Is...

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Installing app on device restarts (or crashes?) the device

It looks like issue 7 from the above KB has been resolved on v5.0+ handheld software. I can easily update an application consisting of one large application-type module (i.e., split into multiple sibling modules) without the need to reboot. It's much faster than restarting the simulator after a code change.

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

Re: Installing app on device restarts (or crashes?) the device

[ Edited ]

Agreed, and I don't think that article is a complete list anyway.

 

Further discussion here too:

http://supportforums.blackberry.com/t5/Java-Development/Error-module-is-in-use/td-p/52660

Developer
Posts: 65
Registered: ‎01-05-2010
My Device: Not Specified

Re: Installing app on device restarts (or crashes?) the device

thankyou all

 

My app is very much in the early stages of development and I am still very much learning about blackberry development.  I do use the persistent object store, perhaps I have forgot to close my reference to it once finished.

 

Also, I have a background thread processing a job queue, do I need to take special action to close that thread?

 

Also, when the user hits the back button at the top level screen, do I need to respond to that in some way to properly close off my application?

 

This is all stuff that I will need to find out during the development of this app, and I would normally just cross each bridge as I came to it.

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

Re: Installing app on device restarts (or crashes?) the device

If you have extended MainScreen, then I understand that the default action on close() at the top layer is to do a System.exit().  This will kill your Thread, possibly at an inconvenient point,- that depends on your Thread processing.  It might be better to override the close() on the top level screen, put the App in the Background (so the user thinks it is gone), then tell the Thread it is time to go.  When the Thread reaches a convenient point it can call System.exit(). 

Developer
Posts: 65
Registered: ‎01-05-2010
My Device: Not Specified

Re: Installing app on device restarts (or crashes?) the device

[ Edited ]

I get restarts now installing an application immediately after a restart, so it can't be that the code is running.

 

I am using: javaloader.exe -usb load appname.jad

 

This is extremely annoying because it takes so long to restart.

 

*edit* this is on a Storm II

 

 

 

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

Re: Installing app on device restarts (or crashes?) the device

Not sure I understand this:

 

"I get restarts now installing an application immediately after a restart".

 

If you have some start up code - for example something that changes the application icon,  then restarting the device before you update your application is not going to help is it?

 

Try deleting your application, then restarting, then updating.  Tell us if that causes a restart.