Short black screen after Default.png

I was able to reproduce the Black Screen issue. I think the reason I didn’t see it before is because I was using the latest build (2171) on some pretty recent iOS devices and looking for a black screen that was there for a few seconds. After running some tests on build 2153 with an old iPad1, I see the issue.

I went back and found that the issue was introduced in build 2119 and was fixed in 2155. So builds before 2119 and after 2154 work. For the builds in between, the amount of time the black screen is displayed depends on what is going on in the main.lua file. If the contents loaded in main.lua is small, the time is short. If there is a lot of content and on a slower device, the black screen will be there longer.

On all Graphics 2.0 builds, there is a “short” black screen issue, that is caused by how screen rendering is handle (it’s not there in Graphics 1.0). The amount of time for the “black flash” seems to be dependent on the speed of the device. Faster devices don’t show the issue and it’s visible on older devices (iPhone4 and iPad1).

So with the current daily build, there MAY be a sort black screen between the splash screen and displaying the app. This only happens when the app first loads and it may not be noticeable on the marjory of iOS devices. This delay has been around since Graphics 2.0 was introduced. This issue does not affect Android devices.

Thanks,

Tom

did anyone file a bug report on this ?

I released an app to the store, it suffers from this issue, and it really bugs me every time the app launches.

Cheers,

Tommy

Hi Tom.

Glad that you were able to reproduce it. I just didn’t get what is the Corona position about the bug.

Will Corona fix it or not?

Thanks,

Renato

We are having the same issue.

We have not changed anything in the project that is critical and thus could create this behaviour.

I will file a bug with a working example asap.

Btw, we use Corona Enterprise build - 2123

This is a bug and probably related to memory.

The Hello World example from Corona is showing this bug.

The only trick is that this bug it is not always happening. But, when it stops happening, I noticed that If I go to 2-3 other apps and then come back to the app the bug will show again. So, I am guessing that has something do to with memory…

Hi all,

If this appears to be an issue with memory, I’m not sure what we can do about it, since Corona doesn’t have any control over the OS’s memory. What device(s) and OS versions is this occurring on? iOS and Android both? Which test devices within each platform?

Thanks,

Brent

 I believe this is a Corona issue because:

  1. This not happens with other apps, only the ones made using Corona

  2. This was not happening before, so I would guess this is a bug introduced in a daily build

I am running iOS 7.0.4 on a iPhone 5.  I am using Corona 2014.2155 but this was also happening with 2014.2126.

Hmmm… interesting. Do you have any guess which build it was not occurring in, as in, where there was no visible delay?

Thanks,

Brent

Does not appear to be a memory issue.

The problem happens in builds from 2014.2122 through 2014.2135 and probably (untested) through 2156

There is no problem in build 2109 which is what we ended up using.

 

Hope that helps - thanks for working on this!

Been using Corona a lot more lately.

Hi @ranflas,

Thanks for helping to pinpoint this. And this occurs on every Corona app, even “Hello World”, after you run some other apps and then return to the Corona app? I assume you’re force-closing the Corona app (thus cold-starting it) not resuming it from the backgrounded state?

Brent

And this occurs on every Corona app, even "Hello World", after you run some other apps and then return to the Corona app?

Yes. Just use a white Default-568h@2x.png and also use a white background (otherwise so you would not see the black screen between the Default-568h@2x.png and the app background.)

I assume you're force-closing the Corona app (thus cold-starting it) not resuming it from the backgrounded state?

Yes, you need to close the Corona app. Resuming from background doesn’t show the bug.

Just a clarification, I didn’t say that it was a memory bug, I said that is may have something related to memory, since it usually happens at the first time you open the Corona app. If you force close and open the Corona app in a row, usually the bug does not appear (at least for me). So I just go to other apps and then open again the Corona app and the bug appears.

Obviously this requires building to the device to check for the error.

Feel free to test with “Hello World” on 2109 to see it working properly and 2122 to see the bug introduced.

The prototype I was working with was not much more than a few labels and buttons, but I did not try “Hello World”

I did force-close Corona when I was testing it.

It had nothing to do with running other apps and then coming back to this app - the half a second black screen with status bar happened every single time the app was opened (not resuming from the background state)

One more note, from our experiences, we also have encountered this issue when we build (using enterprise) for android devices!

Tested Device: HTC Desire C

So this is not (in our experience) and iOS bug only

I am always seeing this, however i didn’t think it was a bug until i read this thread, and i suppose its been a bug for a very long time because i have always noticed this…

I’ve observed this issue on v2013.2100 of the Corona SDK only on Android and not on iOS, so not sure if this is indeed a bug in Corona or is there a configuration setting required to fix this. Any help on this would be appreciated though!

I’m seeing this on iOS devices with an app built with Corona Daily Build 2153.

In my case, it happens every time I launch the app.  

If I launch the app, tap on home button, start another app, and the tap the home button, then tap on my app’s icon, it simply shows the last screen I was at, and no black screen.  

However, every time I restart the app (that is, fresh restart with Default png showing), immediately after the Default.png is displayed, I see a black screen long enough to be bothersome.  It’s not just a flicker of blackness.  It is a solid black screen with the status bar.  Please note, the very first line of code I have in main.lua is display.setStatusBar( display.HiddenStatusBar )

I have not tested my latest project with pre-Graphics 2.0 daily build, so I cannot say if this would still happen with older daily build.   That said, I haven’t seen this happen with my already released app made with pre-Graphics 2.0 version.   In addition, I haven’t done anything unusual with my latest project – only difference between this project and previously released apps are the use of latest widget and composer. 

Edit:  According to ranflas, this does not happen with daily build 2109, and vgtrnd mentions this happens with daily build 2100 on Android.   I’m not sure exactly when this issue was introduced, but it definitely did not exist in pre-Graphics 2.0 build.  I think it’s worth looking into this and get it fixed sooner than later.

Naomi

I just built a test app and installed it on my iPad 4 using 2169.  I have a Default.png and Default@2x.png in my test.  I don’t have the iPad specific versions.  In my app, these are the first few lines:

display.setStatusBar( display.HiddenStatusBar )

local bg = display.newRect(display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight)
bg:setFillColor(1,1,1)

When I build and run this, I get no black screens.  I’ve upgraded my iPhone to 7.1 beta, so I’m going to have to update my Xcode before I can try it there.

I repeated the test on 2100 and I’m also not getting a black screen in between.  Now by default Corona SDK has a default black screen.  If you take too long to get something displayed, you’re going to get some black frames until Corona SDK has something to render.

I can’t reproduce this.

Rob

Hmmm… Thank you, Rob, for looking into this.

I don’t have all that much to load (in terms of display objects) when the app is launched – meaning, the first scene that main.lua sends my app to go to does not have many display objects to show.  I admit I do have a fair few things going in main.lua – but still… it’s definitely less than what I’ve had in main.lua of already released apps built with pre-Graphics 2.0 (and they do not exhibit black screen.)

Another difference between already released apps of mine and my latest project would be…  in my already released apps, I load sound effects in the very first scene (let’s call it a menu.lua) before the display objects are created.  In the latest app, I load sound effects during the “did” phase in scene:show function of menu.lua equivalent.  I wonder if the things that must happen in the “did” phase can cause this black screen?  But I thought “did” phase meant after the scene is already displayed…

I’ll experiment some more tomorrow and see if moving things out of “did” phase and putting them in a place similar to where I had them in my already released app would make any difference.

Naomi

I don’t think it is a problem of loading too many assets or running a lot of code in the main. As I wrote before, you can see that bug happening in the “Hello World” sample app made by Corona.

I re-created the problem with a simple app that has a white Default.png, Default@2x.png and Default-568h@2x.png. I also added the word “Splash” to distinguish it from the Corona background.

I used the following main.lua

-- -- main.lua -- display.setStatusBar(display.HiddenStatusBar); display.setDefault("background", 1);

I compiled with the standard version (non-Enterprise) build 2170. 

Xcode 5.0.2

OSX 10.9.1

Result Device ----------------- ------------------------------------- No black flash iPod Touch 5th gen (iOS 7.1 beta 5) No black flash iPad mini iOS 7.0.4 Occasional flash iPod Touch 4th gen iOS 6.1.5 Always flashes iPod Touch 3rd gen iOS 5.1.1

I don’t see a status bar with the black screen though.

From the above test is looks like slower devices will exhibit the problem on every launch. I’m suspecting that the underlying problem exists even with the faster devices, but they’re too fast to make the issue visible to the user.

NOTE: This only happens with Graphics 2.0 builds. 

The same app doesn’t flash a black screen on any of the devices above if compiled with Graphics 1.0 build 1251.

(after changing to display.setDefault(“background”, 255) of course)