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
austinfrance
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).  

 

 

Please use plain text.
Developer
simon_hain
Posts: 15,956
Registered: ‎07-29-2008
My Device: Z10 LE
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
Please use plain text.
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).

Please use plain text.
Developer
peter_strange
Posts: 19,601
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...

Please use plain text.
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.

Please use plain text.
Developer
peter_strange
Posts: 19,601
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

Please use plain text.
Developer
austinfrance
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.

Please use plain text.
Developer
peter_strange
Posts: 19,601
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(). 

Please use plain text.
Developer
austinfrance
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

 

 

 

Please use plain text.
Developer
peter_strange
Posts: 19,601
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. 

Please use plain text.