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 & HelpElectronics,  Serial Library › How Beta ... is processing
Page Index Toggle Pages: 1
How Beta ... is processing? (Read 1688 times)
How Beta ... is processing?
Aug 26th, 2007, 6:43pm
 
I probably should have asked this question some time ago. How 'in Beta' is processing?

I've just tried this method for reading data from a file stored on a server.

Code:

try {
// Create a URL for the desired page
URL url = new URL("http://hostname:80/index.html");

// Read all the text returned by the server
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String str;
while ((str = in.readLine()) != null) {
// str is one line of text; readLine() strips the newline character(s)
}
in.close();
} catch (MalformedURLException e) {
} catch (IOException e) {
}


That works fine, up until there's a serialEvent, then it throws a arrayIndexOutOfBoundsException:0.

From the research I've done, that appears to be a persistent error in a variety of situations, and seems to be the subject of great puzzlement.

I've also noticed lots of questions go unanswered. So I also wondered if the people that created processing, are still supporting it, and the people developing applications?

Thanks!
Re: How Beta ... is processing?
Reply #1 - Aug 26th, 2007, 10:13pm
 
if it's a bug, have you filed a bug report? i can't fix things unless they're reported.
http://processing.org/reference/troubleshooting/#found

if loadStrings() fails, you should just get null returned after the network timeout. the exception will be printed to the console, but should not halt your program (unless you then get a NullPointerException and your app dies).

the last release of processing was five weeks ago, and this is my 3,601st post** to the board doing support. the processing book is about to go on sale. but other than that, processing has been abandoned. Wink

btw, a more efficient means of doing that code is:

Code:
BufferedReader r = createReader("http://blahblahblah");
String line = null;
while ((line = r.readLine()) != null) {
// do something
}


it sounds like you have some java experience, we're always happy for help finding and fixing bugs so that we might someday escape from beta; you might check out the source from dev.processing.org and see if you can't track down some of the issues you're running into.


** that's not a plea for thank-yous, accolades, or ego stroking... i'm just making a funny. whether i'm funny has legitimately been called into question in the past, but the support status of processing should not be.
Re: How Beta ... is processing?
Reply #2 - Aug 27th, 2007, 1:52am
 
Yes, a nullpointerexception, the app dies, it's a problem, so I'm currently working on a non-processing solution.

Your version of the second method is thrifty, the problem persists. I'll create a bug report, thanks for the link.

I'm not familiar with java, but I'm good at guessing. My guess right now, is that the problem might have already been solved by more capable brains than my own.

Of the gray matter I do have, it would love to contribute. I'll take a look at dev.processing.org, but I'm not sure if my observations will be remarkable.

I get your humor, but there are lots of questions that I've seen that apparently go unanswered, and that was cause for inquiry, not to be taken as an insult, it's clear you've accomplished a great deal. I have noted though, that there are certain processing strong-holds, so it's more likely just my luck to be engaged in a project that's on the fringes of uncharted territory - so in that respect, I wasn't expecting it to be an easy ride.    

I'm curious though, since Beta is like purgatory, how near are you to escaping?  

Page Index Toggle Pages: 1