| Hi Steven,
I think it was updated, but not correctly. The correct way is make the channel carry the STRINGDAT rather than
the char pointer.
Regards
Victor
On 26 Dec 2013, at 21:45, Steven Yi wrote:
> Hi Victor,
>
> (Happy Holidays! :) )
>
> Thanks for looking into it. I'll try to find out why this works when
> setChannel is called after the first chnexport is called but not
> before. I assume there's just some branch of code that wasn't updated
> to use STRINGDAT as you mentioned.
>
> Thanks!
> steven
>
> On Wed, Dec 25, 2013 at 11:30 AM, Victor Lazzarini
> wrote:
>> My impression is that this line is dodgy (bus.c:1171)
>>
>> if(type == CSOUND_STRING_CHANNEL)
>> chn->data = (MYFLT *) ((STRINGDAT *)p->arg)->data;
>>
>> because when a new string is set, chn->data is liable to point elsewhere and
>> ((STRINGDAT *)p->arg)->data does not point to the contents of the channel anymore.
>>
>> I think the solution might be to turn “chn->data” into STRINGDAT pointers (and update
>> all of the code relating to string channels). At the moment, chn->data is carrying a pointer
>> to char* for string channels and that is not going to work for chnexport.
>>
>> Victor
>>
>> On 25 Dec 2013, at 16:16, Victor Lazzarini wrote:
>>
>>> The crash is in printksset_S (prints opcode), but the bug is in chn_export. If you use chnget instead, it does not crash.
>>> On 24 Dec 2013, at 23:07, Steven Yi wrote:
>>>
>>>> Hi All,
>>>>
>>>> I was debugging an issue found with Blue and the image opcodes. The
>>>> bug turned out not to be related to the image opcodes, but rather had
>>>> to do with string channels. I'm finding this behavior:
>>>>
>>>> 1. If I compile a CSD, performKsmps once (so that instr 0 is
>>>> executed), then call SetChannel, all is well
>>>> 2. If I compile a CSD, run SetChannel, then run performKsmps, I get a crash.
>>>>
>>>> I've attached a python test file that illustrates this. The crash
>>>> comes from strlen:
>>>>
>>>> SECTION 1:
>>>> new alloc for instr 1:
>>>> Program received signal EXC_BAD_ACCESS, Could not access memory.
>>>> Reason: 13 at address: 0x0000000000000000
>>>> 0x00007fff86acb812 in strlen ()
>>>> (gdb) bt
>>>> #0 0x00007fff86acb812 in strlen ()
>>>> #1 0x0000000101ae7505 in cs_strdup (csound=0x101090e00,
>>>> str=0x732f73726573552f ) at
>>>> csound_orc_semantics.c:65
>>>> #2 0x000000010008a864 in _PyEval_SliceIndex ()
>>>> #3 0x00000001000874d4 in PyEval_EvalFrameEx ()
>>>> #4 0x0000000100084093 in PyEval_EvalCodeEx ()
>>>> #5 0x0000000100083a24 in PyEval_EvalCode ()
>>>> #6 0x00000001000a2c2c in PyParser_ASTFromFile ()
>>>> #7 0x00000001000a2cd3 in PyRun_FileExFlags ()
>>>> #8 0x00000001000a2821 in PyRun_SimpleFileExFlags ()
>>>> #9 0x00000001000b3363 in Py_Main ()
>>>> #10 0x00007fff938bb5fd in start ()
>>>>
>>>> I'm not sure yet how the problem should be solved. To note, the API
>>>> related Java code in Blue had not changed from what I was using in
>>>> CS5, so this behavior is new in CS6.
>>>>
>>>> Thanks!
>>>> steven
>>>> ------------------------------------------------------------------------------
>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>> organizations don't have a clear picture of how application performance
>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |