| I have run into a problem where csound returns an errorcode even when
nothing really went wrong. I think the problem is in the X11 code, and
probably happens when X11 graphics are enabled but no windows are drawn
(as is the case where no function generators are used). This faulty
error return seems to be propogated from the "myXwait" function in
WinX11.c. It is called indirectly by dispexit(), which gets called from
musmon(). And it seems that if there is no X-window open (xlwin==NULL),
then myXwait returns non-zero, which gets propogated back up the returns
from dispexit(), musmon(), and then main().
Being not too familiar with this code, especially for all platforms, I
don't know the correct way to fix it. Can someone else perhaps verify
this problem and/or provide a fix that doesn't break the other
platforms?
Just to be clear, csound does *not* print any error messages, and the
perf does indeed work fine. But it returns non-zero back to the OS (in
this case Linux) which is a problem at the moment since I am using Make
to run it.
Here is where the trouble seems to start:
static int myXwait(char *msg)
{
if (xlwin != (Window)NULL) {
myXwinWait(xlwin, msg);
return(0);
}
else return(1);
}
Larry |