App doesn't start for the second (and third, and ... ) time

I’m encountering an odd problem. When I install my app on device (doesn’t matter which system) it runs successfully for the first time, everything is in order. The problem I’m having are then next runs as the only thing I get is plain black screen.

Has anyone already encountered a similar problem, and if yes, how did you solve it?

I don’t have a clue where to start searching for this bug. I went through the whole code, removed all globals and put them in a separate file, am explicitly removing all elements, am removing Runtime listeners at applicationExit system events and am currently running out of ideas what else could be wrong.

I’m using build 2100 and Win8.

I will be thankful for any tips :slight_smile:

Cheers, Pjanc

Can you examine your device’s console log?  If you don’t know how to do that, see:

http://forums.coronalabs.com/topic/43074-question-on-new-api-in-2123-string-describing-the-hardware-and-software-platform/

Rob

Thans for the tip :slight_smile:

I don’t know if I did the right thing. On the “Corona Simulator Output” - the console of the simulator - nothing seems to be wrong. I put a bunch of print statements in functions and inspected the workflow - everything seems to be OK, functions with removeEventListeners and timer.cancel are being called at exit (that is, when I restart the simulator). Or is there a way to get this log from the actual device?

Right now I’m suspecting the GPS API to be the problem, as the other app (that doesn’t use it) works just fine and runs without problems for the second, third, … times. Any known bugs?

Pjanc

Ok, I did some thorough googling and found, installed and search through the log from the device. Found the errors - there were lines that aren’t called in the simulator, but I completely forgot about them :slight_smile:

I’m sorry to have wasted your time with this.

Pjanc

This is why we ask you look at your device’s console log!   The Simulator log isn’t always going to show errors that can happen on device.

No need to apologize.  That’s why we are here!

Rob

Can you examine your device’s console log?  If you don’t know how to do that, see:

http://forums.coronalabs.com/topic/43074-question-on-new-api-in-2123-string-describing-the-hardware-and-software-platform/

Rob

Thans for the tip :slight_smile:

I don’t know if I did the right thing. On the “Corona Simulator Output” - the console of the simulator - nothing seems to be wrong. I put a bunch of print statements in functions and inspected the workflow - everything seems to be OK, functions with removeEventListeners and timer.cancel are being called at exit (that is, when I restart the simulator). Or is there a way to get this log from the actual device?

Right now I’m suspecting the GPS API to be the problem, as the other app (that doesn’t use it) works just fine and runs without problems for the second, third, … times. Any known bugs?

Pjanc

Ok, I did some thorough googling and found, installed and search through the log from the device. Found the errors - there were lines that aren’t called in the simulator, but I completely forgot about them :slight_smile:

I’m sorry to have wasted your time with this.

Pjanc

This is why we ask you look at your device’s console log!   The Simulator log isn’t always going to show errors that can happen on device.

No need to apologize.  That’s why we are here!

Rob