Csound Csound-dev Csound-tekno Search About

[Cs-dev] csoundCompileCsd()

Date2015-06-02 14:21
FromRory Walsh
Subject[Cs-dev] csoundCompileCsd()
AttachmentsNone  None  
I'm having some intermittent crashes with csoundCompileCsd(). What are the normal procedures for using this after a performance has already started? When I simply call compiledCsd() it runs most of the time, but every so often I get a crash(backtrace given below). The reason I started using compileCsd() was so I could avoid calling csoundReset() between updates. But is there something else I should be doing to free up memory before I recompile?

0  0x00007ffff67fc761  mfree  /home/rory/sourcecode/cabbageaudio/csound/Engine/memalloc.c  164
1  0x00007ffff6a3dd71  free_instrtxt  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  888
2  0x00007ffff6a3e00b  add_to_deadpool  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  937
3  0x00007ffff6a3eb53  insert_instrtxt  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1151
4  0x00007ffff6a3f266  engineState_merge  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1296
5  0x00007ffff6a401b1  csoundCompileTree  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1612
6  0x00007ffff6a406d7  csoundCompileOrc  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1698
7  0x00007ffff695f233  csoundCompileCsd  /home/rory/sourcecode/cabbageaudio/csound/Top/main.c  505
8  0x00000000004fcb53  Csound::CompileCsd  /usr/local/include/csound/csound.hpp  264


Date2015-06-02 14:33
FromVictor Lazzarini
SubjectRe: [Cs-dev] csoundCompileCsd()
You should be free to call this at any point. We did extensive work to recover memory from dead instances and
this could be a bug resulting from it. If we had a test code then we could debug.
========================
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 2 Jun 2015, at 14:21, Rory Walsh  wrote:
> 
> I'm having some intermittent crashes with csoundCompileCsd(). What are the normal procedures for using this after a performance has already started? When I simply call compiledCsd() it runs most of the time, but every so often I get a crash(backtrace given below). The reason I started using compileCsd() was so I could avoid calling csoundReset() between updates. But is there something else I should be doing to free up memory before I recompile? 
> 
> 0  0x00007ffff67fc761  mfree  /home/rory/sourcecode/cabbageaudio/csound/Engine/memalloc.c  164
> 1  0x00007ffff6a3dd71  free_instrtxt  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  888
> 2  0x00007ffff6a3e00b  add_to_deadpool  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  937
> 3  0x00007ffff6a3eb53  insert_instrtxt  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1151
> 4  0x00007ffff6a3f266  engineState_merge  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1296
> 5  0x00007ffff6a401b1  csoundCompileTree  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1612
> 6  0x00007ffff6a406d7  csoundCompileOrc  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1698
> 7  0x00007ffff695f233  csoundCompileCsd  /home/rory/sourcecode/cabbageaudio/csound/Top/main.c  505
> 8  0x00000000004fcb53  Csound::CompileCsd  /usr/local/include/csound/csound.hpp  264
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2015-06-02 15:02
FromRory Walsh
SubjectRe: [Cs-dev] csoundCompileCsd()
AttachmentsNone  None  
I'll see if I can throw something together.

On 2 June 2015 at 14:33, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
You should be free to call this at any point. We did extensive work to recover memory from dead instances and
this could be a bug resulting from it. If we had a test code then we could debug.
========================
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 2 Jun 2015, at 14:21, Rory Walsh <rorywalsh@ear.ie> wrote:
>
> I'm having some intermittent crashes with csoundCompileCsd(). What are the normal procedures for using this after a performance has already started? When I simply call compiledCsd() it runs most of the time, but every so often I get a crash(backtrace given below). The reason I started using compileCsd() was so I could avoid calling csoundReset() between updates. But is there something else I should be doing to free up memory before I recompile?
>
> 0  0x00007ffff67fc761  mfree  /home/rory/sourcecode/cabbageaudio/csound/Engine/memalloc.c  164
> 1  0x00007ffff6a3dd71  free_instrtxt  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  888
> 2  0x00007ffff6a3e00b  add_to_deadpool  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  937
> 3  0x00007ffff6a3eb53  insert_instrtxt  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1151
> 4  0x00007ffff6a3f266  engineState_merge  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1296
> 5  0x00007ffff6a401b1  csoundCompileTree  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1612
> 6  0x00007ffff6a406d7  csoundCompileOrc  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1698
> 7  0x00007ffff695f233  csoundCompileCsd  /home/rory/sourcecode/cabbageaudio/csound/Top/main.c  505
> 8  0x00000000004fcb53  Csound::CompileCsd  /usr/local/include/csound/csound.hpp  264
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2015-06-02 15:27
FromRory Walsh
SubjectRe: [Cs-dev] csoundCompileCsd()
AttachmentscompileCSD.cpp  test.csd  None  None  
As promised. You'll notice that at some point there is a problem with the f0 statement in the score. But taking that out results in a segfault. 

On 2 June 2015 at 15:02, Rory Walsh <rorywalsh@ear.ie> wrote:
I'll see if I can throw something together.

On 2 June 2015 at 14:33, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
You should be free to call this at any point. We did extensive work to recover memory from dead instances and
this could be a bug resulting from it. If we had a test code then we could debug.
========================
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 2 Jun 2015, at 14:21, Rory Walsh <rorywalsh@ear.ie> wrote:
>
> I'm having some intermittent crashes with csoundCompileCsd(). What are the normal procedures for using this after a performance has already started? When I simply call compiledCsd() it runs most of the time, but every so often I get a crash(backtrace given below). The reason I started using compileCsd() was so I could avoid calling csoundReset() between updates. But is there something else I should be doing to free up memory before I recompile?
>
> 0  0x00007ffff67fc761  mfree  /home/rory/sourcecode/cabbageaudio/csound/Engine/memalloc.c  164
> 1  0x00007ffff6a3dd71  free_instrtxt  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  888
> 2  0x00007ffff6a3e00b  add_to_deadpool  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  937
> 3  0x00007ffff6a3eb53  insert_instrtxt  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1151
> 4  0x00007ffff6a3f266  engineState_merge  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1296
> 5  0x00007ffff6a401b1  csoundCompileTree  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1612
> 6  0x00007ffff6a406d7  csoundCompileOrc  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1698
> 7  0x00007ffff695f233  csoundCompileCsd  /home/rory/sourcecode/cabbageaudio/csound/Top/main.c  505
> 8  0x00000000004fcb53  Csound::CompileCsd  /usr/local/include/csound/csound.hpp  264
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2015-06-02 16:04
FromVictor Lazzarini
SubjectRe: [Cs-dev] csoundCompileCsd()
Thanks; there is definitely a bug and it is to do with “named” instruments. It appears that if you use
numbers only, it is OK. 
I’ll try to get to the bottom of 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 2 Jun 2015, at 15:27, Rory Walsh  wrote:
> 
> As promised. You'll notice that at some point there is a problem with the f0 statement in the score. But taking that out results in a segfault.  
> 
> On 2 June 2015 at 15:02, Rory Walsh  wrote:
> I'll see if I can throw something together. 
> 
> On 2 June 2015 at 14:33, Victor Lazzarini  wrote:
> You should be free to call this at any point. We did extensive work to recover memory from dead instances and
> this could be a bug resulting from it. If we had a test code then we could debug.
> ========================
> 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 2 Jun 2015, at 14:21, Rory Walsh  wrote:
> >
> > I'm having some intermittent crashes with csoundCompileCsd(). What are the normal procedures for using this after a performance has already started? When I simply call compiledCsd() it runs most of the time, but every so often I get a crash(backtrace given below). The reason I started using compileCsd() was so I could avoid calling csoundReset() between updates. But is there something else I should be doing to free up memory before I recompile?
> >
> > 0  0x00007ffff67fc761  mfree  /home/rory/sourcecode/cabbageaudio/csound/Engine/memalloc.c  164
> > 1  0x00007ffff6a3dd71  free_instrtxt  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  888
> > 2  0x00007ffff6a3e00b  add_to_deadpool  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  937
> > 3  0x00007ffff6a3eb53  insert_instrtxt  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1151
> > 4  0x00007ffff6a3f266  engineState_merge  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1296
> > 5  0x00007ffff6a401b1  csoundCompileTree  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1612
> > 6  0x00007ffff6a406d7  csoundCompileOrc  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1698
> > 7  0x00007ffff695f233  csoundCompileCsd  /home/rory/sourcecode/cabbageaudio/csound/Top/main.c  505
> > 8  0x00000000004fcb53  Csound::CompileCsd  /usr/local/include/csound/csound.hpp  264
> >
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound

Date2015-06-02 16:12
FromRory Walsh
SubjectRe: [Cs-dev] csoundCompileCsd()
AttachmentsNone  None  
Thanks Victor.

On 2 June 2015 at 16:04, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Thanks; there is definitely a bug and it is to do with “named” instruments. It appears that if you use
numbers only, it is OK.
I’ll try to get to the bottom of 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 2 Jun 2015, at 15:27, Rory Walsh <rorywalsh@ear.ie> wrote:
>
> As promised. You'll notice that at some point there is a problem with the f0 statement in the score. But taking that out results in a segfault.
>
> On 2 June 2015 at 15:02, Rory Walsh <rorywalsh@ear.ie> wrote:
> I'll see if I can throw something together.
>
> On 2 June 2015 at 14:33, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
> You should be free to call this at any point. We did extensive work to recover memory from dead instances and
> this could be a bug resulting from it. If we had a test code then we could debug.
> ========================
> 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 2 Jun 2015, at 14:21, Rory Walsh <rorywalsh@ear.ie> wrote:
> >
> > I'm having some intermittent crashes with csoundCompileCsd(). What are the normal procedures for using this after a performance has already started? When I simply call compiledCsd() it runs most of the time, but every so often I get a crash(backtrace given below). The reason I started using compileCsd() was so I could avoid calling csoundReset() between updates. But is there something else I should be doing to free up memory before I recompile?
> >
> > 0  0x00007ffff67fc761  mfree  /home/rory/sourcecode/cabbageaudio/csound/Engine/memalloc.c  164
> > 1  0x00007ffff6a3dd71  free_instrtxt  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  888
> > 2  0x00007ffff6a3e00b  add_to_deadpool  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  937
> > 3  0x00007ffff6a3eb53  insert_instrtxt  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1151
> > 4  0x00007ffff6a3f266  engineState_merge  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1296
> > 5  0x00007ffff6a401b1  csoundCompileTree  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1612
> > 6  0x00007ffff6a406d7  csoundCompileOrc  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1698
> > 7  0x00007ffff695f233  csoundCompileCsd  /home/rory/sourcecode/cabbageaudio/csound/Top/main.c  505
> > 8  0x00000000004fcb53  Csound::CompileCsd  /usr/local/include/csound/csound.hpp  264
> >
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> <compileCSD.cpp><test.csd>------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2015-06-02 21:42
FromVictor Lazzarini
SubjectRe: [Cs-dev] csoundCompileCsd()
Ok, I think I’ve stabilised this situation and named instruments are not crashing on
recompilation (at least they pass your test). I need to go back and assess the 
situation a little more, because I want to check that we are recovering as much
memory as possible. But for now, the code in GIT should work.

========================
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 2 Jun 2015, at 16:12, Rory Walsh  wrote:
> 
> Thanks Victor.
> 
> On 2 June 2015 at 16:04, Victor Lazzarini  wrote:
> Thanks; there is definitely a bug and it is to do with “named” instruments. It appears that if you use
> numbers only, it is OK.
> I’ll try to get to the bottom of 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 2 Jun 2015, at 15:27, Rory Walsh  wrote:
> >
> > As promised. You'll notice that at some point there is a problem with the f0 statement in the score. But taking that out results in a segfault.
> >
> > On 2 June 2015 at 15:02, Rory Walsh  wrote:
> > I'll see if I can throw something together.
> >
> > On 2 June 2015 at 14:33, Victor Lazzarini  wrote:
> > You should be free to call this at any point. We did extensive work to recover memory from dead instances and
> > this could be a bug resulting from it. If we had a test code then we could debug.
> > ========================
> > 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 2 Jun 2015, at 14:21, Rory Walsh  wrote:
> > >
> > > I'm having some intermittent crashes with csoundCompileCsd(). What are the normal procedures for using this after a performance has already started? When I simply call compiledCsd() it runs most of the time, but every so often I get a crash(backtrace given below). The reason I started using compileCsd() was so I could avoid calling csoundReset() between updates. But is there something else I should be doing to free up memory before I recompile?
> > >
> > > 0  0x00007ffff67fc761  mfree  /home/rory/sourcecode/cabbageaudio/csound/Engine/memalloc.c  164
> > > 1  0x00007ffff6a3dd71  free_instrtxt  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  888
> > > 2  0x00007ffff6a3e00b  add_to_deadpool  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  937
> > > 3  0x00007ffff6a3eb53  insert_instrtxt  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1151
> > > 4  0x00007ffff6a3f266  engineState_merge  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1296
> > > 5  0x00007ffff6a401b1  csoundCompileTree  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1612
> > > 6  0x00007ffff6a406d7  csoundCompileOrc  /home/rory/sourcecode/cabbageaudio/csound/Engine/csound_orc_compile.c  1698
> > > 7  0x00007ffff695f233  csoundCompileCsd  /home/rory/sourcecode/cabbageaudio/csound/Top/main.c  505
> > > 8  0x00000000004fcb53  Csound::CompileCsd  /usr/local/include/csound/csound.hpp  264
> > >
> > > ------------------------------------------------------------------------------
> > > _______________________________________________
> > > Csound-devel mailing list
> > > Csound-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/csound-devel
> >
> >
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> >
> >
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists