Runtime error "timer.lua:50"

Hi,

my (android) app crashed with this error messages:

/Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/timer/timer.lua:50: attempt to index local ‘entry’ (a nil value)

Where I can look for the cause?

I cannot reproduce the error…

Thank you

S.

Are you using timers anywhere?

Yes, I’m using timers, but I took it off  (for other reasons) in that section.

But I was not clear what was the mistake.

What is it about the ‘entry’?

Hello,

I have de same problem and can´t solve it. I use timers but i clear all using this:

[lua]for id, value in pairs(timer._runlist) do
timer.cancel(value)
end[/lua]

Where are the problem? or How can  i do to solve it?

Thanks you.

Well value is most likely nil.  We need more code.  We also need the full error message you’re getting.

Rob

Hello,

The full error message is:

Runtime Error

/Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/timer/timer.lua:50: attempt to index local ‘entry’ (a nil value)

 

Where I can look for the cause?

 

Thanks.

You should be looking out for your timers. It’s the timer code in Corona SDK that’s causing the error which means you’re doing something wrong with timers.

Maybe you should include an if check in your code before you cancel the timer.

for id, value in pairs(timer.\_runlist) do if (value) then timer.cancel(value) end end

I going to try this bgmadclown, thank you.

This error is very simple. You are passing nil to timer.cancel()

Rob

Are you using timers anywhere?

Yes, I’m using timers, but I took it off  (for other reasons) in that section.

But I was not clear what was the mistake.

What is it about the ‘entry’?

Hello,

I have de same problem and can´t solve it. I use timers but i clear all using this:

[lua]for id, value in pairs(timer._runlist) do
timer.cancel(value)
end[/lua]

Where are the problem? or How can  i do to solve it?

Thanks you.

Well value is most likely nil.  We need more code.  We also need the full error message you’re getting.

Rob

Hello,

The full error message is:

Runtime Error

/Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/timer/timer.lua:50: attempt to index local ‘entry’ (a nil value)

 

Where I can look for the cause?

 

Thanks.

You should be looking out for your timers. It’s the timer code in Corona SDK that’s causing the error which means you’re doing something wrong with timers.

Maybe you should include an if check in your code before you cancel the timer.

for id, value in pairs(timer.\_runlist) do if (value) then timer.cancel(value) end end

I going to try this bgmadclown, thank you.

This error is very simple. You are passing nil to timer.cancel()

Rob