1
Support / ERROR/dalvikvm-heap(6950): Out of memory on a 1048592-byte a
« on: January 29, 2011, 06:45:24 am »Quote
01-29 12:28:34.558: ERROR/dalvikvm-heap(6950): Out of memory on a 1048592-byte allocation.
01-29 12:28:34.558: INFO/dalvikvm(6950): "GLThread 12" prio=5 tid=9 RUNNABLE
01-29 12:28:34.558: INFO/dalvikvm(6950): | group="main" sCount=0 dsCount=0 s=N obj=0x460069c0 self=0x37e000
01-29 12:28:34.558: INFO/dalvikvm(6950): | sysTid=6972 nice=0 sched=0/0 cgrp=default handle=3409408
01-29 12:28:34.558: INFO/dalvikvm(6950): | schedstat=( 33403747505 41698944175 45115 )
01-29 12:28:34.558: INFO/dalvikvm(6950): at com.threed.jpct.Texture.loadTexture(Texture.java:~754)
01-29 12:28:34.558: INFO/dalvikvm(6950): at com.threed.jpct.Texture.loadTexture(Texture.java:667)
01-29 12:28:34.558: INFO/dalvikvm(6950): at com.threed.jpct.Texture.<init>(Texture.java:175)
01-29 12:28:34.558: INFO/dalvikvm(6950): at com.splendor.app.directions.ar.ARDirectionsRenderer.onDrawFrame(ARDirectionsRenderer.java:99)
01-29 12:28:34.558: INFO/dalvikvm(6950): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1341)
01-29 12:28:34.558: INFO/dalvikvm(6950): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
01-29 12:28:34.558: ERROR/dalvikvm(6950): Out of memory: Heap Size=16647KB, Allocated=13817KB, Bitmap Size=7275KB
Group heap is always increase
Quote
01-29 12:28:04.758: INFO/jPCT-AE(6950): Loading Texture...
01-29 12:28:04.758: INFO/jPCT-AE(6950): [ 1296278884762 ] - WARNING: Unsupported Texture width (1000)...resizing to 512...
01-29 12:28:04.898: INFO/dalvikvm-heap(6950): Grow heap (frag case) to 19.895MB for 1048592-byte allocation
01-29 12:28:31.688: INFO/jPCT-AE(6950): Loading Texture...
01-29 12:28:31.688: INFO/jPCT-AE(6950): [ 1296278911692 ] - WARNING: Unsupported Texture width (1000)...resizing to 512...
01-29 12:28:32.168: INFO/dalvikvm-heap(6950): Grow heap (frag case) to 20.895MB for 1048592-byte allocation
although I have freed memory of bimap in my snip my code
Quote
@Override
public void onDrawFrame(GL10 arg0) {
try {
if (!stop) {
setCameraOrientation(mOrientationValue);
if(mSteps!=null){
List<GeoLocation> lsGeo=checkSteps(mSteps, mCurloc, IMG_WIDTH);
Drawable streets;
streets= new StreetsDrawable(lsGeo);
Bitmap bitmap = Bitmap.createBitmap(IMG_WIDTH,
IMG_HEIGHT, Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(bitmap);
streets.draw(c);
Texture streetsTexture = null;
streetsTexture = new Texture(bitmap);
streetsTexture.setMipmap(true);
if (bitmap != null) {
bitmap.recycle();
bitmap = null;
System.gc();
}
if(tm.containsTexture("streets")){
tm.removeTexture("streets");
}
tm.addTexture("streets",streetsTexture);
c=null;
streetsTexture=null;
System.gc();
streets=null;
mSteps=null;
lsGeo=null;
}
fb.clear(back);
world.renderScene(fb);
world.draw(fb);
fb.display();
} else {
if (fb != null) {
fb.dispose();
fb = null;
}
}
} catch (Exception e) {
Logger.log(e, Logger.MESSAGE);
}
}
Why is Memory always increase? Can you help me?
Thanks for Avandce!