Corona simulator crashes when calling display.captureScreen()

The corona simulator crashes when calling display.captureScreen(). The code is very minimal, I just draw a colored rectangle and call display.captureScreen(). On an Android device it works fine. The problem is that I am unable to work on my project if the simulator crashes.

I also noticed that the sample file “ScreenCaptureToFile” that comes with the installation also crashes the simulator.

I am working on Windows and I have Corona version 2013.2100. It worked fine with the previous version 2013.1202

Thank you.

Yeah i had the same problem with the Sim crashing ( on mac).2013.2100

I used it in my main to get screenshots which could be used for the store - not actually part of the app function.

I just commented it out and is working fine - but again i only used it for administration - not part of game, so that may not work for you.

T.

Hi guys,

Can you update to a more recent public build like #2189 and see if the issue still occurs?

Thanks,

Brent

I downloaded and tested on 2014.2189 and unfortunately there is the exact same behavior. 

Do you have any non-ASCII characters in your app’s name?  Can you view your project sandbox and see if there are spaces in the path or spaces in your sandbox name?

There are no non-ASCII characters in the app’s name. There are spaces in the sandbox path but I don’t think this may cause the problem, because the simulator crashes even if I choose not to save the screenshot e.g. local captureScr=display.captureScreen(false)

Any other ideas? I really appreciate your help.

Have you tried it on a device yet?

It works fine on Android. Haven’t tested it in iOS but I suspect it will also work. It seems it is a simulator issue. The problem is I can’t work on my project if the simulator keeps crashing. Because after the screenshot is taken, it should be displayed on screen and then there are some interactions taking place on it. I have to build and test on device to test this functionality.

What I do now to avoid the crashing is to temporary simulate the screenshot with a simple white rectangle of the same size.

skip this–> local captureScr = display.captureScreen(false)

add this–> local captureScr = display.newRect(0, 0, screenW, screenH)

_This way I can work on the interactions that take place with the screenshot. Then on publish I use the captureScreen function. But this is just a trick, I wish the _captureScreen would work.

Can you produce a minimal project that has the issue?  It’s probably something local to your computer because other’s are not experiencing it.  That’s why I was checking to see if it was a file name/path issue. 

The “ScreenCaptureToFile” sample file (that comes with the installation) located in Corona Labs\Corona SDK\Sample Code also crashes the simulator. So I guess it is something related to my computer. The thing is that the captureScreen function worked perfectly in my project until version 2013.1202 (included). Anyway thanks for your help. If you think of something else please let me know.

Yeah i had the same problem with the Sim crashing ( on mac).2013.2100

I used it in my main to get screenshots which could be used for the store - not actually part of the app function.

I just commented it out and is working fine - but again i only used it for administration - not part of game, so that may not work for you.

T.

Hi guys,

Can you update to a more recent public build like #2189 and see if the issue still occurs?

Thanks,

Brent

I downloaded and tested on 2014.2189 and unfortunately there is the exact same behavior. 

Do you have any non-ASCII characters in your app’s name?  Can you view your project sandbox and see if there are spaces in the path or spaces in your sandbox name?

There are no non-ASCII characters in the app’s name. There are spaces in the sandbox path but I don’t think this may cause the problem, because the simulator crashes even if I choose not to save the screenshot e.g. local captureScr=display.captureScreen(false)

Any other ideas? I really appreciate your help.

Have you tried it on a device yet?

It works fine on Android. Haven’t tested it in iOS but I suspect it will also work. It seems it is a simulator issue. The problem is I can’t work on my project if the simulator keeps crashing. Because after the screenshot is taken, it should be displayed on screen and then there are some interactions taking place on it. I have to build and test on device to test this functionality.

What I do now to avoid the crashing is to temporary simulate the screenshot with a simple white rectangle of the same size.

skip this–> local captureScr = display.captureScreen(false)

add this–> local captureScr = display.newRect(0, 0, screenW, screenH)

_This way I can work on the interactions that take place with the screenshot. Then on publish I use the captureScreen function. But this is just a trick, I wish the _captureScreen would work.

Can you produce a minimal project that has the issue?  It’s probably something local to your computer because other’s are not experiencing it.  That’s why I was checking to see if it was a file name/path issue. 

The “ScreenCaptureToFile” sample file (that comes with the installation) located in Corona Labs\Corona SDK\Sample Code also crashes the simulator. So I guess it is something related to my computer. The thing is that the captureScreen function worked perfectly in my project until version 2013.1202 (included). Anyway thanks for your help. If you think of something else please let me know.

this problem is still not solved.

Was trying to build my old games with new sdk, but it crashes everytime when using display.captureScreen

Tried with “ScreenCaptureToFile” sample file and it crashes as well.

using V2014.2393 on windows 7

When using legacy version it works fine.