LISTSERV mailing list manager LISTSERV 16.5

Help for CSOUND Archives


CSOUND Archives

CSOUND Archives


CSOUND@LISTSERV.HEANET.IE


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

CSOUND Home

CSOUND Home

CSOUND  January 2016

CSOUND January 2016

Subject:

Re: How to use String filenames, filelen and diskin2 with OSC?

From:

Victor Lazzarini <[log in to unmask]>

Reply-To:

A discussion list for users of Csound <[log in to unmask]>

Date:

Fri, 29 Jan 2016 18:42:22 +0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (376 lines)

OK, we can track this on github. 
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 29 Jan 2016, at 18:18, Anton Kholomiov <[log in to unmask]> wrote:
> 
> @Viictor I'm back again. The brand new version segfaults with no messages being sent((
> Sometimes it can recieve a 4 to 10 messages and segfault.
> I've opened an issue on the github:
> 
> https://github.com/csound/csound/issues/590
> 
> I've made a test suite to simplify testing (it sends random messages)
> 
> Also do you know how to install two versions of csound? One for release and one for testing.
> Is there a `make install` command where I can specify a directory here to install.
> So that I can use fast csound and supply backtraces if there is a need in them.
> 
> Anton
> 
> 
> 
> 
> 2016-01-26 17:37 GMT+03:00 Anton Kholomiov <[log in to unmask]>:
> One question before I try to test. I see changes for strcpy in the commit, but in the code I use strcpyk.
> Is it ok for the fix?
> 
> 2016-01-26 17:10 GMT+03:00 Victor Lazzarini <[log in to unmask]>:
> I think I found the bug, I fixed in git. Try to pull, compile and see if it works for you now.
> ========================
> Dr Victor Lazzarini
> Dean of Arts, Celtic Studies and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
> 
> > On 26 Jan 2016, at 13:31, Anton Kholomiov <[log in to unmask]> wrote:
> >
> > anyway thanks for all the help and support. At least I know how to build
> > csound from sources
> >
> > I wish I could get so many comments for one of my future csound tracks :)
> > It's really smart error that can jump at you when you are about to post
> > to mailing list that it's gone.
> >
> > Anton
> >
> > 2016-01-26 16:28 GMT+03:00 Anton Kholomiov <[log in to unmask]>:
> > @Victor I'm sorry to say it but it fails still (with your recent commit and proposal to set values for
> > string array). The scenario I've posted before is working but if I proceed
> > there is always a point where there is a crash.
> >
> > One of the recent messages
> >
> > csound: malloc.c:3695: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed.
> >
> > Sometimes it segfaults.
> >
> > I'd better make an issue on github. I'll try to make a minimal example.
> >
> > 2016-01-26 15:58 GMT+03:00 Steven Yi <[log in to unmask]>:
> > Ah, I see it now. A couple things:
> >
> > 1. we should add init functions for strings and f-sigs (in
> > createString and createFsig in csound_standard_types.c).  They should
> > set the default values.
> >
> > 2. for places we create initialise or resize arrays, we should check
> > the array sub type to see if it's init function is set and, if so,
> > iterate over the member data and call the init function.
> >
> > On Tue, Jan 26, 2016 at 7:44 AM, Victor Lazzarini
> > <[log in to unmask]> wrote:
> > > I had a look, and we could add a new initvar function to S types as we do for numeric types? Do you think that would do it?
> > > ========================
> > > Dr Victor Lazzarini
> > > Dean of Arts, Celtic Studies and Philosophy,
> > > Maynooth University,
> > > Maynooth, Co Kildare, Ireland
> > > Tel: 00 353 7086936
> > > Fax: 00 353 1 7086952
> > >
> > >> On 26 Jan 2016, at 12:37, Steven Yi <[log in to unmask]> wrote:
> > >>
> > >> Wow, that's a good find Victor.  I took a quick to diagnose what would
> > >> be necessary for initialisation of each data member of an array. It's
> > >> a bit technical so I've just put it in a github issue
> > >> (https://github.com/csound/csound/issues/588) to keep it off this
> > >> list.  We should probably discuss on the dev list or through the
> > >> github issue.
> > >>
> > >> On Tue, Jan 26, 2016 at 7:11 AM, Victor Lazzarini
> > >> <[log in to unmask]> wrote:
> > >>> Ok, here’s the problem (it looks like). When you start, some of the strings of the array are NULL, and if you
> > >>> try to read them, you get a crash. If you initialise them to empty strings, then it goes away (it appears). Add
> > >>> these lines to the top, before your instrument definitions:
> > >>>
> > >>> ii init 0
> > >>> while ii < $SIZE do
> > >>>  gSFiles[ii] strcpy ""
> > >>>  ii += 1
> > >>> od
> > >>>
> > >>> From our (devs) perspective, I think we need to consider whether string arrays need to be initialised by
> > >>> default to empty strings.
> > >>>
> > >>> ========================
> > >>> Dr Victor Lazzarini
> > >>> Dean of Arts, Celtic Studies and Philosophy,
> > >>> Maynooth University,
> > >>> Maynooth, Co Kildare, Ireland
> > >>> Tel: 00 353 7086936
> > >>> Fax: 00 353 1 7086952
> > >>>
> > >>>> On 26 Jan 2016, at 11:59, Victor Lazzarini <[log in to unmask]> wrote:
> > >>>>
> > >>>> Actually, I manage to get a crash now. I am looking at it.
> > >>>> ========================
> > >>>> Dr Victor Lazzarini
> > >>>> Dean of Arts, Celtic Studies and Philosophy,
> > >>>> Maynooth University,
> > >>>> Maynooth, Co Kildare, Ireland
> > >>>> Tel: 00 353 7086936
> > >>>> Fax: 00 353 1 7086952
> > >>>>
> > >>>>> On 26 Jan 2016, at 11:47, Victor Lazzarini <[log in to unmask]> wrote:
> > >>>>>
> > >>>>> yes, I wouldn’t think that was the problem. I’ve pushed a new version with some
> > >>>>> changes that could stop the crash (but are not the final solution, just diagnostics).
> > >>>>> Can you try them?
> > >>>>>
> > >>>>> ========================
> > >>>>> Dr Victor Lazzarini
> > >>>>> Dean of Arts, Celtic Studies and Philosophy,
> > >>>>> Maynooth University,
> > >>>>> Maynooth, Co Kildare, Ireland
> > >>>>> Tel: 00 353 7086936
> > >>>>> Fax: 00 353 1 7086952
> > >>>>>
> > >>>>>> On 26 Jan 2016, at 11:35, Anton Kholomiov <[log in to unmask]> wrote:
> > >>>>>>
> > >>>>>> I'm sorry for misinformation. The error is tricky to manifest.
> > >>>>>> Tere was no crash by some happy accident when I've commented the if/thens.
> > >>>>>> But then later I've made a version with no if/then for diskin2
> > >>>>>> (I've put mono and stereo versions at separate instruments) and it fails too
> > >>>>>> with the same error.
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>> 2016-01-26 14:28 GMT+03:00 Victor Lazzarini <[log in to unmask]>:
> > >>>>>> So what you are saying is that, without the if … then, there is no crash?
> > >>>>>>
> > >>>>>> Note that the condition will be checked both at i-time and perf-time, so it should affect
> > >>>>>> the code at all. If the crash is not happening, the reason might be different.
> > >>>>>> We know that it seems to be triggered by an array_get(), which is called whenever
> > >>>>>> you are trying to read from an array (as in the filenchnls and diskin2 lines). If we
> > >>>>>> can track down which one of the two is responsible, we should be able to locate
> > >>>>>> the problem.
> > >>>>>>
> > >>>>>> ========================
> > >>>>>> Dr Victor Lazzarini
> > >>>>>> Dean of Arts, Celtic Studies and Philosophy,
> > >>>>>> Maynooth University,
> > >>>>>> Maynooth, Co Kildare, Ireland
> > >>>>>> Tel: 00 353 7086936
> > >>>>>> Fax: 00 353 1 7086952
> > >>>>>>
> > >>>>>>> On 26 Jan 2016, at 09:05, Anton Kholomiov <[log in to unmask]> wrote:
> > >>>>>>>
> > >>>>>>> The code with no osc also fails when I wrap it to python interface(((
> > >>>>>>>
> > >>>>>>> I guess Steven is right. For at least one source of errors. When I comment out conditional code for diskin2 the original bad scenario produces no errors, even with OSC:
> > >>>>>>>
> > >>>>>>> ;ichan filenchnls gSFiles[iChannel]
> > >>>>>>> ;if (ichan == 1) then
> > >>>>>>> ;    al diskin2 gSFiles[iChannel], 1
> > >>>>>>> ;    ar = al
> > >>>>>>> ;else
> > >>>>>>>  al, ar diskin2 gSFiles[iChannel], 1
> > >>>>>>> ;endif
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> 2016-01-26 0:39 GMT+03:00 jpff <[log in to unmask]>:
> > >>>>>>> I have pushed a small fix to git in file Opcodes/OSC.c
> > >>>>>>> It _might_ fix it.
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> On Mon, 25 Jan 2016, jpff wrote:
> > >>>>>>>
> > >>>>>>> Found an oddity in OSC receiving strings -- investigating.
> > >>>>>>> Also code is weak on tye checking
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> On Mon, 25 Jan 2016, Anton Kholomiov wrote:
> > >>>>>>>
> > >>>>>>> It's probably caused by the following line in my code:
> > >>>>>>> ~~~
> > >>>>>>> gSFiles[kChannel] strcpyk SFile
> > >>>>>>> ~~~
> > >>>>>>>
> > >>>>>>> Where  kChannel and SFile are filled with values that I receive in the OSC
> > >>>>>>> message
> > >>>>>>>
> > >>>>>>> 2016-01-25 23:25 GMT+03:00 jpff <[log in to unmask]>:
> > >>>>>>>    That backtrace looks like a double free in string_copy_value where
> > >>>>>>>    id attempts to delete the space in the dst arument.  Really I
> > >>>>>>>    would love tis run under valgrind or ElectricFence or similar
> > >>>>>>>
> > >>>>>>>    On Mon, 25 Jan 2016, Anton Kholomiov wrote:
> > >>>>>>>
> > >>>>>>>          Here is make trace:
> > >>>>>>>          ~~~
> > >>>>>>>          diskin2: opened '/home/anton/Seashore.wav':
> > >>>>>>>                   44100 Hz, 2 channel(s), 546731 sample frames
> > >>>>>>>           i   1 time   220.31819:   100.00100
> > >>>>>>>           i   1 time   220.31819:    80.00100
> > >>>>>>>          *** Error in `/usr/local/bin/csound': free(): invalid
> > >>>>>>>          next size (fast):
> > >>>>>>>          0x0000000000843840 ***
> > >>>>>>>
> > >>>>>>>          Program received signal SIGABRT, Aborted.
> > >>>>>>>          0x00007ffff72decc9 in __GI_raise (sig=sig@entry=6)
> > >>>>>>>              at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> > >>>>>>>          56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such
> > >>>>>>>          file or directory.
> > >>>>>>>          (gdb) bt
> > >>>>>>>          #0  0x00007ffff72decc9 in __GI_raise (sig=sig@entry=6)
> > >>>>>>>              at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> > >>>>>>>          #1  0x00007ffff72e20d8 in __GI_abort () at abort.c:89
> > >>>>>>>          #2  0x00007ffff731b394 in __libc_message
> > >>>>>>>          (do_abort=do_abort@entry=1,
> > >>>>>>>              fmt=fmt@entry=0x7ffff7429b28 "*** Error in `%s':
> > >>>>>>>          %s: 0x%s ***\n")
> > >>>>>>>              at ../sysdeps/posix/libc_fatal.c:175
> > >>>>>>>          #3  0x00007ffff732766e in malloc_printerr
> > >>>>>>>          (ptr=<optimized out>,
> > >>>>>>>              str=0x7ffff7429cc8 "free(): invalid next size
> > >>>>>>>          (fast)", action=1)
> > >>>>>>>              at malloc.c:4996
> > >>>>>>>          #4  _int_free (av=<optimized out>, p=<optimized out>,
> > >>>>>>>          have_lock=0)
> > >>>>>>>              at malloc.c:3840
> > >>>>>>>          #5  0x00007ffff78e911f in mfree (csound=0x604040,
> > >>>>>>>          p=0x843850)
> > >>>>>>>              at /home/anton/tools/csound/Engine/memalloc.c:172
> > >>>>>>>          #6  0x00007ffff78fdd44 in string_copy_value
> > >>>>>>>          (csound=0x604040, dest=0x8cc1c8,
> > >>>>>>>              src=0x7b5a70) at
> > >>>>>>>          /home/anton/tools/csound/Engine/csound_standard_types.c:70
> > >>>>>>>          #7  0x00007ffff79cc2d3 in array_get (csound=0x604040,
> > >>>>>>>          p=0x8d12d0)
> > >>>>>>>              at /home/anton/tools/csound/Opcodes/arrays.c:264
> > >>>>>>>          #8  0x00007ffff7a4e8f5 in kperf_nodebug
> > >>>>>>>          (csound=0x604040)
> > >>>>>>>              at /home/anton/tools/csound/Top/csound.c:1552
> > >>>>>>>          #9  0x00007ffff7a500a3 in csoundPerform
> > >>>>>>>          (csound=0x604040)
> > >>>>>>>              at /home/anton/tools/csound/Top/csound.c:2044
> > >>>>>>>          #10 0x000000000040181d in main (argc=2,
> > >>>>>>>          argv=0x7fffffffd7b8)
> > >>>>>>>              at
> > >>>>>>>          /home/anton/tools/csound/frontends/csound/csound_main.c:318
> > >>>>>>>          ~~~
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> Trimmed as it is messing thedigest
> > >>>>>>>
> > >>>>>>> ==John ff
> > >>>>>>>
> > >>>>>>> Csound mailing list
> > >>>>>>> [log in to unmask]
> > >>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> > >>>>>>> Send bugs reports to
> > >>>>>>>     https://github.com/csound/csound/issues
> > >>>>>>> Discussions of bugs and features can be posted here
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> Csound mailing list [log in to unmask]
> > >>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> > >>>>>>> https://github.com/csound/csound/issues Discussions of bugs and features can
> > >>>>>>> be posted here
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> Csound mailing list
> > >>>>>>> [log in to unmask]
> > >>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> > >>>>>>> Send bugs reports to
> > >>>>>>>    https://github.com/csound/csound/issues
> > >>>>>>> Discussions of bugs and features can be posted here
> > >>>>>>>
> > >>>>>>> Csound mailing list
> > >>>>>>> [log in to unmask]
> > >>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> > >>>>>>> Send bugs reports to
> > >>>>>>>     https://github.com/csound/csound/issues
> > >>>>>>> Discussions of bugs and features can be posted here
> > >>>>>>>
> > >>>>>>> Csound mailing list [log in to unmask] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> > >>>>>>
> > >>>>>> Csound mailing list
> > >>>>>> [log in to unmask]
> > >>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> > >>>>>> Send bugs reports to
> > >>>>>>      https://github.com/csound/csound/issues
> > >>>>>> Discussions of bugs and features can be posted here
> > >>>>>>
> > >>>>>> Csound mailing list [log in to unmask] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> > >>>>>
> > >>>>> Csound mailing list
> > >>>>> [log in to unmask]
> > >>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> > >>>>> Send bugs reports to
> > >>>>>      https://github.com/csound/csound/issues
> > >>>>> Discussions of bugs and features can be posted here
> > >>>>
> > >>>> Csound mailing list
> > >>>> [log in to unmask]
> > >>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> > >>>> Send bugs reports to
> > >>>>       https://github.com/csound/csound/issues
> > >>>> Discussions of bugs and features can be posted here
> > >>>
> > >>> Csound mailing list
> > >>> [log in to unmask]
> > >>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> > >>> Send bugs reports to
> > >>>        https://github.com/csound/csound/issues
> > >>> Discussions of bugs and features can be posted here
> > >>
> > >> Csound mailing list
> > >> [log in to unmask]
> > >> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> > >> Send bugs reports to
> > >>        https://github.com/csound/csound/issues
> > >> Discussions of bugs and features can be posted here
> > >
> > > Csound mailing list
> > > [log in to unmask]
> > > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> > > Send bugs reports to
> > >         https://github.com/csound/csound/issues
> > > Discussions of bugs and features can be posted here
> >
> > Csound mailing list
> > [log in to unmask]
> > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> > Send bugs reports to
> >         https://github.com/csound/csound/issues
> > Discussions of bugs and features can be posted here
> >
> >
> > Csound mailing list [log in to unmask] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> 
> Csound mailing list
> [log in to unmask]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> 
> 
> Csound mailing list [log in to unmask] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list
[log in to unmask]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015

ATOM RSS1 RSS2



LISTSERV.HEANET.IE

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager