Updated Corona SDK and now win32 build wont run

Hi,

Title says it all.

Runs fine in simulator and on android device but the win32 build refuses with the following error, which i need some help with:

12:09:20.005  ERROR: Runtime error

12:09:20.005  ?:0: attempt to index global ‘display’ (a nil value)

12:09:20.005  stack traceback:

12:09:20.005  ?: in main chunk

12:09:23.220  Application closed with exit code: -1073741819

of course I dont have any display global in my code.

Anaqim

Some more info:

I updated to the latest stable release, which is when this new error occured.

I then tried the latest daily build 3158 but the issue reiman.

I’ve tried to comment out anything in config and code I could think of to try and find the trigger, but no luck.

I then tried to make a win32 build of my current released version of Radiance, which is win32 and macos only, and got this:

13:50:44.052  ERROR: Runtime error

13:50:44.052  ?:0: attempt to index global ‘system’ (a nil value)

13:50:44.052  stack traceback:

13:50:44.052  ?: in main chunk

13:50:49.102  Application closed with exit code: -1073741819

Something is clearly funky.

I need to clarify one thing, the errors do not occur when building the app, but when I try to run the exe.

  1. Have you tracked down the first point you try to use system.* functions or fields?

  2. Did you use it in config.lua?

  3. How about a basic test app, does anything work or is this specific to your app?

  4. Re: display.  “display is a global in all apps, it is the display.* library hook.”   This is weird sounding, like Corona hasn’t fully initialized before trying to run your code.

I’ll install 3158 a bit later and try building some stuff to help dig into this.

I ran some experiments and this is what I have so far:

  1. I installed 3158 on my Windows 10 machine.

  2. I built and ran three different apps with these results:

  • Widget Demo (comes with Corona) - WORKED
  • Random Small App of My Own (uses SSK2) -  WORKED
  • Biggest and Most Complicated Project I Have (Multi-user Cloud Connected Storybook Editor for client). -  FAILED with similar ‘system’ error message.

What this means, I don’t know.  I’ll roll back a few versions till this stops happening and see when this starts occuring.

@anaqim You should do this too.  Find the last working version of Corona.  This will help identify the change or changes that are related ted this problem.

Hi,

I’ve tried several projects that was working win32 builds and none work after the update, so i was kind of hoping someone else could verify the same issue, before I start to look for a reasons in my code(s). To me its pretty clear something has changed. My previous working corona build was the previous stable version (i prefer stable version unless i must have/fix something)

Yes I always use config.lua, pretty basic stuff.

Checked the build files as well.

I just tried the “hello world” project and behold it worked fine as a win32 build.

Sigh, so the big question the is, what changed and made something in my code(s) incompat…

Anyone else, experiencing this with any apps?

Anaqim

Hi again, I’ll do so but my internet is very slow so it will take some time.

Will get back with the results.

I rolled back to 3130 and still have the same failure, so I went way back to 3059 and this is more promising, however as is won’t to happen when debugging I encountered a new issue.  

Continuing to investigate.

3120 has the same error

OK, I found an anchor point.  3001 works fine for me.  Now I’ll start to roll forward till I experience issues.

3100 not working, i’ll keep testing too

too bad i cannot see what was the previous stable build

3068 also failed and if i am not mistaken, that was the previous build.

something fundamentl seem to have changed.

are you on windows 10 and with latest large update?

I’ve noticed some changes in the windows folder structure and I have a slight feeling it may be messing up new corona installs

i am 100% sure 3068 was working before so im kinda stuck at believing something in the corona install procedure has changed and/or is no longer fully compatible with the new windows 10 folder structure

i’ll try 3059 as well

Well, there is a similar error when using display.* functions in config.lua in desktop applications but seems here is another case.

3059 dont work, this is really weird, im now back installing builds way older than the one I had installed since before the windows 10 update, and which was working fine, with liveBuild and all.

using display function in config.lua is something i do, but only display.pixelHeight and Width

kinda need those

have tried all of this on two different windows 10 machines btw

Well… that’s a problem.

It’s a chicken & egg issue. We need to read your “config.lua” file to determine what the pixel width and height of the window should be, which of course means the display.* Lua APIs can’t be ready for you to use since the pixel width and height you want to read haven’t been determined yet.

Try this advice

https://forums.coronalabs.com/topic/62568-blured-images-in-win32-app/?p=324852

I took a wrong turn here.  I managed to roll forward to 3059 and am still in good shape.

I don’t know about your system, but I have to give my antivirus app time to ‘learn that the new install is safe’.  I think I rushed my last 3059 build and hosed up the results.

Anyways, continuing to roll forward.

The good news is the failure is probably from some change more recent.