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 › Debugging errors/hangs/freezes with no messages
Page Index Toggle Pages: 1
Debugging errors/hangs/freezes with no messages (Read 223 times)
Debugging errors/hangs/freezes with no messages
Mar 17th, 2009, 11:34pm
 
Does anyone else experience a freeze in their sketch? A freeze that simply hangs the sketch forcing you to quit it? On Windows this is simple a CTRL ALT DEL will be able to bring up the taskmanager to kill, on OS X you're forced to reboot the entire system since none of the key commands will respond when its in fullscreen mode (in windowed mode yes I can kill it using the task manager).

This is MASSIVELY hampering my live shows that I use my sketch for because seemingly randomly during the party it will just freeze up (usually on a screen full of colour) requiring me to go over and fix it. Now I have minimised this by linking up a batch script to automatically kill my sketch and reload it - this I can activate using an Infra Red remote so that I no longer have to go through the hassle.

This script works well and theres maybe only 3 or 4 seconds down time with my sketch now but of course I am aiming to ultimately track down where it is hanging. Ive got a lot of 3D and 2D effects all flying around and many many images models etc, bouncing, scaling, zoom around to live sound etc, so its no wonder that there is some sort of crash in there somewhere. The thing is I cannot for the life of me track it, I cannot get even an error message or a line number out of processing, even in netbeans mode when im supposedly "debugging" it - it just freezes with no message or indication why. Due to the way the music works and some of the visualisation there is exceptions in the duration of the run time of my sketch, so long as I have enclosed these in a try catch they dont seem to crash it, but I have put a message in to make sure they are not responsible for my hang - I often see many exceptions have been caught when the music has just pushed some effect too far for processing to handle - but as I saw they are caught and it continues (I have the time printed up too to prove it gets past fine). Ive tried capping values etc to minimise this but it doesnt seem to be related to the hangs anyway and im worried that if I cap too much the visuals will become boring (especially since these exceptions are relatively rare).

The title bar which I have rigged to show FPS (if in windowed mode, it crashes in both windowed and fullscreen) stops reacting and the app has just died on me completely. If any one has any clues or suggestions Id be so greatful to hear them, Im using this in clubs with DJs now and its all going very well apart from this freeze up!! My heart certainly sinks when I see it freeze up, which can happen within seconds of it running, or hours of it running and I cant see a pattern.

Apart from this Ive been absolutely blown away by processing, I hope someone can help me.

BTW, I havent started any threads myself but the netbeans debugger shows quite a few threads going (although isnt detecting deadlock) which are presumably made by all the libs I use.  

This is running on a mac mini intel (1 gig ram) with windows xp installed via boot camp. I have implemented my own garbage collection to happen periodically but that doesnt seem to do much, although the run time memory does eventually go down to a few hundred from around 500 after the load.

It almost seems like it could be getting stuck in an infinate loop or mayeb just some part of processing crashes when objects are too big and close or too small and far away? As I say it seems most often freeze on a screen full of colour or black impklying maybe one of my effects is so big and close to the cam when it froze that it looks like a screen of colour, or in the case of the black maybe the whole thing is so far away that it freezes. Im kind of grasping at straws though really without some sort of scientific way of being able to debug it.

Final note is that when it hangs the cpu is not maxed out in task manager it seems to go up and down etc as if things are still happening, it froze just now I can see it going from between 37 to 48 % cpu.

HELP! Smiley


PS. after movign this into netbeans I cannot actually get a proper jar ot build out like in processing so I have to do my live shows by launching my script from the IDE (!) this is no big deal really although it does use 200 meg of ram more but it was crashing before then. Once this is fixed I'll be aimign to work out how to output a proper file from netbeans (using classes and classpath etc I simply cannot get it to recognise the jars are there Ive tried everything) and then onto working out why it only uses 50% of the cpu and perhaps multithreading it to solve this.
Page Index Toggle Pages: 1