Hey, Dimitris!<br><br>> 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>
<br><br>> I do something that might be silly, I send/receive parameters between shreds using OscEvents, can this cause the problem?<br><br>I'm sure it can cause problems but it's no silly at all, this should work fine.<br>
<br>> Is there another way of communicating (exchanging control signals in this case) between processes?<br><br>Sure; you can make a public class that has static members. For example a static Event in a public class can be used to send information across the while VM. This can be useful for many things and can make your code a lot more modular. Unless you want to experiment with OSC, for example because you want to involve a second computer and/or musician this may be the most simple way to go. For one thing ChucK's events are "strongly timed" while OSC depends on the host OS to pass on the data.<br>
<br>Do note that static non-primitives can't be instantiated in classes right now so you will need a workaround like in this example;<br><br>//-------------------------<br>public class Message<br> {<br> static Event @ event;<br>
<br> static int data1;<br> static float data2;<br> }<br><br>new Event @=> Message.event;<br>//-------------------------------<br><br>> 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><br>><br>> Can I somehow declare global variables? I checked the documentation and I didn't find anything. If the problem is because of excessive use of OSC I could maybe read/write global variables.<br>
<br><br>Sure! data1&2 in the above example will act as global variables. They will be the same across all instances of the class, regardless of what file they are in. they are NOT constant; any of those files may read them or write to them, just like any of those files may signal, broadcast or wait for Message.event<br>
<br>I think that should get you started, do shout if this was unclear. This is a slightly hackish workaround for the current situation, at some point it should be fixed. On the bad side; it has been like this for quite a while now, on the good; it's quite workable like this once you get the hang of it.<br>
<br>Hope that helps.<br>Kas.<br>