<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Kassen,<br><br>thanks a lot and sorry for the late reply I had trouble last days with the latest fedora updates and wouldn't ChucK that much!<br><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">FROM: Kassen<br><br><div id="yiv1247671673">Hey, Dimitris!<br><br>&gt;&nbsp; For some reason I constantly get a "segmentation fault" fatal error sometimes just after some seconds I run my shreds. What does this mean? <br><br>Typically it means you tried to address something that doesn't exist/ isn't instantiated. It can also mean there is some bug in ChucK that affects you.<br>
</div></blockquote>Well, I found out that an accumulator that I had was causing the trouble. I was receiving a variable through osc and doing (inside an infinite time-loop) something like<br><br>while( event.nextMsg() )<br>{<br>&nbsp;&nbsp;&nbsp; event.getFloat() +=&gt; a;<br>}<br><div id="yiv1247671673"><br>I don't really know why it was crushing, it shouldn't. when I removed this part everything was ok.<br></div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div id="yiv1247671673">&gt; Once or twice I had an "OSC packet ...: buffer (or stack) overflow" error. Is there a buffer or a limit on the messages you send / receive?<br>
<br>I don't know :¬)<br>I'm certain there must be some limit somewhere but I'm not sure what or where it is.<br></div></blockquote>What probably happened here is that I was being sent the messages faster than receiving them, so if I had an osc message coming every 100 ms and I had<br><br>while( true )<br>{<br>&nbsp;&nbsp;&nbsp; while( event.nextMsg() ) { ... }<br>&nbsp;&nbsp;&nbsp; 1000::ms =&gt; now;<br>}<br><br>the messages might have been accumulating so there was the buffer overflow. Although it shouldn't be, I think.<br><br>But I actually have a question here about the OSC events: is there any smart way to have some code executed on an event independently of the time of the infinite time-loop? To be more clear, let's say I have an BiQuad filter and I want to control its frequency over the network through OSC. So,<br><br>while( true )<br>{<br>&nbsp;&nbsp;&nbsp; while( event.nextMsg() )<br>&nbsp;&nbsp;&nbsp;
 {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; event.getFloat() =&gt; f.pfreq;<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; // do other stuff<br><br>&nbsp;&nbsp;&nbsp; 1::second =&gt; now;<br>}<br><br>This have the consequence, if I'm not mistaken, that every 1 second chuck will check for new messages and if messages are sent every 300 ms and for some reason we need the loop to run every one second the frequency is actually updated once a second with the last of the 3 received values instead of 3 times a second.<br><br>The only way around I can think now is to declare the filter in a public class as a static object and have a separate shred that runs with a faster time-loop and update the filter this way. But this might lead to unreasonable many shreds like one for gain, one for frequency etc. Moreover this will mean that I will be able to have only one BiQuad filter working this way. So I see this solution highly problematic. Any
 ideas?<br><br>Thanks again,<br><br>Dimitris</td></tr></table><br>



      <hr size=1><font size=-1 face=Arial> 
Χρησιμοποιείτε Yahoo!<br> 
Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων <br> 
<a href="http://login.yahoo.com/config/mail?.intl=gr">http://login.yahoo.com/config/mail?.intl=gr</a> </font>