| Sorry, what I meant was:
if not self.w.csd():
...
The method returns 0 if successful and an error code if not.
Victor
----- Original Message -----
From: "Art Hunkins"
To: "Developer discussions"
Sent: Tuesday, October 20, 2009 4:15 AM
Subject: Re: [Cs-dev] patch for incomplete CSOUND segfault
> Victor,
>
> No, my code doesn't do that. It seems I should add it. I'm using the csd
> method from your csndsugui.
>
> The relevent code is:
>
> def version1(self, widget):
> if self.ver != 0:
> self.box1.destroy()
> self.box2.destroy()
> self.ver = 1
> self.box1 = self.w.box(True, self.bb)
> self.w.text("", self.box1)
> self.box2 = self.w.box(True, self.bb)
> self.f = self.w.framebox(" 1 - MyMusicMIDI ", False, self.box2,
> self.r)
> self.b1 = self.w.box(True, self.f)
> self.b2 = self.w.box(True, self.f)
> self.b3 = self.w.box(True, self.f)
> self.w.reset()
> self.w.csd("MyMusicMIDI.csd")
> self.w.spin(1, 0, 15, 1, 1, self.b1, 0, "chan", "Channel # [0=CC7,\n \
> channels 1-8(9)]")
>
> I presume the csd line should be changed to something like:
> self.res = self.w.csd("MyMusicMIDI.csd")
> and then add:
> if self.res:
> followed by some sort of exit statement. (I'm, as you know, a neophyte
> python person.)
>
> Could you please help with the details? I also assume this check should be
> added even when MIDI is not involved, to head off any type of compile
> error - correct?
>
> TIA
>
> Art Hunkins
>
> ----- Original Message -----
> From: "victor"
> To: "Developer discussions"
> Sent: Sunday, October 18, 2009 12:00 PM
> Subject: Re: [Cs-dev] patch for incomplete CSOUND segfault
>
>
>> That's good thanks, but this is generally averted by checking the
>> result of a call to Compile(). Is Art Hunkis' code doing this? That is
>> what is supposed to be done. If it returns an error, then no further
>> calls should be made to performance functions.
>>
>> Victor
>>
>>
>> ----- Original Message -----
>> From: "Wade Brainerd"
>> To:
>> Sent: Friday, October 16, 2009 3:31 AM
>> Subject: [Cs-dev] patch for incomplete CSOUND segfault
>>
>>
>>> Hi all,
>>>
>>> When a sound fails to compile (e.g. SetJmp is invoked) the CSOUND can
>>> be left in an incomplete state. Calling a performance function on an
>>> incomplete CSOUND, or starting a performance thread (part of the SWIG
>>> interfaces) can lead to a segfault.
>>>
>>> I encountered this while testing Art Hunkins' OurMusic Sugar activity.
>>> The segfault occurred when I opened a .csd file that required a MIDI
>>> input device, and I did not have one in my machine.
>>>
>>> I developed a patch and posted it to this Fedora bug:
>>> https://bugzilla.redhat.com/show_bug.cgi?id=529293
>>> The patch delays setting the COMP flag until csoundCompile returns
>>> success. The performance functions check for the presence of the COMP
>>> flag before performing.
>>>
>>> Best,
>>> Wade
>>>
>>> ------------------------------------------------------------------------------
>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> is the only developer event you need to attend this year. Jumpstart your
>>> developing skills, take BlackBerry mobile applications to market and
>>> stay
>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>> http://p.sf.net/sfu/devconference
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |