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 & HelpIntegration › Very confusing freeze ups, no errors.
Page Index Toggle Pages: 1
Very confusing freeze ups, no errors. (Read 2393 times)
Very confusing freeze ups, no errors.
Nov 24th, 2008, 1:32am
 
Ok so I have made a visualisation tool which works to music, it goes good for a atleast 10 to 20 mins but then freezes up seemingly randomly. I moved
all of the code into netbeans so I could get the benefit of the debugger, even know Im not altogether sure how to use it really. Anyway now when it freezes
up I can click pause on the netbeans debugger and check the line its currently frozen on (apparently).

Also it keeps being frozen on lines that look unharmful like:

a call to text()
a call to endShape() sometimes?

The windows task manager shows it uses between 150 to 250 meg of ram, which is fine for my system, I cant see any obvious memory leakes. Even so I have added
some manual garbage collection just in case which seems to do its work. But it will still freeze up pointing to lines like text(), right now im commenting all these
lines out in the hope it will eventually lead to a stable sketch and I can work out how to introduce them back in withotu crashes.  But im a bit confused by this,
is it right to keep removing these lines, or are they just a symptom of somethign greater happening? I cant really see how calling text() can freeze it, especially
randomly - altho I do have lots of mad zooming and camera stuff going on so its feasible values might get weird, but I have capped them and the debugger never shows
anything outrageous as a value on the line it freezes up on. I cant see any infinate loops either, although I guess there may be one but Im not sure how to track that
and surely the frozen line would be the one in the loop anyway??..

If anyone can suggest anything at all let me know.. next up im thinkign of trying the netbeans profiler, see if i can get a huge logo of whats going on somehow to track it.
When frozen is does usually appear to be hogging the 50% of the cpu it can grab (which it doesnt do during operation) and seems to freeze on a screen of "full colour" like
something may possibly be getting too big or close to the cam or something, but without any sort of errors all i can do is keep removing lines that i *think* may be related due to them
being the line netbeans debugger shows that it froze on.

Cheers,

Gaz.

update:
Apologies I guess this should have been a reply to my other thread which is similar.
Re: Very confusing freeze ups, no errors.
Reply #1 - Nov 24th, 2008, 5:36pm
 
Ok So I managed to debug some actual run time errors, but it now seems to freeze every 15 to 20 mins and its always on a call to "text()" with sensible values for the position and string etc, nothing wild. Is there any known reason why calling text() may crash a sketch seemingly randomly after a long while of running?? Of course these text calls work fine for a long time before finally causing a lock up...

help appreciated Smiley
Re: Very confusing freeze ups, no errors.
Reply #2 - Nov 27th, 2008, 4:56pm
 
If you have multiple threads  running, have a look an article on deadlocks

http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/upgrade-guide/article-07.html
Re: Very confusing freeze ups, no errors.
Reply #3 - Mar 16th, 2009, 3:10pm
 
HI, I used the new netbeans deadlock feature when it freezes, it says it has not detected any deadlock. Im still getting these freezes but since I set up my pc again I cannot even get a line number now when it freezes from netbwans - even when I have it running with the debugger.

Anyone got any suggestions for how I debug something that freezes and I get no error message at all? Its been going on for a long time now and im almost out of hope for fixing it. It may well be my bad coding Smiley or it may well be a bug in processing somehow? Its a sound visualization too so it does get lots of varied data. Sometimes it goes for hours fine othertimes it can die in seconds.
Re: Very confusing freeze ups, no errors.
Reply #4 - Mar 24th, 2009, 9:33pm
 
Hi Gazy,

I seem to have the exact same problem with a sketch of mine.

It uses webcam-video and streams this over the internet to a webcam client which streams a video back.
Sometimes this sketch runs for hours, sometimes it freezes after a few minutes.

If I find a solution, I will let you know.
Please also post the solution if you know it!
Re: Very confusing freeze ups, no errors.
Reply #5 - Apr 26th, 2010, 9:44pm
 
Did anyone ever resolve this?

I am having the same issue, and it really bites!
Page Index Toggle Pages: 1