Main Called Twice on Windows App

Another strange one.  Using build 3108, if I run the App in the simulator the main is called once.  If I compile it and run the Windows EXE the main is called twice!  Causing some issues to be honest as the app is loading the first page twice…

You can recreate it by creating an empty project with a main file with a simple PRINT statement.  Compile it for Windows and run it through the simulator and you will see the print statement twice!

Hi @matt405,

This should be fixed as of daily build 3114. Please download that build or later and test.

Brent

Thanks Brent. My only issue is that from build 3108 my app no longer runs on the Windows build due to the runtime error I am getting as mentioned in my other forum post. So I can’t move forward to 3114 yet. The issue seems to be that I load a config.txt file in my config.lua to set how the screen is to be laid out. I use a system.pathForFile( “config.txt”, system.DocumentsDirectory ) to access the path. This works on all platforms, including Windows, but I noticed in Build 3108 a runtime error was being generated in the simulator log, but the app worked. However from 3109 the app stoped working due to this runtime error (would not even load). Any chance you could reallow the access of files in the config.lua file as it is really handy…

What is the other post/issue, for my reference?

Brent

This is the one - title is misleading as took a bit of digging…https://forums.coronalabs.com/topic/69723-runtimeaddeventlistenersystem-onsystemevent/

Hi @matt405,

I responded to your other post just now.

Hi @matt405,

This should be fixed as of daily build 3114. Please download that build or later and test.

Brent

Thanks Brent. My only issue is that from build 3108 my app no longer runs on the Windows build due to the runtime error I am getting as mentioned in my other forum post. So I can’t move forward to 3114 yet. The issue seems to be that I load a config.txt file in my config.lua to set how the screen is to be laid out. I use a system.pathForFile( “config.txt”, system.DocumentsDirectory ) to access the path. This works on all platforms, including Windows, but I noticed in Build 3108 a runtime error was being generated in the simulator log, but the app worked. However from 3109 the app stoped working due to this runtime error (would not even load). Any chance you could reallow the access of files in the config.lua file as it is really handy…

What is the other post/issue, for my reference?

Brent

This is the one - title is misleading as took a bit of digging…https://forums.coronalabs.com/topic/69723-runtimeaddeventlistenersystem-onsystemevent/

Hi @matt405,

I responded to your other post just now.