[RESOLVED] Errors again - BLACK screen

This is getting worse and worse. Even I suffered a lot errors and managed to fix them, this is the worst one.

So, I’ve FINISHED my game and tried to test it on a mobile device. Even it works great on simulator, really great, I keep getting black screen on my device. I DON’T know why, really. everything is really clear and neat.

P.s. I tried to run some other game that I started to work on and even it has just few images, it works n that same device.

WHERE’s the problem?

+ only thing that I was able to notice is that if I set ui buttons to be visible, they are the only objects that show up… i dont understand…

May be able to help msg me later. I’m wrkn right now

Read this blog:

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

Then look at the errors the device is printing in it’s console log.  It will tell you why you’re are getting a black screen.  95% of the time you have a filename problem.  Filenames on devices are case sensitive, on the simulators they are not:

myImage.png

myimage.png

are different files on device, but the same on the simulator.  Until you look at the errors and let us know what they are, all we can do is guess at what your problem is. 

Hi Rob. Thank You again!

I’ll check it out and post some results…

Rob, I tried to do what you said because it seems to be a good option, but I’m getting strange outputs.

So when I type 

adb logcat Corona:v *:s

then when I download the log file, I get this: 

--------- beginning of /dev/log/main

07-14 09:25:02.710 W/PGA     ( 1910): ctlSwapBuffers(133): Host Connect failed, err = -1(0xffffffff)

07-14 09:25:02.920 E/PGA     ( 1910): PgaSocketWriteAllHdipc: hd_ipc_send() failed

07-14 09:25:03.920 W/PGA     ( 1910): ctlSwapBuffers(133): Host Connect failed, err = -1(0xffffffff)

07-14 09:25:04.130 E/PGA     ( 1910): PgaSocketWriteAllHdipc: hd_ipc_send() failed

07-14 09:25:05.130 W/PGA     ( 1910): ctlSwapBuffers(133): Host Connect failed, err = -1(0xffffffff)

_--------- beginning of /dev/log/main _that’s what I can also see in cmd.

I’m not getting any of outputs in cmd, but when I download that log file, it’s full of these errors after I typed that command ( adb logcat Corona:v *:s ).

Why’s that?

Guys, thank you for your time and for your help. I’ve decided to try traditional way to fix this bug - adding function by function and testing if it works. It’s really annoying and takes a lot of time but it’s a secure method. So far so good. For now it works (i’m at the ~500th line of max number of ~2000). 

When I find that error which caused black screen, I’ll let you know. 

Thanks again.  :slight_smile:

Have you checked the build and config files for errors
I’m back at work, yes on a Sunday, but should be home in a few hours and can help more. Our time zones must be far apart

Haha, yes, they must be :smiley:

I did and couldn’t find nothing. I’m in the middle of the code now and for now it works perfect.

1013168_672926959399632_1961951205_n.jpg

Okay, just do the command:

adb logcat

Leave off the other stuff.  Once it’s running, run your app.  It’s last messages should be what’s on the screen, or scroll back a little bit to see it.  Android is very noisy in it’s logs.

one question not related to this problem:

i followed “memory leak” tutorial (http://www.coronalabs.com/blog/2011/08/15/corona-sdk-memory-leak-prevention-101/) and removed all objects that are not being used. However, I see that my memory usage is growing every time I hit a ‘‘bullet’’ even it is deleted when it is not being used. Also, all objects are deleted in same condition.

Why’s that? I’m experiencing memory leak while playing this part of my game on a device…

@kizzwiz could you start a new thread on this topic and include your bullet creation code and bullet removal code?

We should try and keep this thread on topic!

FOUND IT!

As I thought at first - own stupid fault caused a black screen.

gameoverShare = ui.newButton{ defaultSrc = "share.png", defaultX = 100, defaultY = 69, overSrc = "shareover.png", overX = 83, overY = 71, ... ... ... }

So, when I was creating share image, I created only share-2.png image which is for mobile devices that use larger resolution. In other words, I forgot to create share.png image that is called here in the code.

Strange how I didn’t see that before because I was checking if I have all images included in a folder.

Once again - thanks for your time and now help me with memory leak :smiley: I’m really bad with that…
http://forums.coronalabs.com/topic/37218-memory-leak/

May be able to help msg me later. I’m wrkn right now

Read this blog:

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

Then look at the errors the device is printing in it’s console log.  It will tell you why you’re are getting a black screen.  95% of the time you have a filename problem.  Filenames on devices are case sensitive, on the simulators they are not:

myImage.png

myimage.png

are different files on device, but the same on the simulator.  Until you look at the errors and let us know what they are, all we can do is guess at what your problem is. 

Hi Rob. Thank You again!

I’ll check it out and post some results…

Rob, I tried to do what you said because it seems to be a good option, but I’m getting strange outputs.

So when I type 

adb logcat Corona:v *:s

then when I download the log file, I get this: 

--------- beginning of /dev/log/main

07-14 09:25:02.710 W/PGA     ( 1910): ctlSwapBuffers(133): Host Connect failed, err = -1(0xffffffff)

07-14 09:25:02.920 E/PGA     ( 1910): PgaSocketWriteAllHdipc: hd_ipc_send() failed

07-14 09:25:03.920 W/PGA     ( 1910): ctlSwapBuffers(133): Host Connect failed, err = -1(0xffffffff)

07-14 09:25:04.130 E/PGA     ( 1910): PgaSocketWriteAllHdipc: hd_ipc_send() failed

07-14 09:25:05.130 W/PGA     ( 1910): ctlSwapBuffers(133): Host Connect failed, err = -1(0xffffffff)

_--------- beginning of /dev/log/main _that’s what I can also see in cmd.

I’m not getting any of outputs in cmd, but when I download that log file, it’s full of these errors after I typed that command ( adb logcat Corona:v *:s ).

Why’s that?

Guys, thank you for your time and for your help. I’ve decided to try traditional way to fix this bug - adding function by function and testing if it works. It’s really annoying and takes a lot of time but it’s a secure method. So far so good. For now it works (i’m at the ~500th line of max number of ~2000). 

When I find that error which caused black screen, I’ll let you know. 

Thanks again.  :slight_smile:

Have you checked the build and config files for errors
I’m back at work, yes on a Sunday, but should be home in a few hours and can help more. Our time zones must be far apart

Haha, yes, they must be :smiley:

I did and couldn’t find nothing. I’m in the middle of the code now and for now it works perfect.

1013168_672926959399632_1961951205_n.jpg

Okay, just do the command:

adb logcat

Leave off the other stuff.  Once it’s running, run your app.  It’s last messages should be what’s on the screen, or scroll back a little bit to see it.  Android is very noisy in it’s logs.