Why Would Corona Simulator Appear To Be Running Twice?

I have a situation with the simulator that indicates that it is being run twice at startup. I get startup and shutdown messages twice, one without the hardware being detected, and the second one it detects the hardware properly.

 

The app can be “hello world” type app and it gives the same effect.

 

Can some of you corona wizards give me something to check?

 

I have attached an image of the output screen showing both executions.

 

I have done more testing…

 


 

 

 

print ("screen Width = ", display.contentWidth)

print ("Screen height = ", display.contentHeight)

print ("Device model = ", system.getInfo("model"))

 

 

 

and the simulator output is as follows:

 


 

 

Windows simulator build date: Feb 27 2013 @ 18:48:22

 

 

Copyright (C) 2009-2013  C o r o n a   L a b s   I n c .

        Version: 2.0.0

        Build: 2013.1038

screen Width =  960

Screen height =         540

Device model =  Droid

 

Copyright (C) 2009-2013  C o r o n a   L a b s   I n c .

        Version: 2.0.0

        Build: 2013.1038

screen Width =  1536

Screen height =         2048

Device model =  iPad

 

 

Is this happening to anyone else?

 

What could be causing this problem?

 

 

Thanks!
stu

That’s odd… What skin do you have selected for the simulator?

I don’t know what that does so probably it’s the same one it ships with from Corona…

 

I use Lua Glider but proved it isn’t that by going to one of the sample apps on the SDK and right click open with “Simulator” and got the same results.

 

I am not sure why it tried to HTML-ize the cut-paste when I posted the data.

 

Thanks!

Stu

When I say what skin, when you see the simulator is it showing you an iPad an iPhone4 or some other device?

 

Glider does funny things redirecting the output to capture it for their console and I’ve seen duplicate messages in  their console.  Can you not run Glider goto the folder that has your Corona SDK app (on a mac it’s in /Applications/CoronaSDK and run the “Corona Terminal” app.  This will bring up a text window of output from the Simulator and launch the simulator.  Then do a File->Open and navigate to one of the sample projects and see what shows up in the terminal window.  If you’re on the PC there should be a similar process to get the output in a cmd prompt window.

 

Thanks

Rob

The last output I posted was captured when I right clicked the main.lua file and ran with the simulator. It created two different messages on the output window. One as a droid and the other as an ipad.

 

I have right clicked several code samples from the Corona SDK and it also shows two separate outputs.

 

I noticed this when your table read and write code was tied to startup and shutdown events and it kept doing them twice. 

 

Then I wrote the code stub to show the device type and screen dimensions. That’s when it became clear that it was starting two instances, or starting one up, shutting it down, and then starting the right one up.

 

thanks!
Stu

Any suggestions to stop this behavior in Corona SDK?

 

Tech Support?

Sounds more like a Glider interface issue - I see Rob has chimed in but you’ll probably have the most luck asking in the Glider forum?

If it were a glider issue, it wouldn’t happen if I write a code stub and launch it with corona simulator off the right click options inside windows explorer?

 

I had my suspicions initially and ruled them out by NOT using Lua Glider and writing a code stub that only included the following code:

 

Here is my test code to validate that I’m (and LUA GLIDER) not creating a problem:

 

[lua]

 

print (“height:”,display.contentHeight)

print (“width:”,display.contentWidth)

 

print ("Device type: ",system.getInfo(“model”))

[/lua]

 

Here  is the result of right clicking the above main.lua file and running it on the Corona Simulator

 

 

[lua]

Windows simulator build date: Feb 27 2013 @ 18:48:22

 

 

Copyright © 2009-2013  C o r o n a   L a b s   I n c .

        Version: 2.0.0

        Build: 2013.1038

height: 540

width:  960

Device type:    Droid

 

Copyright © 2009-2013  C o r o n a   L a b s   I n c .

        Version: 2.0.0

        Build: 2013.1038

height: 480

width:  320

Device type:    iPhone

[/lua]

 

If you see the results, you’ll see that it runs the app twice, once emulating a droid, and last as an iphone.

 

Thanks!
Stu

Hi there,

 

Sounds like a strange problem.  Out of curiosity, are you setting anything in build.settings or config.lua?  Or does the test project you just showed consist only of the main.lua file and nothing else?

 

  • Andrew

Also, whats your build platform? PC or OSX?

for the test, there was no config or build.settings file

 

my dev systems are both Windows PC and Mac. The test was run under Windows. About to try it under Mac.

 

Thanks!
stu

no output window on the mac version… strange.

 

So test runs with black screen.

 

Stu

Pretty sure Corona won’t open the console by default on OSX. At least I’ve never seen it. You’d have to either have that loaded properly or use some sort of toolkit option (Sublime, Outlaw, etc)

Should I purge my install of Corona on windows and re-install it?

Make sure your main.lua doesn’t have the glider debug module loading.

the file I posted was edited with NotePad++ and includes only what you see on the listing.

 

Thanks!
Stu

Purging your windows install is a pretty reasonable idea. Lots of stuff can go wrong on Windows. But you’ll probably want to deauthorize first? Not sure what happens if you uninstall without doing that.

OK, After wiping out the current windows Corona SDK install and installing today’s build, it now works with only one instance when I run an app.

 

Thanks!
stu

just when you thought it was safe to get back in the water…

 

Running the same test app, with no other files or config stuff… 

 

here is what the results show:

 

[lua]

 

 

Windows simulator build date: Mar 15 2013 @ 12:20:19

 

 

Copyright © 2009-2013  C o r o n a   L a b s   I n c .

        Version: 2.0.0

        Build: 2013.1056

height: 540

width:  960

Device type:    Droid

 

Copyright © 2009-2013  C o r o n a   L a b s   I n c .

        Version: 2.0.0

        Build: 2013.1056

height: 1136

width:  640

Device type:    iPhone

[/lua]

 

so it has gone back to running the simulator twice, once as a droid and finally as an iPhone. I have copied the app code below to avoid the endless messages.

 

[lua]

 

print (“height:”,display.contentHeight)

print (“width:”,display.contentWidth)

 

print ("Device type: ",system.getInfo(“model”))

 

[/lua]

 

This is on the machine I removed corona and downloaded the latest version and re-installed it. It seemed to work right for a day or so, but is now back to its old tricks. It does not really cause problems other than the load / restore / save code gets screwed up with the dual startup / shutdown whenever I test anything.

 

Thanks!
Stu

Have you used Glider since re-installing?