Slick Forums
http://slick.ninjacave.com/forum/

andriod update 16 dalvik out of memory
http://slick.ninjacave.com/forum/viewtopic.php?f=21&t=5294
Page 1 of 1

Author:  mortias [ Sun Jul 22, 2012 7:15 pm ]
Post subject:  andriod update 16 dalvik out of memory

Hello,

Before i could overload the memory but now for some reason with the new update i can't seem to set
the heap to a certain amount of memory so after a while i get this error:
any idea how to increase it?

tx

07-22 19:13:18.416: E/SLICK(536): Requesting: resources/images/sheets/other.png
07-22 19:13:18.636: D/dalvikvm(536): GC_FOR_ALLOC freed 80K, 3% free 37571K/38599K, paused 113ms, total 115ms
07-22 19:13:18.636: I/dalvikvm-heap(536): Forcing collection of SoftReferences for 16777232-byte allocation
07-22 19:13:18.806: D/dalvikvm(536): GC_BEFORE_OOM freed 10K, 3% free 37561K/38599K, paused 158ms, total 159ms
07-22 19:13:18.806: E/dalvikvm-heap(536): Out of memory on a 16777232-byte allocation.

07-22 19:13:18.882: E/SLICK(536): java.lang.OutOfMemoryError
07-22 19:13:18.882: E/SLICK(536): at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
07-22 19:13:18.882: E/SLICK(536): at java.nio.MemoryBlock.allocate(MemoryBlock.java:126)

Author:  davedes [ Tue Jul 24, 2012 7:29 pm ]
Post subject:  Re: andriod update 16 dalvik out of memory

Why are you running out of memory? Are you creating new textures every frame? Are you forgetting to release textures/sounds when no longer needed? Use a profiler like VisualVM to find out where Slick is allocating memory.

Author:  mortias [ Tue Jul 24, 2012 8:46 pm ]
Post subject:  Re: andriod update 16 dalvik out of memory

well yes, i preload everything to test if it builds and runs,
with a previous version of android i could tweak the avd to run on a 500 mb heap
but now it seems that this parameter isn't taken into count anymore with the
jdk 16 of android.. it stops always at 40mb no matter what i say in that variable..

ofcourse i need to change the loading aspect but still i would like to see if it runs..

Author:  mortias [ Wed Jul 25, 2012 8:16 pm ]
Post subject:  Re: andriod update 16 dalvik out of memory

omg it's all in the tutorial but ok...
i'm going to check out this virtual image thing

http://developer.android.com/tools/devi ... lator.html
http://software.intel.com/en-us/article ... commended/

Author:  mortias [ Thu Jul 26, 2012 2:27 pm ]
Post subject:  Re: andriod update 16 dalvik out of memory

pff

If this is an ARM based emulator, you forgot to add the armeabi and armeabi-v7a folders to your Android project's libs/ folder. Please follow the setup guide here: http://code.google.com/p/libgdx/wiki/ProjectSetupNew

If this is an x86 based emulator, then i'm afraid there's no solution for this issue yet. We do not compile for Android x86 at the moment.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/