Can a "simple error" crash an app?

Can a “simple error” like , “Warning: timer.pause() cannot pause a timerId that is already expired. (Simulator)”, crash an app when it is already on the phone?

It doesn’t crash on the simulator itself, but what about on the iOS/Android phones?

Thanks a lot community.

By the way, I can’t install it on my phone because i use Iphone. And my laptop is windows :)).

It can do. I’ve had plenty of instances where the app runs fine in the simulator, but crashes on devices. To be on the safe side I would always make sure you’re code is setup to check if objects/timers/etc exist before trying to do anything with them. 

if myTimer then timer.pause(myTimer) else print("timer has already finished") end

In Corona generaly warning ~= error so you can usually ignore it an it won’t have any consequences (it just for information but read it becsuse it may be something important for later use)

Thanks a lot guys … its kinda hard not having a mac or an android device where I could test my app. I’m basically depending on the simulator … and yup I’ll be doing those recommendations.  Thanks again guys! -Corona FAN

I realise it might not be easy, but if you are planning on releasing an app using Corona, I would heavily recommend getting some real devices to test on first.

I’ve lost track of how many times an app worked perfectly in the simulator and didn’t work on the device because of a small mistake I’d made.

By the way, I can’t install it on my phone because i use Iphone. And my laptop is windows :)).

It can do. I’ve had plenty of instances where the app runs fine in the simulator, but crashes on devices. To be on the safe side I would always make sure you’re code is setup to check if objects/timers/etc exist before trying to do anything with them. 

if myTimer then timer.pause(myTimer) else print("timer has already finished") end

In Corona generaly warning ~= error so you can usually ignore it an it won’t have any consequences (it just for information but read it becsuse it may be something important for later use)

Thanks a lot guys … its kinda hard not having a mac or an android device where I could test my app. I’m basically depending on the simulator … and yup I’ll be doing those recommendations.  Thanks again guys! -Corona FAN

I realise it might not be easy, but if you are planning on releasing an app using Corona, I would heavily recommend getting some real devices to test on first.

I’ve lost track of how many times an app worked perfectly in the simulator and didn’t work on the device because of a small mistake I’d made.

Hi, I tried the suggested code but the test result is always true, because what is being tested is the existence of the object myTimer, but you can try the internal variable _expired of the object as follow:

if myTimer._expired then

    timer.pause(myTimer)

end

Regards

Yes it will return true even after expiration, but in my experience, as long as the object exists, even if the timer is no longer active, timer.cancel or pause does not throw an error. It simply does nothing.

Hi, I tried the suggested code but the test result is always true, because what is being tested is the existence of the object myTimer, but you can try the internal variable _expired of the object as follow:

if myTimer._expired then

    timer.pause(myTimer)

end

Regards

Yes it will return true even after expiration, but in my experience, as long as the object exists, even if the timer is no longer active, timer.cancel or pause does not throw an error. It simply does nothing.