JPCT errors while trying to run app on Android Ice Cream 4.x

Started by icarusfactor, January 09, 2012, 09:24:47 PM

Previous topic - Next topic

K24A3


Another option would be to use the DDMS tool to view the memory heap usage while the app is running. http://developer.android.com/resources/articles/track-mem.html

16MB is quite a lot for a basic scene with a skybox. My app has about 100 objects (some models have 4000+ vertices) with 15 decent sized textures amongst other things and the RAM usage is only 26MB.


Post up your code if you wish, we may be able to spot the problem.

icarusfactor

My problem with scale was rendering DNA structures with 10,000- 20,000 atoms and not counting bonds between each. Placing this data structure in a DB and reading only ones that are in visual range and trimming down further making touch active only ones that are close to viewer. Got to be a way to do it.  But had put this on the back burner until I could find a way to do it. DDMS is a good tool.

K24A3

Ah that's what is using so much memory, I thought you had just a basic 3D scene.

I had the same issue when I jumped from Gingerbread to Honeycomb, the RAM usage was almost double and could not figure out why. I'm assuming it's the result of Android taking advantage of the larger RAM sizes in newer devices to minimize GC pauses.

There is a simple solution but you will need to have separate APK's for 2.x and ICS.
Honeycomb introduced the large heap parameter in the AndroidManifest.xml file which increases the application RAM from the usual 16GB/24GB/32GB size to 256MB.

Add android:largeHeap="true" to this tag:
<application android:icon="@drawable/icon" android:largeHeap="true" android:label="@string/app_name" android:debuggable="false">

Also ensure the minimum SDK is set to 11 if you want Honeycomb support, or 14 for just ICS support.

EgonOlsen

...but it's not guaranteed that this parameter actually does anything on a specific platform. I wouldn't rely on it...

K24A3

That's true, 256MB is what I get on a Tegra2 3.2 Tablet with 1GB RAM. If it's a 'no-name' Tablet with say only 512MB total RAM then I wouldn't expect much of an increase.

icarusfactor

That is a really good tip. Yes I thought it was no larger than 32m.
256m is a big plus. But to make it scalable the Android Database
gives me 2 gig of space, well within the limits I need for a structure.
But also understand if to do that, it would be best for making two
versions.