| Ok, but when I take out the print I get another segfault :( The
following instrument, when called from plain old Csound will segfault:
instr 1
S1 chnget "string"
kamp expon 32000, p3, 0.001
a1 oscil kamp, p4, 1
out a1
endin
On 24 January 2014 14:53, Victor Lazzarini wrote:
> yes, but it’s print that is issuing an INIT ERROR, which it should do IMHO.
>
> Victor
> On 24 Jan 2014, at 14:41, Rory Walsh wrote:
>
>> Just did some more testing there. It seems that it gives an INIT ERROR
>> if the string is empty rather than a warning. For example if I run the
>> following instrument outside a host it causes an init-error:
>>
>> instr 1
>> S1 chnget "string"
>> prints S1
>> kamp expon 32000, p3, 0.001
>> a1 oscil kamp, p4, 1
>> out a1
>> endin
>>
>> A non-fatal warning would be much nicer?
>>
>> On 24 January 2014 13:05, Rory Walsh wrote:
>>> Thanks Victor, that seems to have done the trick. I'll try it out a
>>> little more later on today. Muchas gracias.
>>>
>>> On 24 January 2014 12:55, Victor Lazzarini wrote:
>>>> OK, the problem was that the string was empty and I did not protect that. Now it won’t crash.
>>>> But if you don’t set the string, it will give you warning that the string is empty.
>>>>
>>>> Victor
>>>> On 24 Jan 2014, at 11:58, Victor.Lazzarini@nuim.ie wrote:
>>>>
>>>>>
>>>>> Ok, I will just need to fix it correctly. I will let you know.
>>>>> ----- Original Message -----
>>>>> From: Rory Walsh
>>>>> Date: Friday, January 24, 2014 10:26 am
>>>>> Subject: Re: [Cs-dev] problem with SetChannel() and strings..
>>>>> To: Developer discussions
>>>>>
>>>>>> I now get a seg fault with the instrument I posted yesterday?
>>>>>> Commenting out the chnget gets rid of the segfault and k-rate channels
>>>>>> don't cause a seg fault.
>>>>>>
>>>>>>
>>>>>> On 24 January 2014 00:28, Victor Lazzarini
>>>>>> wrote:
>>>>>>> Can you try now to see if it’s fixed in git develop branch?
>>>>>>> On 23 Jan 2014, at 23:58, Rory Walsh wrote:
>>>>>>>
>>>>>>>> Done. Thanks.
>>>>>>>>
>>>>>>>> On 23 January 2014 23:35, Victor Lazzarini
>>>>>> wrote:
>>>>>>>>> The code for string channels has recently changed (to fix a
>>>>>> bug), maybe the chnget has not been properly updated.
>>>>>>>>> Can you file a ticket?
>>>>>>>>> On 23 Jan 2014, at 20:24, Rory Walsh wrote:
>>>>>>>>>
>>>>>>>>>> My full .csd has
>>>>>>>>>>
>>>>>>>>>> chn_S "string", 3
>>>>>>>>>>
>>>>>>>>>> I've attached the two files in case anyone wants to try
>>>>>> them out.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 23 January 2014 20:15, Andres Cabrera
>>>>>> wrote:
>>>>>>>>>>> I suspect you might need to declare the channel first.
>>>>>>>>>>>
>>>>>>>>>>> If you use the API channel setters before having used the
>>>>>> channel in the
>>>>>>>>>>> orc, I think the channels don't get automatically created.
>>>>>> I might be wrong
>>>>>>>>>>> though...
>>>>>>>>>>>
>>>>>>>>>>> Maybe this whole mechanism can be thought through and
>>>>>> analyized to make it
>>>>>>>>>>> the easiest most consistent and sensible as possible.
>>>>>>>>>>>
>>>>>>>>>>> Cheers,
>>>>>>>>>>> Andrés
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Jan 23, 2014 at 11:26 AM, Rory Walsh
>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> The following just prints lots of junk characters to
>>>>>> screen. In
>>>>>>>>>>>> Csound5 I had similar code that worked fine.
>>>>>>>>>>>>
>>>>>>>>>>>> #include
>>>>>>>>>>>> #include "csound.hpp"
>>>>>>>>>>>>
>>>>>>>>>>>> int main(int argc, char *argv[])
>>>>>>>>>>>> {
>>>>>>>>>>>> Csound* csound = new Csound;
>>>>>>>>>>>> csound->Compile("example1.csd");
>>>>>>>>>>>> csound->SetChannel("string", "stringValue");
>>>>>>>>>>>> csound->Perform();
>>>>>>>>>>>> /*delete instance of csound*/
>>>>>>>>>>>> delete csound;
>>>>>>>>>>>> }
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> /* example 1.csd */
>>>>>>>>>>>> instr 1
>>>>>>>>>>>> Sfile chnget "string"
>>>>>>>>>>>> prints Sfile
>>>>>>>>>>>> kamp expon 32000, p3, 0.001
>>>>>>>>>>>> a1 oscil kamp, p4, 1
>>>>>>>>>>>> out a1
>>>>>>>>>>>> endin
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ----------------------------------------------------------
>>>>>> --------------------
>>>>>>>>>>>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>>>>>>>>>>>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>>>>>>>>>>>> Critical Workloads, Development Environments & Everything
>>>>>> In Between.
>>>>>>>>>>>> Get a Quote or Start a Free Trial Today.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk>>>>>> _______________________________________________
>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> -----------------------------------------------------------
>>>>>> -------------------
>>>>>>>>>>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>>>>>>>>>>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>>>>>>>>>>> Critical Workloads, Development Environments & Everything
>>>>>> In Between.
>>>>>>>>>>> Get a Quote or Start a Free Trial Today.
>>>>>>>>>>>
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk>>>>> _______________________________________________
>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>
>>>>>>>>>> --------------------------
>>>>>> ----------------------------------------------------
>>>>>>>>>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>>>>>>>>>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>>>>>>>>>> Critical Workloads, Development Environments & Everything
>>>>>> In Between.
>>>>>>>>>> Get a Quote or Start a Free Trial Today.
>>>>>>>>>>
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk_______________________________________________>>>> Csound-devel mailing list
>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> -------------------------------------------------------------
>>>>>> -----------------
>>>>>>>>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>>>>>>>>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>>>>>>>>> Critical Workloads, Development Environments & Everything In
>>>>>> Between.>>> Get a Quote or Start a Free Trial Today.
>>>>>>>>>
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk>>> _______________________________________________
>>>>>>>>> Csound-devel mailing list
>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>
>>>>>>>> --------------------------------------------------------------
>>>>>> ----------------
>>>>>>>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>>>>>>>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>>>>>>>> Critical Workloads, Development Environments & Everything In
>>>>>> Between.>> Get a Quote or Start a Free Trial Today.
>>>>>>>>
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk>> _______________________________________________
>>>>>>>> Csound-devel mailing list
>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------
>>>>>> ---------------
>>>>>>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>>>>>>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>>>>>>> Critical Workloads, Development Environments & Everything In
>>>>>> Between.> Get a Quote or Start a Free Trial Today.
>>>>>>>
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>
>>>>>> -----------------------------------------------------------------
>>>>>> -------------
>>>>>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>>>>>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>>>>>> Critical Workloads, Development Environments & Everything In Between.
>>>>>> Get a Quote or Start a Free Trial Today.
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>> Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,
>>>>> National University of Ireland, Maynooth
>>>>> ------------------------------------------------------------------------------
>>>>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>>>>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>>>>> Critical Workloads, Development Environments & Everything In Between.
>>>>> Get a Quote or Start a Free Trial Today.
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk_______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>>>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>>>> Critical Workloads, Development Environments & Everything In Between.
>>>> Get a Quote or Start a Free Trial Today.
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> ------------------------------------------------------------------------------
>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>> Critical Workloads, Development Environments & Everything In Between.
>> Get a Quote or Start a Free Trial Today.
>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |