We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › java.lang.OutOfMemoryError  ESS mp3
Page Index Toggle Pages: 1
java.lang.OutOfMemoryError  ESS mp3 (Read 1635 times)
java.lang.OutOfMemoryError  ESS mp3
Mar 18th, 2006, 10:13pm
 
Has anyone had trouble loading mp3 files with ESS?  I often get an error that reads:

"Java.lang.OutOfMemoryError"

the problem seems to have something to do with the length of the song. All the files that have worked have been 2:51 or less, and all the ones that have failed are 2:53 or more.  I couldnt find a song of length 2:52 to try, but you get the idea.  

Any ideas on how to get around this?
Re: java.lang.OutOfMemoryError  ESS mp3
Reply #1 - Mar 19th, 2006, 9:05pm
 
Same problem here, I believe it's simply a limitation in the library.


Ess appears to take a tremendous amount of memory upon loading
Re: java.lang.OutOfMemoryError  ESS mp3
Reply #2 - Apr 11th, 2006, 1:44am
 
mp3s are not streamed, they are loaded. so uncompressing an mp3 takes a large amount of memory. if you're running into memory issues you'll probably need to increase your heap size. k
Re: java.lang.OutOfMemoryError  ESS mp3
Reply #3 - Apr 19th, 2006, 7:04pm
 
Hi,

I tried increasing the heap memory with the:
run.options = -Xms128m -Xmx1024m

but I still get an OutOfMemory error when loading large mp3.

I can see, with TaskManager, the memory going up to 75M and then the app crashes...

Has anyone been able to play, say, a 3 minute mp3?
I'm using Processing 0103.

thanks
jc
Re: java.lang.OutOfMemoryError  ESS mp3
Reply #4 - Oct 15th, 2007, 10:51pm
 
hi jorge,

I have been able to open MP3's up to about 20 minutes in length ... Are you playing this from an applet jar? from an exported app? or from within the Processing IDE? If the latter you might want to go into preferences and change the amount of memory Processing allows itself to use.

R
Re: java.lang.OutOfMemoryError  ESS mp3
Reply #5 - May 17th, 2008, 1:57pm
 
System: Win XP

When I checked the "Set memory..."  box in Preferences and increased it from 256MB to something close to 9GB...the following error appears:

Invalid maximum heap size: -Xmx9560m
Could not create the Java virtual machine.

I tried playing files below 2MB and they worked. But 4MB etc give the java.lang.OutofMemoryError...
Re: java.lang.OutOfMemoryError  ESS mp3
Reply #6 - May 17th, 2008, 5:57pm
 
http://processing.org/reference/troubleshooting/index.html#memory
Re: java.lang.OutOfMemoryError  ESS mp3
Reply #7 - May 22nd, 2008, 2:10pm
 
why did you set the max memory to 9GB? do you have 9GB of ram in your computer?

try 1GB, you might have more success.
Re: java.lang.OutOfMemoryError  ESS mp3
Reply #8 - Aug 5th, 2008, 3:51pm
 
I fixed this by opening Preferences and changing the max memory to 1024 then checking the box.
Page Index Toggle Pages: 1