[chuck-users] a little debugging help for frozen VM!

chriswicks crwicks at yahoo.com
Sun May 27 10:58:07 EDT 2012

Problem solved!

I was discussing this problem in a conversation with my brother last night, and had him take a look at the code on his Mac.  Lo and behold, the code worked as I had intended it to.  I rebooted into my Linux partition, and again, the code works perfectly.  Same code, 3 operating systems tested, and for some reason Windows doesn't behave properly.  He suggested that this may be an issue with Windows firewall, but I don't have problems with any of the other OSC stuff (all running on the same port).  On the Linux end I have a source-built version of ChucK for JACK, and on the Windows end I'm using precompiled binaries (both downloaded on the same day from the ChucK website).  Just thought I'd let it be known here FWIW.  Thanks very much for the help Kassen!  Take care.

-chris wicks

 From: Kassen <signal.automatique at gmail.com>
To: [chriswicks] <crwicks at yahoo.com>; ChucK Users Mailing List <chuck-users at lists.cs.princeton.edu> 
Sent: Saturday, May 26, 2012 12:51 PM
Subject: Re: [chuck-users] a little debugging help for frozen VM!
On Sat, May 26, 2012 at 09:22:47AM -0700, [chriswicks] wrote:
> Kassen -
> Thanks!  This helped me get out of the frozen VM situation, but now for some reason my loop doesn't seem to be executing after the first runthrough.

First of all; happy to have been of help.

As for the rest, the first thing I notice is that when pedcount equals
exactly 20 neither of the two paths will be taken. You may want to
verify whether that is what you want.

Another way in which I could see this code getting stuck is if
pedEvent.nextMsg() would always return non-zero values, in that case
your last nested loop would keep looping and the outer loop would
never return to it's start.

Finally it could be that pedEvent never gets send again, that would
also make it all stop looping. It is a bit hard to say without the
rest and at the risk of sounding rude; I don't feel like sorting
through a larger code-base right now as it is quite hot here :-)

>  I've modified the code as follows, chucking the event to now at the end of the loop.  This works, and b3base gets added twice to the VM as it should in the first runthrough.  I have it printing out the value for pedCount at the beginning, and it only does so once...so, it prints out the value 25 for pedCount and then I never see it printing again after that, just the OSC values ticking by (I currently have my OSC sender set to send values from 25 down to 6, then resetting back to 25, every 2 seconds, and it prints to the VM every time it sends a value so I can see that that part, at least, is working).   Interestingly, I also don't get any response from the VM when I send it a 'chuck ^' command...the OSC values keep on ticking by, and the audio keeps playing as it should, it just doesn't send out a
>  response.  It does, however, respond to --kill and --removeall commands.

That is a very good strategy; to add lines that print the value of
your variables. You can also add print commants at various parts in the
code to see how execution flows. If that doesn't help I'd try
simplifying the situation in some temporary copies of my files. This
may well take longer than writing the code did, such is the of a 
programmer. The good news is you'll learn.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20120527/f8e348c4/attachment.html>

More information about the chuck-users mailing list