Closed abigpotostew closed 8 years ago
@abigpotostew, I'm not sure it's caused by the IDE. There used to be a very similar (maybe the same) issue couple of years ago, which was caused by the mechanism in Corona that detected that the application was hanging and restarted it. It was generally happening when running under the debugger and the Corona folks have changed something to avoid that, although I do have some simple logic that attempts to help with this issue in the Corona sample I have:
function onUpdate(event)
-- let the first call to onUpdate to return quickly;
-- start the debugging during the second call to trick Corona SDK
-- and avoid restarting the app.
if done == nil then done = false return end
if not done then
require("mobdebug").start()
done = true
end
...
I don't remember it ever happening on running the application. Do you have a different version of Corona SDK installed? Or maybe try on their latest nightly build to see if it's fixed there. What if you run the same command from the command line (outside of the IDE)? If the simulator is only started once, it doesn't seem to be related to the IDE.
Can't recreate on latest versions of all my software. thanks
Start debugging with corona interpreter seems to run main.lua twice. I can't reproduce with Lua / Lua5.3 interpreters. Using latest dev version on Mac. Mobdebug is not required to reproduce. But you can put a breakpoint in the code with mobdebug running and it will break on that single point twice.
Any program will do it, here's one I used:
Output looks like below. Notice how it runs corona twice.