Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

display.save issue can someone with a Mac confirm
Started by Lourenco Dec 16 2019 09:59 AM

- - - - -
11 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Lourenco

[GLOBAL: userInfoPane.html]
Lourenco
  • Contributor

  • 188 posts
  • Corona SDK

Good morning everybody.

I am having an issue with display.save on my Mac 

 

Here is a small program that captures the circle in a display group and displays back the saved images :

local dg = display.newGroup ()
local circle = display.newCircle (dg, 40, 40, 20, 20)

display.save (dg,  { filename="capture1.png", baseDir=system.DocumentsDirectory, captureOffscreenArea=true })
display.save (dg,  { filename="capture2.png", baseDir=system.DocumentsDirectory, captureOffscreenArea=true })


local si1 =display.newImageRect ( "capture1.png", system.DocumentsDirectory, 40, 40)
si1.x = 40
si1.y = 100


local si2 =display.newImageRect ( "capture2.png", system.DocumentsDirectory, 40, 40)
si2.x = 120
si2.y = 100

Tested with Corona daily build 3556 and also all builds afterwards.

 

This works fine on the Mac OS High Sierra version 10.13.6 with NVIDIA Geforce GT Intel HD Graphis. I get 3 circles on the Corona Simulator.

 

But on a Mac OS Mojave version 10.14.6 with Retina display Intel UHD Graphics. The first image capture1.png is a blank image.

 

Can someone with a Mac with Retina display check if the issue is the same?

Thank you.

 

Attached Thumbnails

  • Capture d’écran 2019-12-16   19.05.31.png
  • Capture d’écran 2019-12-16   19.05.31.png
  • Capture d’écran 2019-12-16   19.05.31.png


[TOPIC: post.html]
#2

cerestorm

[GLOBAL: userInfoPane.html]
cerestorm
  • Observer

  • 7 posts
  • Corona SDK

I don't have an identical setup but I've tried it on a Macbook Pro (late '13) running Catalina 10.15.1 with both Intel Iris Pro and Nvidia 750M gpu and I'm getting the three circles wth both of them. This is using the latest build 3562.



[TOPIC: post.html]
#3

Lourenco

[GLOBAL: userInfoPane.html]
Lourenco
  • Contributor

  • 188 posts
  • Corona SDK

Thank you Cerestorm for your test.

 

I updated to Catalina. But the issue is still there.

I think it is related to retina screen.

If someone else can confirm ?

 

Thank you.



[TOPIC: post.html]
#4

cerestorm

[GLOBAL: userInfoPane.html]
cerestorm
  • Observer

  • 7 posts
  • Corona SDK

Just to add, the Macbook has a retina display and I tried all the scaled screen sizes available in the settings using the Intel graphics and the three circles were drawn each time.



[TOPIC: post.html]
#5

Lourenco

[GLOBAL: userInfoPane.html]
Lourenco
  • Contributor

  • 188 posts
  • Corona SDK

Hello,

I think the issue is specific to Intel UHD Graphics 617 Card.



[TOPIC: post.html]
#6

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 614 posts
  • Corona SDK

Do you delay the display.save calls a bit with a timer. As mentioned in the docs?

 

If you need to save a display object on application launch, for example when main.lua is executed to initialize the app, you must call display.save() within a timer.performWithDelay() call. A delay of at least 100 milliseconds is recommended.


[TOPIC: post.html]
#7

Lourenco

[GLOBAL: userInfoPane.html]
Lourenco
  • Contributor

  • 188 posts
  • Corona SDK

Yes, despite a delay the first saved image is blank.

 

Anyway, when I build for device I get the 3 circles.

It is really an issue on the Mac. I get only 2 circles displayed in the Corona Simulator.



[TOPIC: post.html]
#8

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 929 posts
  • Corona SDK

How new is your Mac? I have similar issues on a Mac Mini 2019 (Mojave 10.14.6). Screen captures work fine on devices, but in the simulator they are always distorted somehow.  

I also get crashes if I activate any shaders (as in the entire Mac crashes, not the sim), and some games on Steam have also triggered a hard crash.



[TOPIC: post.html]
#9

Lourenco

[GLOBAL: userInfoPane.html]
Lourenco
  • Contributor

  • 188 posts
  • Corona SDK

Thank you Alan for the test. Glad to hear the issue is reproducible.

This got me crazy until I found that on the device build it is ok, but it is on the simulator that something is breaking.

 

We have recent Mac running Mojave version 10.14.6 and first thought we had to upgrade to Catalina.

We updated to Catalina, and the issue was still there and sometimes the screen freezes completely (see screen capture).

 

​We also thought it was a problem with the graphics card, but we did a test on recent Macs with graphics card Intel Iris Plus Graphics 645 1536 Mo and still the same issue.

 

Similar problems with display.save, display.capture, display.captureBounds, display.captureScreen

 

I filed a bug to Coronalabs teams.

screenFreeze.JPG



[TOPIC: post.html]
#10

Lourenco

[GLOBAL: userInfoPane.html]
Lourenco
  • Contributor

  • 188 posts
  • Corona SDK

So I reported a bug.

But how do I follow the status of this bug? I did not receive any mail from Corona acknowledging they received the bug report, neither did I find a link in my Account settings to find any information.



[TOPIC: post.html]
#11

Lourenco

[GLOBAL: userInfoPane.html]
Lourenco
  • Contributor

  • 188 posts
  • Corona SDK

I reported this bug.

How can I follow the status?



[TOPIC: post.html]
#12

jmansfield

[GLOBAL: userInfoPane.html]
jmansfield
  • Observer

  • 13 posts
  • Corona SDK

Would like to know the solution aswell. When this first happened to me I thought my monitor was broken.




[topic_controls]
[/topic_controls]