[chuck-users] a little debugging help for frozen VM!
signal.automatique at gmail.com
Sat May 26 12:51:57 EDT 2012
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.
More information about the chuck-users