Another GC Issue

Put your problem here if it does not fit any of the other categories.

Another GC Issue

Postby tttcowan » Sat Jan 15, 2011 9:28 am

I was hoping to get some help. I'm having some big issues with my Android game which uses opengl es and android 1.6. The movement of sprites on screen is not smooth at all and I'm wondering whether it's a gc issue. However I'm seeing issues with smoothness every second and the gc only seems to fire every 3 or 4 seconds looking at the log. Can it still be a gc issue or is it more likely to be something else?

Thanks a lot... Writing games for android is hard!
tttcowan
Developer
Developer
 
Posts: 46
Joined: Mon Jul 19, 2010 11:08 pm

Top

Re: Another GC Issue

Postby Jems » Sat Jan 15, 2011 2:12 pm

If you are using the emulator note that it is usually much slower then a real android device would be. Try to give the GC less to do anyway.
Jems
Experienced Developer
Experienced Developer
 
Posts: 57
Joined: Thu Dec 09, 2010 7:42 pm

Re: Another GC Issue

Postby tttcowan » Mon Jan 17, 2011 1:48 pm

Thanks for that... Right I've optimised this as much as I can so the GC barely fires now(on Htc Desire). I'm not doing anything to stressful and getting an aparent 55 frames/s but it still just doesn't look smooth... I'm not sure whether I'm missing something but 55 frames/s is more than enough to make it looks smooth. There's not some magical opengl call i may of missed is there? Or does anyone have any suggestions where to look next? I'm running Android 1.6 by the way.
tttcowan
Developer
Developer
 
Posts: 46
Joined: Mon Jul 19, 2010 11:08 pm

Re: Another GC Issue

Postby tttcowan » Mon Jan 17, 2011 5:22 pm

The log below might shed a bit more light on the problem. I've attached a log below which might help, it's the time frame rate averaged over a second and the time it takes to do each frame in seconds also. My problem is the inconsistancy which each frame takes, it ranges from 0.017s too 0.034 with a fairly regular tick... Like there is a pattern there for some reason. The gc hasn't fired and only fires fairly rarely... But the jerk caused by what ever goes on in those higher timed frames is definatley visible... It's just not smooth. Does anyone have any ideas what it could be? Or where to go from here?

Thanks


01-17 16:13:49.013: DEBUG/GLThread(12095): Frames/s : 49.0
01-17 16:13:49.033: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.033: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.053: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.053: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.063: DEBUG/Player Game Object :(12095): 0.015
01-17 16:13:49.063: DEBUG/Player Game Object :(12095): 0.015
01-17 16:13:49.083: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.083: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.103: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.103: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.123: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.123: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.133: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.133: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.163: DEBUG/Player Game Object :(12095): 0.026
01-17 16:13:49.163: DEBUG/Player Game Object :(12095): 0.026
01-17 16:13:49.183: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.183: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.193: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.193: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.233: DEBUG/Player Game Object :(12095): 0.033
01-17 16:13:49.233: DEBUG/Player Game Object :(12095): 0.033
01-17 16:13:49.243: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.243: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.263: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.263: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.293: DEBUG/Player Game Object :(12095): 0.031
01-17 16:13:49.293: DEBUG/Player Game Object :(12095): 0.031
01-17 16:13:49.313: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.313: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.323: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.333: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.343: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.343: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.363: DEBUG/Player Game Object :(12095): 0.02
01-17 16:13:49.363: DEBUG/Player Game Object :(12095): 0.02
01-17 16:13:49.383: DEBUG/Player Game Object :(12095): 0.019
01-17 16:13:49.383: DEBUG/Player Game Object :(12095): 0.019
01-17 16:13:49.423: DEBUG/Player Game Object :(12095): 0.034
01-17 16:13:49.423: DEBUG/Player Game Object :(12095): 0.034
01-17 16:13:49.443: DEBUG/Player Game Object :(12095): 0.021
01-17 16:13:49.443: DEBUG/Player Game Object :(12095): 0.021
01-17 16:13:49.453: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.463: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.473: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.473: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.493: DEBUG/Player Game Object :(12095): 0.021
01-17 16:13:49.493: DEBUG/Player Game Object :(12095): 0.021
01-17 16:13:49.503: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.513: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.523: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.523: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.543: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.543: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.563: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.563: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.593: DEBUG/Player Game Object :(12095): 0.033
01-17 16:13:49.593: DEBUG/Player Game Object :(12095): 0.033
01-17 16:13:49.603: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.613: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.623: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.623: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.653: DEBUG/Player Game Object :(12095): 0.031
01-17 16:13:49.663: DEBUG/Player Game Object :(12095): 0.031
01-17 16:13:49.673: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.673: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.693: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.693: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.703: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.713: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.723: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.723: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.743: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.743: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.763: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.763: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.773: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.773: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.793: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.793: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.823: DEBUG/Player Game Object :(12095): 0.026
01-17 16:13:49.823: DEBUG/Player Game Object :(12095): 0.026
01-17 16:13:49.843: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.843: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.853: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.853: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.883: DEBUG/Player Game Object :(12095): 0.033
01-17 16:13:49.893: DEBUG/Player Game Object :(12095): 0.033
01-17 16:13:49.903: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.903: DEBUG/Player Game Object :(12095): 0.016
01-17 16:13:49.923: DEBUG/Player Game Object :(12095): 0.019
01-17 16:13:49.923: DEBUG/Player Game Object :(12095): 0.019
01-17 16:13:49.943: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.943: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.953: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.953: DEBUG/Player Game Object :(12095): 0.017
01-17 16:13:49.973: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.973: DEBUG/Player Game Object :(12095): 0.018
01-17 16:13:49.993: DEBUG/Player Game Object :(12095): 0.019
01-17 16:13:49.993: DEBUG/Player Game Object :(12095): 0.019
01-17 16:13:50.003: DEBUG/GLThread(12095): Frames/s : 49.0
tttcowan
Developer
Developer
 
Posts: 46
Joined: Mon Jul 19, 2010 11:08 pm

Re: Another GC Issue

Postby tttcowan » Mon Jan 17, 2011 5:54 pm

Along with my post above... I'd just like to clarify something. Can somebody please confirm that the gc only ever fires when you get that logcat message,
01-17 16:41:23.241: DEBUG/dalvikvm(13133): GC_FOR_MALLOC freed 8597 objects / 587920 bytes in 63ms

So with the problem above I can definatley confirm it's nothing to do with GC or a memory leak??? That's at least a start... This is such a pain!
tttcowan
Developer
Developer
 
Posts: 46
Joined: Mon Jul 19, 2010 11:08 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Exabot [Bot] and 27 guests