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
Trusted Contributor
Posts: 176
Registered: ‎04-12-2012
My Device: Bold 9780 & Curve 8250
My Carrier: vodacom

Application only opens when clicking on Icon twice

Hello all

 

When i want to open my application I have to click on the Icon twice before it opens, I Do have an alternate entry point Does that maybe have to do with the double clicking?

 

If any one has a method to over wrtite this issue please do let me know or if there are any possible sollutions.

 

Thank you Smiley Happy

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

Re: Application only opens when clicking on Icon twice

difficult to say without looking at the code.
do you use any static variables? note that those are not shared between entry points, each uses them with its own values which can be misleading.
does it also happen on the simulator? did you debug it and set some breakpoints in main?
----------------------------------------------------------
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
Trusted Contributor
Posts: 176
Registered: ‎04-12-2012
My Device: Bold 9780 & Curve 8250
My Carrier: vodacom

Re: Application only opens when clicking on Icon twice

I believe I do have Static variables in the application. I will take a look into the static variables.

 

I have not tested on the simulator, running into problems on the Simulator Start up and it is generally easier to test on device Smiley Happy

 

I did debug the application, Please can you explain to me what you mean by break points and is there anything specific I should look for when debugging in this situation.

 

I would give give you a code snippet but there is quite a bit of code to post

 

Thank you Simon.

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

Re: Application only opens when clicking on Icon twice

a breakpoint signals the debugger to stop and enables you to go step by step through the code (for example).

i suggest that you check if you have any status variables in a static context.
if you need variables shared between contexts (entry points) you can use the runtimestore.
----------------------------------------------------------
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
Trusted Contributor
Posts: 176
Registered: ‎04-12-2012
My Device: Bold 9780 & Curve 8250
My Carrier: vodacom

Re: Application only opens when clicking on Icon twice

Do you Know how to use the debugger mode in eclipse or do you maybe have a link of how it works, I have tried playing around with it to figure out how it works but no luck.

 

When I debug I only use the "console".

 

I will go through the static variables, thank you.

 

Highlighted
Developer
Posts: 16,786
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Application only opens when clicking on Icon twice

to set a breakpoint you doubeclick on the blue bar on the left side of the code window.
you can also set breakpoints in the run menu.
sometimes helpful are also exception breakpoints, you also add them in the run menu.

also check tutorials on the web like
http://www.vogella.com/articles/EclipseDebugging/article.html
or the KB like
http://supportforums.blackberry.com/t5/Java-Development/How-to-Debug-and-Optimize/ta-p/442791
----------------------------------------------------------
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
Posts: 11
Registered: ‎03-05-2013
My Device: bold
My Carrier: Airtel

Re: Application only opens when clicking on Icon twice

Hi,


Facing same issue.

Application worked fine for many days without this problem.

We added couple of functionalities together (BB Analytics and Push Messaging)

After adding those we are facing same.


Here is what happens on debugging with step by step execution
Constructor of UI class gets executed, after main thread gets called,
debugger gets locked, hanging completely OS completely.

(Line is enterEventDispatcher()Smiley Wink


If I am not debugging then app gets opened after second tap.


How can try to solve this issue?

 

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

Re: Application only opens when clicking on Icon twice

welcome to the support forums. please open your own thread for your issue, you can link to relevant threads.

note that enterEventDispatcher does not return, so that is kind of intended.
----------------------------------------------------------
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