[chuck-users] severe ChucK v1.3.0.0 bug

Robin Haberkorn robin.haberkorn at googlemail.com
Wed Aug 29 08:48:02 EDT 2012


try that one:

fun void foo(string s)
{
	<<< s >>>;
}

"bar" => string s;

while (true)
	s => foo;

It's not only affecting string constants as I first suspected. This
breaks a lot of my functions where one variable is passed to another
function multiple times.
I assume that the string value reference is released on foo() return but
not increased when passing it to foo().

Could you drop a note when the fix hits SVN so I can import it into my
ChucK Git repository?

cheers,
Robin

On 29/08/12 08:34, Ge Wang wrote:
> Hi Robin!
> 
> Ah yes, this is a bug that came out of our updated, slightly less dumb
> reference counting.  Will fix and we will roll out an update soon!  Nice
> catch!  Thanks!
> 
> Ge!
> 
> On Wed, 29 Aug 2012, Robin Haberkorn wrote:
> 
>> On 29/08/12 02:52, Robin Haberkorn wrote:
>>> ...
>>> uncommenting the debug prints:
>>>
>>> rhaberkorn at nb005-lx001:~$ chuck-1.3.0.0/src/chuck --srate:44100 bug.ck
>>> 1 :(int)
>>> "bar" : (string)
>>> 2 :(int)
>>> 1 :(int)
>>> "bar" : (string)
>>> Segmentation fault (core dumped)
>>> ...
>>
>> this was actually using foo("bar") instead of "bar" => foo (the
>> behaviour is a little bit different)
>> _______________________________________________
>> chuck-users mailing list
>> chuck-users at lists.cs.princeton.edu
>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users


More information about the chuck-users mailing list