Csound Csound-dev Csound-tekno Search About

[Cs-dev] Bug in Android Csound6.01?

Date2013-11-15 23:26
From"Art Hunkins"
Subject[Cs-dev] Bug in Android Csound6.01?
To follow up on an earlier email (to the general Csound list):

The simple code below works fine on the two earlier versions of Android 
Csound6 (as well as CSD Player), but not on Android6.01. I'd very much 
appreciate if one or more developers familiar with Android Csound could 
investigate (and rectify if possible).

On the earlier versions, as expected, printk2 outputs 200 until butt1 is 
pressed - when it changes to 400.

On 6.01, printk2 outputs 0 (and there is silence) until butt1 is pressed - 
changing to 400.

Observations regarding 6.01:
When the gkfreq init is placed within instr 1, all is as expected.
When the first five lines of instr 1 are commented out, all is as expected.
The problem seems to lie in the interaction between a global variable in the 
header and chnget in instr 1.

Thanks for any and all insight.

Art Hunkins


 


-odac




sr      = 44100
ksmps = 100
nchnls  =       2

gkfreq   init    200

instr 1

k1      chnget   "butt1"
k1a     trigger  k1, .5, 0
        if k1a == 1 then
gkfreq  =        400
        endif
        printk2  gkfreq
aout    lfo      10000, gkfreq
        outs     aout, aout

        endin




i1 0 60


 


------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-11-15 23:34
FromSteven Yi
SubjectRe: [Cs-dev] Bug in Android Csound6.01?
Hi Art,

It's a bug and it's related to
http://sourceforge.net/p/csound/tickets/66/.  The issue is tricky to
debug.  I was looking at this a couple days ago and narrowed it down
to the gkvar being written to not being the same memory address as the
one read from.  I'll probably keep looking at this tomorrow or Sunday
unless someone beats me to it.

Thanks,
steven

On Fri, Nov 15, 2013 at 6:26 PM, Art Hunkins  wrote:
> To follow up on an earlier email (to the general Csound list):
>
> The simple code below works fine on the two earlier versions of Android
> Csound6 (as well as CSD Player), but not on Android6.01. I'd very much
> appreciate if one or more developers familiar with Android Csound could
> investigate (and rectify if possible).
>
> On the earlier versions, as expected, printk2 outputs 200 until butt1 is
> pressed - when it changes to 400.
>
> On 6.01, printk2 outputs 0 (and there is silence) until butt1 is pressed -
> changing to 400.
>
> Observations regarding 6.01:
> When the gkfreq init is placed within instr 1, all is as expected.
> When the first five lines of instr 1 are commented out, all is as expected.
> The problem seems to lie in the interaction between a global variable in the
> header and chnget in instr 1.
>
> Thanks for any and all insight.
>
> Art Hunkins
>
>
>  
> 
>
> -odac
>
> 
> 
>
> sr      = 44100
> ksmps = 100
> nchnls  =       2
>
> gkfreq   init    200
>
> instr 1
>
> k1      chnget   "butt1"
> k1a     trigger  k1, .5, 0
>         if k1a == 1 then
> gkfreq  =        400
>         endif
>         printk2  gkfreq
> aout    lfo      10000, gkfreq
>         outs     aout, aout
>
>         endin
>
> 
> 
>
> i1 0 60
>
> 
> 
>
>
> ------------------------------------------------------------------------------
> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
> Free app hosting. Or install the open source package on any LAMP server.
> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-12-09 02:58
FromSteven Yi
SubjectRe: [Cs-dev] Bug in Android Csound6.01?
Hi All,

Following up with this: I've found a fix to this and Bug #66.  It took
me some time to figure out what was going on. It looks to me that
there was a commit by Victor on Sep 25th, 2013 (commit
0f3e46861ea1af9a795df18d8d0500d90267d41b) labelled as "fix for UDO
with various arguments".  There was some odd code that committed for
insert.c that I *think* was there for debugging purposes.  The result
of the code was that it was setting the values of args to the the
value of the arg index, which might be 0, 1, 2, 3, etc.  After
removing this code, I am getting "200" printed with Art's example, and
Bug 66 is giving the expected results now.

Victor: Could you confirm that my analysis of what happened and the
code change is correct?

To note: this change came after 6.00.1.  It looks to me then that the
bug was introduced when 6.01.0 was released. All 6.01.0 releases then
would be affected.

Thanks!
steven

On Fri, Nov 15, 2013 at 6:34 PM, Steven Yi  wrote:
> Hi Art,
>
> It's a bug and it's related to
> http://sourceforge.net/p/csound/tickets/66/.  The issue is tricky to
> debug.  I was looking at this a couple days ago and narrowed it down
> to the gkvar being written to not being the same memory address as the
> one read from.  I'll probably keep looking at this tomorrow or Sunday
> unless someone beats me to it.
>
> Thanks,
> steven
>
> On Fri, Nov 15, 2013 at 6:26 PM, Art Hunkins  wrote:
>> To follow up on an earlier email (to the general Csound list):
>>
>> The simple code below works fine on the two earlier versions of Android
>> Csound6 (as well as CSD Player), but not on Android6.01. I'd very much
>> appreciate if one or more developers familiar with Android Csound could
>> investigate (and rectify if possible).
>>
>> On the earlier versions, as expected, printk2 outputs 200 until butt1 is
>> pressed - when it changes to 400.
>>
>> On 6.01, printk2 outputs 0 (and there is silence) until butt1 is pressed -
>> changing to 400.
>>
>> Observations regarding 6.01:
>> When the gkfreq init is placed within instr 1, all is as expected.
>> When the first five lines of instr 1 are commented out, all is as expected.
>> The problem seems to lie in the interaction between a global variable in the
>> header and chnget in instr 1.
>>
>> Thanks for any and all insight.
>>
>> Art Hunkins
>>
>>
>>  
>> 
>>
>> -odac
>>
>> 
>> 
>>
>> sr      = 44100
>> ksmps = 100
>> nchnls  =       2
>>
>> gkfreq   init    200
>>
>> instr 1
>>
>> k1      chnget   "butt1"
>> k1a     trigger  k1, .5, 0
>>         if k1a == 1 then
>> gkfreq  =        400
>>         endif
>>         printk2  gkfreq
>> aout    lfo      10000, gkfreq
>>         outs     aout, aout
>>
>>         endin
>>
>> 
>> 
>>
>> i1 0 60
>>
>> 
>> 
>>
>>
>> ------------------------------------------------------------------------------
>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>> Free app hosting. Or install the open source package on any LAMP server.
>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net