Slick Forums

Discuss the Slick 2D Library
It is currently Sun Aug 25, 2019 8:13 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sun Jul 22, 2012 7:15 pm 
Offline
Regular

Joined: Thu Sep 22, 2011 4:39 pm
Posts: 165
Location: Belgium
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)


Top
 Profile  
 
PostPosted: Tue Jul 24, 2012 7:29 pm 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1482
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.


Top
 Profile  
 
PostPosted: Tue Jul 24, 2012 8:46 pm 
Offline
Regular

Joined: Thu Sep 22, 2011 4:39 pm
Posts: 165
Location: Belgium
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..


Top
 Profile  
 
PostPosted: Wed Jul 25, 2012 8:16 pm 
Offline
Regular

Joined: Thu Sep 22, 2011 4:39 pm
Posts: 165
Location: Belgium
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/


Top
 Profile  
 
PostPosted: Thu Jul 26, 2012 2:27 pm 
Offline
Regular

Joined: Thu Sep 22, 2011 4:39 pm
Posts: 165
Location: Belgium
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group