Android Memory Issues

I would like to mention that I get memory issues of some kind on android devices.



Devices used for testing:

-Samsung Galaxy S2

-HTC Desire



I have a game that contains:

-Meshes (OgreXML Model with Material exported from blender)

-Particle Emitters (Effects) (dust/smoke and fire effects)

-A simple textured terrain block

-Around 12 short Ogg sound effects which get cached



I have disabled all shadows and postfilters while testing on the devices.



When I test on the Desktop PC (Ubuntu Linux) the Shaders and Textures (S) and (M) stats are cleared and never reaches a value greater than 10



When testing on the android device the (S) values start below 10 and then after some of the effects get activated and released the (S) value reaches values ranging from 7 to 90+ while all other values are below 10 (like on PC).



This also causes the application/game to eventually crash after a short and random duration of testing/running. The (M) value actually remains fine. [Still crashing…]



When I switch off these Particle Emitters I could not get the Samsung Galaxy S2 to crash again.



On the HTC Desire I have tried to run a even more basic scene, which contained 2 effects (debris and fire the ones from the tutorials) with a dirt (from JME3 assets) textured terrain block. When I run this on the HTC it displays the first frame and the device froze completely and I had to take out the battery to get it functional again. [Still issues here]



for quick specs on the devices:



http://www.gsmarena.com/htc_desire-3077.php

http://www.gsmarena.com/samsung_i9100_galaxy_s_ii-3621.php



I’m also not using any specific memory settings or allocation in andoid manifest.



Hope this helps, please feel free to ask more about this.

The ogg sounds are probably the issue because they get inflated to PCM into memory. Afaik playing sounds on Android is working less than ideal atm because of API restrictions.

Will playing wav files be better then?

Wav files are uncompressed PCM.

if you want real specs for mobiles, take a look at : http://www.glbenchmark.com/

@normen thank you I can confirm that the application is now running on both devices without any issues.



Thank you for your help. I have switched to the wav files.



However the S values still seem odd to me or I just do not understand them.



@kine thanks I take note of this source will definitely have a look.