Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Corona simulator crashes when calling display.captureScreen()
Started by elvo Apr 11 2014 04:01 AM

14 replies to this topic
simulator crash capturescreen
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

elvo

[GLOBAL: userInfoPane.html]
elvo
  • Enthusiast

  • 43 posts
  • Corona SDK

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.


[TOPIC: post.html]
#2

ToeKnee

[GLOBAL: userInfoPane.html]
ToeKnee
  • Contributor

  • 232 posts
  • Corona SDK

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.



[TOPIC: post.html]
#3

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi guys,

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

 

Thanks,

Brent



[TOPIC: post.html]
#4

elvo

[GLOBAL: userInfoPane.html]
elvo
  • Enthusiast

  • 43 posts
  • Corona SDK

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



[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,243 posts
  • Enterprise

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?



[TOPIC: post.html]
#6

elvo

[GLOBAL: userInfoPane.html]
elvo
  • Enthusiast

  • 43 posts
  • Corona SDK

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.



[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,243 posts
  • Enterprise

Have you tried it on a device yet?



[TOPIC: post.html]
#8

elvo

[GLOBAL: userInfoPane.html]
elvo
  • Enthusiast

  • 43 posts
  • Corona SDK

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.


[TOPIC: post.html]
#9

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,243 posts
  • Enterprise

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. 



[TOPIC: post.html]
#10

elvo

[GLOBAL: userInfoPane.html]
elvo
  • Enthusiast

  • 43 posts
  • Corona SDK

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.



[TOPIC: post.html]
#11

Nob Studio

[GLOBAL: userInfoPane.html]
Nob Studio
  • Contributor

  • 153 posts
  • Corona SDK

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.



[TOPIC: post.html]
#12

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,243 posts
  • Enterprise

What error are you getting?

 

Rob



[TOPIC: post.html]
#13

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

I believe engineering is aware of this and has a bug report to investigate (36999).

 

Best regards,

Brent



[TOPIC: post.html]
#14

elvo

[GLOBAL: userInfoPane.html]
elvo
  • Enthusiast

  • 43 posts
  • Corona SDK

I've switched to Mac and screen capture works fine now.



[TOPIC: post.html]
#15

Nob Studio

[GLOBAL: userInfoPane.html]
Nob Studio
  • Contributor

  • 153 posts
  • Corona SDK

I believe its just on the windows. I publish the game and it works fine on android.

Anyway for the sample project, it just immediately pops up "Corona Simulator has stopped working"

For my game, it just hang on the screen until I relaunch the game, then it pops up "Corona Simulator has stopped working"




[topic_controls]
[/topic_controls]