Csound Csound-dev Csound-tekno Search About

[Cs-dev] make test faiure

Date2014-07-29 15:52
Fromjohn ffitch
Subject[Cs-dev] make test faiure
      Start  7: testIo
 7/11 Test  #7: testIo ...........................***Failed    1.64 sec

Seems to seg fault on ending, deallcating

#4  0x00007fffedde2936 in std::map >, std::less, std::allocator > > > >::operator[] (
    this=0x7fffedfe89e0 , __k=@0x7fffffffdd58: 0xae4a70)
    at /usr/include/c++/4.8/bits/stl_map.h:469
#5  0x00007fffedde0ed2 in csoundModuleDestroy (csound=0xae4a70)
    at /home/jpff/Sourceforge/csound/New/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp:799
#6  0x000000000040e205 in csoundDestroyModules (csound=csound@entry=0xae4a70)
    at /home/jpff/Sourceforge/csound/New/csound6/Top/csmodule.c:648

==John ffitch

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-07-29 15:58
FromSteven Yi
SubjectRe: [Cs-dev] make test faiure
I can confirm getting the same error on OSX (backtrace below).  I
think it's not related to recent changes, but rather is just the fluid
opcodes are not reentrant.  If I remember correctly, there was similar
code in another set of opcodes that I had to modify to store "global"
references in csound's global vars map, rather than using a static
global C++ std::map.  That same change probably needs to happen here.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000021
0x0000000100c7fbc4 in std::less::operator() ()
(gdb) bt
#0  0x0000000100c7fbc4 in std::less::operator() ()
#1  0x0000000100c814c8 in std::_Rb_tree >
>, std::_Select1st > > >,
std::less, std::allocator > > >
>::lower_bound ()
#2  0x0000000100c7fb1d in std::map >,
std::less, std::allocator > > >
>::lower_bound ()
#3  0x0000000100c7f6fb in std::map >,
std::less, std::allocator > > >
>::operator[] ()
#4  0x0000000100c7f57d in csoundModuleDestroy ()
#5  0x000000010018c409 in csoundDestroyModules ()
#6  0x000000010018defb in reset ()
#7  0x000000010018ddd5 in csoundDestroy ()
#8  0x000000010018cc5a in destroy_all_instances ()
#9  0x00007fff959d1794 in __cxa_finalize ()
#10 0x00007fff959d1a4c in exit ()
#11 0x0000000100001bfb in start ()

On Tue, Jul 29, 2014 at 10:52 AM, john ffitch  wrote:
>       Start  7: testIo
>  7/11 Test  #7: testIo ...........................***Failed    1.64 sec
>
> Seems to seg fault on ending, deallcating
>
> #4  0x00007fffedde2936 in std::map >, std::less, std::allocator > > > >::operator[] (
>     this=0x7fffedfe89e0 , __k=@0x7fffffffdd58: 0xae4a70)
>     at /usr/include/c++/4.8/bits/stl_map.h:469
> #5  0x00007fffedde0ed2 in csoundModuleDestroy (csound=0xae4a70)
>     at /home/jpff/Sourceforge/csound/New/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp:799
> #6  0x000000000040e205 in csoundDestroyModules (csound=csound@entry=0xae4a70)
>     at /home/jpff/Sourceforge/csound/New/csound6/Top/csmodule.c:648
>
> ==John ffitch
>
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-07-29 16:37
FromSteven Yi
SubjectRe: [Cs-dev] make test faiure
I took a look and I think the code was mostly fine, though I added a
removal of csound entries in that global map.  That's gotten testIO to
work here. (commit pushed)

One weird thing that popped up though: I had a breakpoint on
csoundModuleInit.  When I ran testIO, it caused csoundModuleInit to be
run multiple times per test.  It happened on csoundCreate (which calls
csoundReset), csoundSetRTAudioModule, csoundReset, and csoundStart.
csoundStart uses csound->modules_loaded, but the other code paths do
not.

Victor: Does this sound familiar to you?  I saw comments with your
name there in the code.  Seems like we need to update so that
csoundInitModules is only done once?

On Tue, Jul 29, 2014 at 10:58 AM, Steven Yi  wrote:
> I can confirm getting the same error on OSX (backtrace below).  I
> think it's not related to recent changes, but rather is just the fluid
> opcodes are not reentrant.  If I remember correctly, there was similar
> code in another set of opcodes that I had to modify to store "global"
> references in csound's global vars map, rather than using a static
> global C++ std::map.  That same change probably needs to happen here.
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000021
> 0x0000000100c7fbc4 in std::less::operator() ()
> (gdb) bt
> #0  0x0000000100c7fbc4 in std::less::operator() ()
> #1  0x0000000100c814c8 in std::_Rb_tree const, std::vector<_fluid_synth_t*, std::allocator<_fluid_synth_t*> >
>>, std::_Select1st std::vector<_fluid_synth_t*, std::allocator<_fluid_synth_t*> > > >,
> std::less, std::allocator std::vector<_fluid_synth_t*, std::allocator<_fluid_synth_t*> > > >
>>::lower_bound ()
> #2  0x0000000100c7fb1d in std::map std::vector<_fluid_synth_t*, std::allocator<_fluid_synth_t*> >,
> std::less, std::allocator std::vector<_fluid_synth_t*, std::allocator<_fluid_synth_t*> > > >
>>::lower_bound ()
> #3  0x0000000100c7f6fb in std::map std::vector<_fluid_synth_t*, std::allocator<_fluid_synth_t*> >,
> std::less, std::allocator std::vector<_fluid_synth_t*, std::allocator<_fluid_synth_t*> > > >
>>::operator[] ()
> #4  0x0000000100c7f57d in csoundModuleDestroy ()
> #5  0x000000010018c409 in csoundDestroyModules ()
> #6  0x000000010018defb in reset ()
> #7  0x000000010018ddd5 in csoundDestroy ()
> #8  0x000000010018cc5a in destroy_all_instances ()
> #9  0x00007fff959d1794 in __cxa_finalize ()
> #10 0x00007fff959d1a4c in exit ()
> #11 0x0000000100001bfb in start ()
>
> On Tue, Jul 29, 2014 at 10:52 AM, john ffitch  wrote:
>>       Start  7: testIo
>>  7/11 Test  #7: testIo ...........................***Failed    1.64 sec
>>
>> Seems to seg fault on ending, deallcating
>>
>> #4  0x00007fffedde2936 in std::map >, std::less, std::allocator > > > >::operator[] (
>>     this=0x7fffedfe89e0 , __k=@0x7fffffffdd58: 0xae4a70)
>>     at /usr/include/c++/4.8/bits/stl_map.h:469
>> #5  0x00007fffedde0ed2 in csoundModuleDestroy (csound=0xae4a70)
>>     at /home/jpff/Sourceforge/csound/New/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp:799
>> #6  0x000000000040e205 in csoundDestroyModules (csound=csound@entry=0xae4a70)
>>     at /home/jpff/Sourceforge/csound/New/csound6/Top/csmodule.c:648
>>
>> ==John ffitch
>>
>> ------------------------------------------------------------------------------
>> Infragistics Professional
>> Build stunning WinForms apps today!
>> Reboot your WinForms applications with our WinForms controls.
>> Build a bridge from your legacy apps to the future.
>> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-07-29 20:10
FromVictor Lazzarini
SubjectRe: [Cs-dev] make test faiure
Not sure, but it should be run only once, maybe we need to add a test to prevent it.
========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 29 Jul 2014, at 16:37, Steven Yi  wrote:

> I took a look and I think the code was mostly fine, though I added a
> removal of csound entries in that global map.  That's gotten testIO to
> work here. (commit pushed)
> 
> One weird thing that popped up though: I had a breakpoint on
> csoundModuleInit.  When I ran testIO, it caused csoundModuleInit to be
> run multiple times per test.  It happened on csoundCreate (which calls
> csoundReset), csoundSetRTAudioModule, csoundReset, and csoundStart.
> csoundStart uses csound->modules_loaded, but the other code paths do
> not.
> 
> Victor: Does this sound familiar to you?  I saw comments with your
> name there in the code.  Seems like we need to update so that
> csoundInitModules is only done once?
> 
> On Tue, Jul 29, 2014 at 10:58 AM, Steven Yi  wrote:
>> I can confirm getting the same error on OSX (backtrace below).  I
>> think it's not related to recent changes, but rather is just the fluid
>> opcodes are not reentrant.  If I remember correctly, there was similar
>> code in another set of opcodes that I had to modify to store "global"
>> references in csound's global vars map, rather than using a static
>> global C++ std::map.  That same change probably needs to happen here.
>> 
>> Program received signal EXC_BAD_ACCESS, Could not access memory.
>> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000021
>> 0x0000000100c7fbc4 in std::less::operator() ()
>> (gdb) bt
>> #0  0x0000000100c7fbc4 in std::less::operator() ()
>> #1  0x0000000100c814c8 in std::_Rb_tree> const, std::vector<_fluid_synth_t*, std::allocator<_fluid_synth_t*> >
>>> , std::_Select1st> std::vector<_fluid_synth_t*, std::allocator<_fluid_synth_t*> > > >,
>> std::less, std::allocator> std::vector<_fluid_synth_t*, std::allocator<_fluid_synth_t*> > > >
>>> ::lower_bound ()
>> #2  0x0000000100c7fb1d in std::map> std::vector<_fluid_synth_t*, std::allocator<_fluid_synth_t*> >,
>> std::less, std::allocator> std::vector<_fluid_synth_t*, std::allocator<_fluid_synth_t*> > > >
>>> ::lower_bound ()
>> #3  0x0000000100c7f6fb in std::map> std::vector<_fluid_synth_t*, std::allocator<_fluid_synth_t*> >,
>> std::less, std::allocator> std::vector<_fluid_synth_t*, std::allocator<_fluid_synth_t*> > > >
>>> ::operator[] ()
>> #4  0x0000000100c7f57d in csoundModuleDestroy ()
>> #5  0x000000010018c409 in csoundDestroyModules ()
>> #6  0x000000010018defb in reset ()
>> #7  0x000000010018ddd5 in csoundDestroy ()
>> #8  0x000000010018cc5a in destroy_all_instances ()
>> #9  0x00007fff959d1794 in __cxa_finalize ()
>> #10 0x00007fff959d1a4c in exit ()
>> #11 0x0000000100001bfb in start ()
>> 
>> On Tue, Jul 29, 2014 at 10:52 AM, john ffitch  wrote:
>>>      Start  7: testIo
>>> 7/11 Test  #7: testIo ...........................***Failed    1.64 sec
>>> 
>>> Seems to seg fault on ending, deallcating
>>> 
>>> #4  0x00007fffedde2936 in std::map >, std::less, std::allocator > > > >::operator[] (
>>>    this=0x7fffedfe89e0 , __k=@0x7fffffffdd58: 0xae4a70)
>>>    at /usr/include/c++/4.8/bits/stl_map.h:469
>>> #5  0x00007fffedde0ed2 in csoundModuleDestroy (csound=0xae4a70)
>>>    at /home/jpff/Sourceforge/csound/New/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp:799
>>> #6  0x000000000040e205 in csoundDestroyModules (csound=csound@entry=0xae4a70)
>>>    at /home/jpff/Sourceforge/csound/New/csound6/Top/csmodule.c:648
>>> 
>>> ==John ffitch
>>> 
>>> ------------------------------------------------------------------------------
>>> Infragistics Professional
>>> Build stunning WinForms apps today!
>>> Reboot your WinForms applications with our WinForms controls.
>>> Build a bridge from your legacy apps to the future.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls. 
> Build a bridge from your legacy apps to the future.
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net