display.save() make screen stay black.

Well… to my project it IS a critical show stopping bug, and I am failing even to isolate it…
When I use display.save() the screen get black, except whatever I am saving.

The file is saved.

But the screen remain black… does not matter how much time I wait.

I noticed, that when a animation is playing in a old storyboard screen (ie: I make a animation play, swtich to the screen that has display.save() and trigger it before the animation I triggered is supposed to end), it works fine… maybe animations force the screen to refresh and redraw correctly, I dunno.

What I do? Any clue on fixing it or isolating it?

So, what I do? Any clue on how to [import]uid: 142895 topic_id: 26961 reply_id: 326961[/import]

Can you reproduce this with a small sample code (confined to a main.lua file and the images to replicate?)

If so submit a bug report here: http://developer.anscamobile.com/content/bug-submission.

Btw you have to give the system enough time to finish drawing the images before trying to save them.

Wrap your display.save call up into a timer.performWithDelay call (1000 = 1 second) is enough and It will probably work for you

[import]uid: 84637 topic_id: 26961 reply_id: 109520[/import]

Danny,

I am triggering the save when I click a button… it is not matter of waiting :slight_smile:

Also, I cannot write a small sample code now (I will leave soon to make some documents), but I noticed that if I place ANY object that forces the screen to update, the bug does not happen (during the screenshot the screen flashes black), but if the screen is completely static, then the bug happens (the screen get black, until something happen)…

My ultimate test was: But a button that do display.save() and put another button that makes a sprite spin in place (using .rotation ), I click the display.save() button, the screen get black. I click the another button, the screen returns to normal.

If I click the another button first, and click the display.save() button while the sprite is still spinning, the screen flashes black and take the picture correctly. If I keep clicking like nuts, it keeps flashing black and saving… But as soon as its stop spinning, if I click again, it saves the picture, but the screen stays completely black except for whatever thing I am saving. [import]uid: 142895 topic_id: 26961 reply_id: 109671[/import]

Thanks for the additional info, when you get chance to make up the simple test case, please reference my name in the report and I will check it out [import]uid: 84637 topic_id: 26961 reply_id: 109677[/import]