FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Suggestions
   Software Suggestions
(Moderator: fry)
   V.46 - size() limit
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: V.46 - size() limit  (Read 326 times)
pitaru

WWW Email
V.46 - size() limit
« on: Dec 2nd, 2002, 5:36pm »

On V.46: Hi stage size, for example: 'size(3000,1000)', yields a 'java.lang.outOfMemoryError'
 
This problem exists on the platform, but not as an applet.
 
fry


WWW
Re: V.46 - size() limit
« Reply #1 on: Dec 2nd, 2002, 8:06pm »

assuming you're using the pc on this one..
 
the java stack size needs to be upped, i'll tweak that for a future release. for the time being, you can tweak run.bat to include -Xmx128m -Xms128m after the 'java' command, which will increase the amount of memory from 16 or 32 megs up to 128mb. after that you'll just have to use run.bat instead of Proce55ing.exe when you need the extra memory.
 
(if run.bat isn't included w/ 46, create a file with the following inside and call it 'run.bat')  
 
Code:
@echo off
.\java\bin\java -Xmx128m -Xms128m -cp lib;lib\build;lib\pde.jar;lib\kjc.jar;lib\oro.jar;java\lib\ext\comm.jar PdeBase

 
for something of size 3k x 1k, it's trying to grab about ~12MB of ram for the stuff on screen, ~12MB for the zbuffer, another 12+ MB for java's internal representation of the image, etc. so you're going past the default memory limit.  
 
the reason it works under IE is because it's using microsoft's java vm, which is superior in many ways, one of which being that it is a little smarter about dealing with memory (grabs as needed).  
 
thanks for the report, this is a simple tweak and will be in 47.
« Last Edit: Dec 2nd, 2002, 8:08pm by fry »  
pitaru

WWW Email
Re: V.46 - size() limit
« Reply #2 on: Dec 18th, 2002, 11:45pm »

This works great, i'm using 1024m for xmx and xms.  
 
Is there a way to have proce55ing access more memory than available RAM (i.e. virtual memory)?  
 
I would love to achieve mega-screen size (execution speed is not an issue).
 
-amit
 
fry


WWW
Re: V.46 - size() limit
« Reply #3 on: Dec 19th, 2002, 5:29am »

it's just a java vm limitation.. if the vm will let you grab gobs of memory, then you're off. i'm guessing that even if you can solve the memory issues, things will break down around 15k x 15k (or 30k x 30k) because of issues with windowing systems (ever notice photoshop can't go over 30k pixels in one direction for an image?)
 
i need this for my own work so it may happen someday. though i worry that i'm starting to sound like a broken record by saying everything is planned for the future
 
fry


WWW
Re: V.46 - size() limit
« Reply #4 on: Jan 26th, 2003, 10:38pm »

i've added an item to the todo list to handle this better. so that rather than dying, it will give you a useful error message that suggests what needs to be done to fix things.
 
Pages: 1 

« Previous topic | Next topic »