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 & HelpSyntax Questions › Out Of Memory Issues
Page Index Toggle Pages: 1
Out Of Memory Issues (Read 211 times)
Out Of Memory Issues
Feb 12th, 2009, 7:49am
 
Hey everybody, I wasn't quite sure where to put this one.

I have a program that reads an HTML file from the net.  It runs fine in Processing but I get an OutOfMemoryError on trying to export (both as an applet and a standalone app).  The debugger is trying to tell me something about the "Java heap space," which to me sounds like a fancy way of saying a pile of dung, but I'm probably wrong.

Peep the Code:

import simpleML.*;
PFont fontA;

void setup() {
size(640,480);

HTMLRequest req = new HTMLRequest(this, "http://api.wefeelfine.org:8080/ShowFeelings?display=text&returnfields=sentence&city=providence&limit=100" );
req.makeRequest();

fontA = loadFont("04b03-40.vlw");
textAlign(CENTER, CENTER);
}

void draw() {
}

// When the request is complete
void netEvent(HTMLRequest ml) {
String html = ml.readRawSource();
String[] list = split(html, "<br>");
// takes last 100 from the top
for (int x = 0; x<49; x+=1){
background(0);
textFont(fontA, constrain(170-list[x].length(), 50, 90));
text(list[x].toUpperCase(), random(10,30), random(-60,-20), 600, 480);
int y = list[x].length();
delay(y*100);
}
}


Any ideas anyone?  It would be greatly appreciated.
Page Index Toggle Pages: 1