Short black screen after Default.png

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)

Hey, Renato, thank you for reminding us about using “Hello World” to reproduce this issue.  

And Ingemar, thank you for testing this so thoroughly.  That’s super helpful.

With mine, the black screen show up not as a flash abut a solid black long enough to make me wonder – and I’ve seen this on all of my iDevices, including iPad 3rd gen and iPod Touch 5th gen.  I haven’t looked into this with Android devices.

It sounds like if the code is simple enough, it may not manifest itself on faster devices – but I’d say any real app with anything substantial to handle would show it, which means all apps that are intended to be generally released from any app stores would likely to manifest this issue.

Naomi

I’m seeing this on several Android devices as well. Has anyone filed a bug report on this yet?

I just submitted a bug report with the HelloWorld – perhaps not the very best test sample project, but I figure it’s better than not submitting it at all.  I also included a link to this thread along with the copy of Ingemar’s test result posted above.

It’s Case 30332.

Naomi

After an exchange with Brent, I may have a clue as to why I didn’t see the problem but Hello World does.  I didn’t load an image.  I just created a rectangle, which is very fast.  Loading an image takes time, in particular on Android (for the first run) where we have to unpack all of the resources from the .apk file so that they can be accessed. 

I’m going to try and verify this.

Rob

Thanks for replying!

I was using 2014.2122 when I posted this issue.

It also happened to you with 2126.

I tried it with the very latest build - 2135 - and still got this short black screen with status bar before the app loads

So then I just tried 2109 and the bug was not there.

How do we report this officially for Corona to know there’s an issue in the more recent builds?

@Naomi, I modified the Hello World sample and added a white Default.png image (adding “Default” text). I tried this on a number of iOS devices running iOS 5, 6 and 7 and I don’t see the black screen issue after the Default screen loads. I ran this using build 2172. I saw your bug case and you didn’t provide a sample project but I don’t think my test is any different then yours. I did add the code to suppress the status bar and make the background white.

@Tom and @Rob, thank you for looking into this.  I did not test HelloWorld app myself, but based on what the others on this thread noted, I went ahead and submitted the bug with the HelloWorld sample code.

Now, I went ahead and created two versions of super duper simple app – v1 with storyboard and widget-v1 to be built with daily build 1257 and v2 with composer and widget (latest version) to be built with daily build 2171.  They both behave exactly the same and they load exactly the same Default.png, scene background and a button and sound files.   I wish I can say that that v1 does not show the black screen while v2 does.  Unfortunately, this isn’t the case with the test apps I put together  Both versions show a flicker of black screen but nothing like the solid black I’m seeing with my latest project.  

A flicker of black screen does not bother me, and it isn’t a real problem for me.

Naomi

AND BIG NEWS…  it distraught me, and I wondered if the latest daily build 2171 actually did fix the problem – so, immediately after I posted my test result, I generated a device build of my latest project with daily build 2171 – and the problem is GONE.  No solid black screen at all.

Just to make sure the whole thing wasn’t a figment of my imagination, I built my latest project with daily build 2153, and sure enough, the solid black stares right back at me at launch.

So, I must conclude that the changes that took place between 2153 and 2171 have fixed the issue.  (Tom, I’m sorry I submitted the bug report stating that this problem exists with daily build 2171 – but in my haste, I did not generate my app with 2171 to confirm this.  I apologize.)

Naomi

Just updated to daily build 2171 and I am still seeing a huge black screen.

I recorded my game opening and you can see it for yourself:  http://youtu.be/-9gFmWb6zIc

The black screen is so long that even the camera that was recording it lost focus.

The game was running on a iPhone 4S iOS 6.1.3.

The first two lines of my main.lua are:

display.setStatusBar(display.HiddenStatusBar) display.setDefault( "background", 250/255,223/255,161/255 )

I wonder if the problem is now triggered by the use of the camera.  Renato, can you put together a simple project that reproduces what you are seeing and submit it as bug?  I think Corona would need it to sort this out.

As I mentioned, using daily build 2171, I cannot reproduce the problem with my latest project or with stripped down test projects I created.

Naomi

My game does not use camera

Hi @ranflas, @Renato,

Please submit a bug report on this to: http://developer.coronalabs.com/content/bug-submission

And remember to attach an entire working sample project that shows it occurring, not just a “main.lua” file. We need to be a bit more stringent about this, since too often we receive a bug case which is simply a “main.lua” file, and the actual issue lies somewhere in the user’s config.lua or build.settings.

Thanks,

Brent

We believe you about the black screen, but we can’t reproduce it with Hello World or other simple apps.  Funny thing is while testing this on my own apps, several of them showed the black screen several didn’t.  Unfortunatly  I don’t know  what builds I used (and some are G1 builds too). 

What would be really helpful is to post your config.lua, build.settings and main.lua so we can try and determine a pattern of what’s causing it.

Rob

I submitted a bug report of my own regarding this issue with my own findings.

Case 30361.

My project is as basic as it gets, and there’s a short black flash on slower devices. iPod Touch 3G is the one that always shows the black flash.

Please note: This only occurs with Graphics 2.0 builds though. If I compile with the latest G1 build (1251) the black flash is gone.

I’ve attached my sample project here for anybody interested:

Ingemar, I tried your blackflash on my iPad3, and I don’t see a flash of any kind (as expected.)  However, with my test project I mentioned earlier, on the same iPad3, I see a black flash between Default.png and menu screen.  Default.png image and the background image are different images, and they both cover the whole screen.

Please note, my test project shows black flash whether it is built with daily build 2153 or 2171.  However, my latest app when built with 2153 shows solid black screen that last a couple of seconds (not a fraction of a second.)  When built with 2171, though, it shows just a black flash (like the test project) – so to me, there are huge difference between 2153 and 2171.

I don’t understand why Renato’s project still shows solid black with 2171 while mine doesn’t.  

And based on how my test project and my real project behave, I don’t think I can supply a project that would clearly demonstrate how bad this solid black is to Corona (short of sending my current project, which I do not wish to do.)

I wonder what might be the difference between my project and Renato’s…

Meanwhile, just in case it’s helpful, I’ll send Tom my test project that shows a black flash on iPad3.

Naomi

@Ingemar and @Naomi,

Thank you both for sending in complete project files. It very hard to verify bugs without knowing the code that is being used and the exact steps to reproduce the problem. Just sending in a main.lua file or describing what your code is doing is generally not enough to reproduce the issue.

It has been mentioned that the black screen occurs with the HelloWorld sample. I’ve run it on a number of devices and don’t see the problem. I received Ingemar’s project files and noticed that the FPS is set to 60 in config.lua – our HelloWorld app defaults to 30 FPS. I haven’t tried this on my range of devices but this could be the key different that we need to reproduce the problem.

I’ll let you know what I find.

Thanks,

Tom

I don’t why but the Hello World is not showing the bug anymore (although I have a former hello world build on my iPhone that shows the bug).

I ran some tests here and I think that the black screen may be related to the amount of processing that the app does in the beginning.

On my game, i have a main.lua that calls a storyboard scene that pre-loads two scenes and then it goes to a 3rd scene. I noticed that if I don’t pre-load these 2 scenes, the black screen duration reduces a lot, although it still appears.