Csound Csound-dev Csound-tekno Search About

[Csnd-dev] stack smashing error?

Date2016-12-26 16:57
FromDave Seidel
Subject[Csnd-dev] stack smashing error?
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?

Date2016-12-26 17:01
FromDave Seidel
SubjectRe: [Csnd-dev] stack smashing error?
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?


Date2016-12-26 17:05
FromDave Seidel
SubjectRe: [Csnd-dev] stack smashing error?
I've been using this CSD for about three years now without seeing this. What's new now is that I'm writing a new Python wrapper for this CSD to replace the shell script I've been using (this is in the same repo as the CSD). So I'm guessing it has something to do with the command line? 

On Mon, Dec 26, 2016 at 12:01 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?



Date2016-12-26 17:07
FromJustin Smith
SubjectRe: [Csnd-dev] stack smashing error?
I would think a stack error would be related to the stack opcodes
but your csd isn't using any version of push or pop (at least not directly)

On Mon, Dec 26, 2016 at 9:02 AM Dave Seidel <dave.seidel@gmail.com> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?


Date2016-12-26 17:09
FromJohn ff
SubjectRe: [Csnd-dev] stack smashing error?
Suggests overwriting somewhere.
Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?


Date2016-12-26 17:10
FromDave Seidel
SubjectRe: [Csnd-dev] stack smashing error?
I found this: http://stackoverflow.com/questions/1345670/stack-smashing-detected

which indicates a buffer overrun of some sort

On Mon, Dec 26, 2016 at 12:07 PM, Justin Smith <noisesmith@gmail.com> wrote:
I would think a stack error would be related to the stack opcodes
but your csd isn't using any version of push or pop (at least not directly)

On Mon, Dec 26, 2016 at 9:02 AM Dave Seidel <dave.seidel@gmail.com> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?



Date2016-12-26 17:12
FromDave Seidel
SubjectRe: [Csnd-dev] stack smashing error?
I will try. Have never installed or used valgrind before (just never had the need, since I stopped working with C/C++ before I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff <jpff@codemist.co.uk> wrote:
Suggests overwriting somewhere.
Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?



Date2016-12-26 17:15
FromDave Seidel
SubjectRe: [Csnd-dev] stack smashing error?
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ valgrind csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==22822== Memcheck, a memory error detector
==22822== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==22822== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==22822== Command: csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==22822== 
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Last block truncated in .debug_info; ignoring
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==22822== Invalid read of size 8
==22822==    at 0xE88F356: operator==(LuaStateForThread const&, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893AC5: bool __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>::operator()<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892D9C: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>, std::random_access_iterator_tag) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891F88: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE8910E0: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::find<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread>(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F444: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==  Address 0xbdbf580 is 0 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== Invalid read of size 8
==22822==    at 0xE88F546: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Address 0xbdbf588 is 8 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== 
==22822== HEAP SUMMARY:
==22822==     in use at exit: 132,013 bytes in 110 blocks
==22822==   total heap usage: 19,966 allocs, 19,856 frees, 2,094,418 bytes allocated
==22822== 
==22822== LEAK SUMMARY:
==22822==    definitely lost: 136 bytes in 5 blocks
==22822==    indirectly lost: 12 bytes in 1 blocks
==22822==      possibly lost: 0 bytes in 0 blocks
==22822==    still reachable: 131,865 bytes in 104 blocks
==22822==         suppressed: 0 bytes in 0 blocks
==22822== Rerun with --leak-check=full to see details of leaked memory
==22822== 
==22822== For counts of detected and suppressed errors, rerun with: -v
==22822== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will try. Have never installed or used valgrind before (just never had the need, since I stopped working with C/C++ before I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff <jpff@codemist.co.uk> wrote:
Suggests overwriting somewhere.
Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?




Date2016-12-26 17:17
FromDave Seidel
SubjectRe: [Csnd-dev] stack smashing error?
I see a lot of Lua references. I have lua/luajit, and Csound is built with that options, but I am not using Lua at all in this CSD (and in fact have never used it to date) 

On Mon, Dec 26, 2016 at 12:15 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ valgrind csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==22822== Memcheck, a memory error detector
==22822== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==22822== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==22822== Command: csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==22822== 
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Last block truncated in .debug_info; ignoring
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==22822== Invalid read of size 8
==22822==    at 0xE88F356: operator==(LuaStateForThread const&, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893AC5: bool __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>::operator()<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892D9C: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>, std::random_access_iterator_tag) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891F88: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE8910E0: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::find<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread>(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F444: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==  Address 0xbdbf580 is 0 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== Invalid read of size 8
==22822==    at 0xE88F546: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Address 0xbdbf588 is 8 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== 
==22822== HEAP SUMMARY:
==22822==     in use at exit: 132,013 bytes in 110 blocks
==22822==   total heap usage: 19,966 allocs, 19,856 frees, 2,094,418 bytes allocated
==22822== 
==22822== LEAK SUMMARY:
==22822==    definitely lost: 136 bytes in 5 blocks
==22822==    indirectly lost: 12 bytes in 1 blocks
==22822==      possibly lost: 0 bytes in 0 blocks
==22822==    still reachable: 131,865 bytes in 104 blocks
==22822==         suppressed: 0 bytes in 0 blocks
==22822== Rerun with --leak-check=full to see details of leaked memory
==22822== 
==22822== For counts of detected and suppressed errors, rerun with: -v
==22822== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will try. Have never installed or used valgrind before (just never had the need, since I stopped working with C/C++ before I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff <jpff@codemist.co.uk> wrote:
Suggests overwriting somewhere.
Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?





Date2016-12-26 17:18
FromVictor Lazzarini
SubjectRe: [Csnd-dev] stack smashing error?
Looks like a stack overflow. It would be useful to know which opcode. You could try 
commenting out some lines to see which
one offends.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:13, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I will try. Have never installed or used valgrind before (just never had the need, since I stopped working with C/C++ before I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff <jpff@codemist.co.uk> wrote:
Suggests overwriting somewhere.
Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?



Date2016-12-26 17:22
FromVictor Lazzarini
SubjectRe: [Csnd-dev] stack smashing error?
Well, these are pointing to module destruction, so it is just Csound loading/unloading these opcode libs.
Could you try deleting the libluaCsound.so etc files and running again?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:18, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I see a lot of Lua references. I have lua/luajit, and Csound is built with that options, but I am not using Lua at all in this CSD (and in fact have never used it to date) 

On Mon, Dec 26, 2016 at 12:15 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ valgrind csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==22822== Memcheck, a memory error detector
==22822== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==22822== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==22822== Command: csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==22822== 
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Last block truncated in .debug_info; ignoring
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==22822== Invalid read of size 8
==22822==    at 0xE88F356: operator==(LuaStateForThread const&, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893AC5: bool __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>::operator()<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892D9C: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>, std::random_access_iterator_tag) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891F88: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE8910E0: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::find<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread>(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F444: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==  Address 0xbdbf580 is 0 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== Invalid read of size 8
==22822==    at 0xE88F546: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Address 0xbdbf588 is 8 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== 
==22822== HEAP SUMMARY:
==22822==     in use at exit: 132,013 bytes in 110 blocks
==22822==   total heap usage: 19,966 allocs, 19,856 frees, 2,094,418 bytes allocated
==22822== 
==22822== LEAK SUMMARY:
==22822==    definitely lost: 136 bytes in 5 blocks
==22822==    indirectly lost: 12 bytes in 1 blocks
==22822==      possibly lost: 0 bytes in 0 blocks
==22822==    still reachable: 131,865 bytes in 104 blocks
==22822==         suppressed: 0 bytes in 0 blocks
==22822== Rerun with --leak-check=full to see details of leaked memory
==22822== 
==22822== For counts of detected and suppressed errors, rerun with: -v
==22822== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will try. Have never installed or used valgrind before (just never had the need, since I stopped working with C/C++ before I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff <jpff@codemist.co.uk> wrote:
Suggests overwriting somewhere.
Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?





Date2016-12-26 17:24
FromDave Seidel
SubjectRe: [Csnd-dev] stack smashing error?
I will do that. In the meantime, if I comment out everything in instr 1 except the following, the error still recurs:

  Soutfile getcfg 3
  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse response file: $IRFILE%noutput file: "
  prints Soutfile
  prints "%n==========%n%n"

and if I comment that code out as well, there is no error.

On Mon, Dec 26, 2016 at 12:22 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Well, these are pointing to module destruction, so it is just Csound loading/unloading these opcode libs.
Could you try deleting the libluaCsound.so etc files and running again?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:18, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I see a lot of Lua references. I have lua/luajit, and Csound is built with that options, but I am not using Lua at all in this CSD (and in fact have never used it to date) 

On Mon, Dec 26, 2016 at 12:15 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ valgrind csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==22822== Memcheck, a memory error detector
==22822== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==22822== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==22822== Command: csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==22822== 
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Last block truncated in .debug_info; ignoring
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==22822== Invalid read of size 8
==22822==    at 0xE88F356: operator==(LuaStateForThread const&, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893AC5: bool __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>::operator()<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892D9C: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>, std::random_access_iterator_tag) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891F88: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE8910E0: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::find<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread>(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F444: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==  Address 0xbdbf580 is 0 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== Invalid read of size 8
==22822==    at 0xE88F546: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Address 0xbdbf588 is 8 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== 
==22822== HEAP SUMMARY:
==22822==     in use at exit: 132,013 bytes in 110 blocks
==22822==   total heap usage: 19,966 allocs, 19,856 frees, 2,094,418 bytes allocated
==22822== 
==22822== LEAK SUMMARY:
==22822==    definitely lost: 136 bytes in 5 blocks
==22822==    indirectly lost: 12 bytes in 1 blocks
==22822==      possibly lost: 0 bytes in 0 blocks
==22822==    still reachable: 131,865 bytes in 104 blocks
==22822==         suppressed: 0 bytes in 0 blocks
==22822== Rerun with --leak-check=full to see details of leaked memory
==22822== 
==22822== For counts of detected and suppressed errors, rerun with: -v
==22822== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will try. Have never installed or used valgrind before (just never had the need, since I stopped working with C/C++ before I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff <jpff@codemist.co.uk> wrote:
Suggests overwriting somewhere.
Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?






Date2016-12-26 17:27
FromDave Seidel
SubjectRe: [Csnd-dev] stack smashing error?
I have narrowed it done to this single line of code:

  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse response file: $IRFILE%noutput file: "


On Mon, Dec 26, 2016 at 12:24 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will do that. In the meantime, if I comment out everything in instr 1 except the following, the error still recurs:

  Soutfile getcfg 3
  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse response file: $IRFILE%noutput file: "
  prints Soutfile
  prints "%n==========%n%n"

and if I comment that code out as well, there is no error.

On Mon, Dec 26, 2016 at 12:22 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Well, these are pointing to module destruction, so it is just Csound loading/unloading these opcode libs.
Could you try deleting the libluaCsound.so etc files and running again?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:18, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I see a lot of Lua references. I have lua/luajit, and Csound is built with that options, but I am not using Lua at all in this CSD (and in fact have never used it to date) 

On Mon, Dec 26, 2016 at 12:15 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ valgrind csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==22822== Memcheck, a memory error detector
==22822== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==22822== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==22822== Command: csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==22822== 
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Last block truncated in .debug_info; ignoring
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==22822== Invalid read of size 8
==22822==    at 0xE88F356: operator==(LuaStateForThread const&, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893AC5: bool __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>::operator()<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892D9C: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>, std::random_access_iterator_tag) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891F88: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE8910E0: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::find<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread>(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F444: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==  Address 0xbdbf580 is 0 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== Invalid read of size 8
==22822==    at 0xE88F546: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Address 0xbdbf588 is 8 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== 
==22822== HEAP SUMMARY:
==22822==     in use at exit: 132,013 bytes in 110 blocks
==22822==   total heap usage: 19,966 allocs, 19,856 frees, 2,094,418 bytes allocated
==22822== 
==22822== LEAK SUMMARY:
==22822==    definitely lost: 136 bytes in 5 blocks
==22822==    indirectly lost: 12 bytes in 1 blocks
==22822==      possibly lost: 0 bytes in 0 blocks
==22822==    still reachable: 131,865 bytes in 104 blocks
==22822==         suppressed: 0 bytes in 0 blocks
==22822== Rerun with --leak-check=full to see details of leaked memory
==22822== 
==22822== For counts of detected and suppressed errors, rerun with: -v
==22822== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will try. Have never installed or used valgrind before (just never had the need, since I stopped working with C/C++ before I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff <jpff@codemist.co.uk> wrote:
Suggests overwriting somewhere.
Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?







Date2016-12-26 17:28
FromVictor Lazzarini
SubjectRe: [Csnd-dev] stack smashing error?
What happens if you comment only the
prints lines?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:25, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I will do that. In the meantime, if I comment out everything in instr 1 except the following, the error still recurs:

  Soutfile getcfg 3
  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse response file: $IRFILE%noutput file: "
  prints Soutfile
  prints "%n==========%n%n"

and if I comment that code out as well, there is no error.

On Mon, Dec 26, 2016 at 12:22 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Well, these are pointing to module destruction, so it is just Csound loading/unloading these opcode libs.
Could you try deleting the libluaCsound.so etc files and running again?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:18, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I see a lot of Lua references. I have lua/luajit, and Csound is built with that options, but I am not using Lua at all in this CSD (and in fact have never used it to date) 

On Mon, Dec 26, 2016 at 12:15 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ valgrind csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==22822== Memcheck, a memory error detector
==22822== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==22822== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==22822== Command: csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==22822== 
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Last block truncated in .debug_info; ignoring
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==22822== Invalid read of size 8
==22822==    at 0xE88F356: operator==(LuaStateForThread const&, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893AC5: bool __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>::operator()<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892D9C: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>, std::random_access_iterator_tag) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891F88: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE8910E0: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::find<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread>(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F444: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==  Address 0xbdbf580 is 0 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== Invalid read of size 8
==22822==    at 0xE88F546: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Address 0xbdbf588 is 8 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== 
==22822== HEAP SUMMARY:
==22822==     in use at exit: 132,013 bytes in 110 blocks
==22822==   total heap usage: 19,966 allocs, 19,856 frees, 2,094,418 bytes allocated
==22822== 
==22822== LEAK SUMMARY:
==22822==    definitely lost: 136 bytes in 5 blocks
==22822==    indirectly lost: 12 bytes in 1 blocks
==22822==      possibly lost: 0 bytes in 0 blocks
==22822==    still reachable: 131,865 bytes in 104 blocks
==22822==         suppressed: 0 bytes in 0 blocks
==22822== Rerun with --leak-check=full to see details of leaked memory
==22822== 
==22822== For counts of detected and suppressed errors, rerun with: -v
==22822== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will try. Have never installed or used valgrind before (just never had the need, since I stopped working with C/C++ before I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff <jpff@codemist.co.uk> wrote:
Suggests overwriting somewhere.
Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?






Date2016-12-26 17:31
FromDave Seidel
SubjectRe: [Csnd-dev] stack smashing error?
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ valgrind csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==23572== Memcheck, a memory error detector
==23572== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==23572== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==23572== Command: csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==23572== 
--23572-- WARNING: Serious error when reading debug info
--23572-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--23572-- Ignoring non-Dwarf2/3/4 block in .debug_info
--23572-- WARNING: Serious error when reading debug info
--23572-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--23572-- Last block truncated in .debug_info; ignoring
--23572-- WARNING: Serious error when reading debug info
--23572-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--23572-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==23572== 
==23572== HEAP SUMMARY:
==23572==     in use at exit: 131,713 bytes in 110 blocks
==23572==   total heap usage: 19,851 allocs, 19,741 frees, 2,082,715 bytes allocated
==23572== 
==23572== LEAK SUMMARY:
==23572==    definitely lost: 136 bytes in 5 blocks
==23572==    indirectly lost: 12 bytes in 1 blocks
==23572==      possibly lost: 0 bytes in 0 blocks
==23572==    still reachable: 131,565 bytes in 104 blocks
==23572==         suppressed: 0 bytes in 0 blocks
==23572== Rerun with --leak-check=full to see details of leaked memory
==23572== 
==23572== For counts of detected and suppressed errors, rerun with: -v
==23572== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:28 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
What happens if you comment only the
prints lines?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:25, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I will do that. In the meantime, if I comment out everything in instr 1 except the following, the error still recurs:

  Soutfile getcfg 3
  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse response file: $IRFILE%noutput file: "
  prints Soutfile
  prints "%n==========%n%n"

and if I comment that code out as well, there is no error.

On Mon, Dec 26, 2016 at 12:22 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Well, these are pointing to module destruction, so it is just Csound loading/unloading these opcode libs.
Could you try deleting the libluaCsound.so etc files and running again?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:18, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I see a lot of Lua references. I have lua/luajit, and Csound is built with that options, but I am not using Lua at all in this CSD (and in fact have never used it to date) 

On Mon, Dec 26, 2016 at 12:15 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ valgrind csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==22822== Memcheck, a memory error detector
==22822== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==22822== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==22822== Command: csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==22822== 
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Last block truncated in .debug_info; ignoring
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==22822== Invalid read of size 8
==22822==    at 0xE88F356: operator==(LuaStateForThread const&, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893AC5: bool __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>::operator()<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892D9C: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>, std::random_access_iterator_tag) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891F88: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE8910E0: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::find<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread>(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F444: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==  Address 0xbdbf580 is 0 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== Invalid read of size 8
==22822==    at 0xE88F546: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Address 0xbdbf588 is 8 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== 
==22822== HEAP SUMMARY:
==22822==     in use at exit: 132,013 bytes in 110 blocks
==22822==   total heap usage: 19,966 allocs, 19,856 frees, 2,094,418 bytes allocated
==22822== 
==22822== LEAK SUMMARY:
==22822==    definitely lost: 136 bytes in 5 blocks
==22822==    indirectly lost: 12 bytes in 1 blocks
==22822==      possibly lost: 0 bytes in 0 blocks
==22822==    still reachable: 131,865 bytes in 104 blocks
==22822==         suppressed: 0 bytes in 0 blocks
==22822== Rerun with --leak-check=full to see details of leaked memory
==22822== 
==22822== For counts of detected and suppressed errors, rerun with: -v
==22822== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will try. Have never installed or used valgrind before (just never had the need, since I stopped working with C/C++ before I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff <jpff@codemist.co.uk> wrote:
Suggests overwriting somewhere.
Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?







Date2016-12-26 17:32
FromVictor Lazzarini
SubjectRe: [Csnd-dev] stack smashing error?
Ok. Why do you use %n ? Maybe that is making prints expect a numeric arg.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:28, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I have narrowed it done to this single line of code:

  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse response file: $IRFILE%noutput file: "


On Mon, Dec 26, 2016 at 12:24 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will do that. In the meantime, if I comment out everything in instr 1 except the following, the error still recurs:

  Soutfile getcfg 3
  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse response file: $IRFILE%noutput file: "
  prints Soutfile
  prints "%n==========%n%n"

and if I comment that code out as well, there is no error.

On Mon, Dec 26, 2016 at 12:22 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Well, these are pointing to module destruction, so it is just Csound loading/unloading these opcode libs.
Could you try deleting the libluaCsound.so etc files and running again?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:18, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I see a lot of Lua references. I have lua/luajit, and Csound is built with that options, but I am not using Lua at all in this CSD (and in fact have never used it to date) 

On Mon, Dec 26, 2016 at 12:15 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ valgrind csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==22822== Memcheck, a memory error detector
==22822== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==22822== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==22822== Command: csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==22822== 
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Last block truncated in .debug_info; ignoring
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==22822== Invalid read of size 8
==22822==    at 0xE88F356: operator==(LuaStateForThread const&, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893AC5: bool __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>::operator()<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892D9C: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>, std::random_access_iterator_tag) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891F88: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE8910E0: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::find<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread>(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F444: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==  Address 0xbdbf580 is 0 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== Invalid read of size 8
==22822==    at 0xE88F546: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Address 0xbdbf588 is 8 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== 
==22822== HEAP SUMMARY:
==22822==     in use at exit: 132,013 bytes in 110 blocks
==22822==   total heap usage: 19,966 allocs, 19,856 frees, 2,094,418 bytes allocated
==22822== 
==22822== LEAK SUMMARY:
==22822==    definitely lost: 136 bytes in 5 blocks
==22822==    indirectly lost: 12 bytes in 1 blocks
==22822==      possibly lost: 0 bytes in 0 blocks
==22822==    still reachable: 131,865 bytes in 104 blocks
==22822==         suppressed: 0 bytes in 0 blocks
==22822== Rerun with --leak-check=full to see details of leaked memory
==22822== 
==22822== For counts of detected and suppressed errors, rerun with: -v
==22822== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will try. Have never installed or used valgrind before (just never had the need, since I stopped working with C/C++ before I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff <jpff@codemist.co.uk> wrote:
Suggests overwriting somewhere.
Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?







Date2016-12-26 17:32
FromDave Seidel
SubjectRe: [Csnd-dev] stack smashing error?
If I comment out only the print statements, problem goes away.

On Mon, Dec 26, 2016 at 12:28 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
What happens if you comment only the
prints lines?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:25, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I will do that. In the meantime, if I comment out everything in instr 1 except the following, the error still recurs:

  Soutfile getcfg 3
  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse response file: $IRFILE%noutput file: "
  prints Soutfile
  prints "%n==========%n%n"

and if I comment that code out as well, there is no error.

On Mon, Dec 26, 2016 at 12:22 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Well, these are pointing to module destruction, so it is just Csound loading/unloading these opcode libs.
Could you try deleting the libluaCsound.so etc files and running again?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:18, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I see a lot of Lua references. I have lua/luajit, and Csound is built with that options, but I am not using Lua at all in this CSD (and in fact have never used it to date) 

On Mon, Dec 26, 2016 at 12:15 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ valgrind csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==22822== Memcheck, a memory error detector
==22822== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==22822== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==22822== Command: csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==22822== 
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Last block truncated in .debug_info; ignoring
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==22822== Invalid read of size 8
==22822==    at 0xE88F356: operator==(LuaStateForThread const&, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893AC5: bool __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>::operator()<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892D9C: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>, std::random_access_iterator_tag) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891F88: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE8910E0: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::find<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread>(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F444: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==  Address 0xbdbf580 is 0 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== Invalid read of size 8
==22822==    at 0xE88F546: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Address 0xbdbf588 is 8 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== 
==22822== HEAP SUMMARY:
==22822==     in use at exit: 132,013 bytes in 110 blocks
==22822==   total heap usage: 19,966 allocs, 19,856 frees, 2,094,418 bytes allocated
==22822== 
==22822== LEAK SUMMARY:
==22822==    definitely lost: 136 bytes in 5 blocks
==22822==    indirectly lost: 12 bytes in 1 blocks
==22822==      possibly lost: 0 bytes in 0 blocks
==22822==    still reachable: 131,865 bytes in 104 blocks
==22822==         suppressed: 0 bytes in 0 blocks
==22822== Rerun with --leak-check=full to see details of leaked memory
==22822== 
==22822== For counts of detected and suppressed errors, rerun with: -v
==22822== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will try. Have never installed or used valgrind before (just never had the need, since I stopped working with C/C++ before I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff <jpff@codemist.co.uk> wrote:
Suggests overwriting somewhere.
Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?







Date2016-12-26 17:35
FromDave Seidel
SubjectRe: [Csnd-dev] stack smashing error?
Don't remember where I got that from, but I've been using %n in this script for 2-3 years without incident. Moreover, changing "%n" to "\n" makes no difference.

On Mon, Dec 26, 2016 at 12:32 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Ok. Why do you use %n ? Maybe that is making prints expect a numeric arg.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:28, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I have narrowed it done to this single line of code:

  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse response file: $IRFILE%noutput file: "


On Mon, Dec 26, 2016 at 12:24 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will do that. In the meantime, if I comment out everything in instr 1 except the following, the error still recurs:

  Soutfile getcfg 3
  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse response file: $IRFILE%noutput file: "
  prints Soutfile
  prints "%n==========%n%n"

and if I comment that code out as well, there is no error.

On Mon, Dec 26, 2016 at 12:22 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Well, these are pointing to module destruction, so it is just Csound loading/unloading these opcode libs.
Could you try deleting the libluaCsound.so etc files and running again?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:18, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I see a lot of Lua references. I have lua/luajit, and Csound is built with that options, but I am not using Lua at all in this CSD (and in fact have never used it to date) 

On Mon, Dec 26, 2016 at 12:15 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ valgrind csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==22822== Memcheck, a memory error detector
==22822== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==22822== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==22822== Command: csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==22822== 
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Last block truncated in .debug_info; ignoring
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==22822== Invalid read of size 8
==22822==    at 0xE88F356: operator==(LuaStateForThread const&, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893AC5: bool __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>::operator()<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892D9C: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>, std::random_access_iterator_tag) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891F88: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE8910E0: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::find<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread>(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F444: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==  Address 0xbdbf580 is 0 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== Invalid read of size 8
==22822==    at 0xE88F546: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Address 0xbdbf588 is 8 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== 
==22822== HEAP SUMMARY:
==22822==     in use at exit: 132,013 bytes in 110 blocks
==22822==   total heap usage: 19,966 allocs, 19,856 frees, 2,094,418 bytes allocated
==22822== 
==22822== LEAK SUMMARY:
==22822==    definitely lost: 136 bytes in 5 blocks
==22822==    indirectly lost: 12 bytes in 1 blocks
==22822==      possibly lost: 0 bytes in 0 blocks
==22822==    still reachable: 131,865 bytes in 104 blocks
==22822==         suppressed: 0 bytes in 0 blocks
==22822== Rerun with --leak-check=full to see details of leaked memory
==22822== 
==22822== For counts of detected and suppressed errors, rerun with: -v
==22822== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will try. Have never installed or used valgrind before (just never had the need, since I stopped working with C/C++ before I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff <jpff@codemist.co.uk> wrote:
Suggests overwriting somewhere.
Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?








Date2016-12-26 17:39
FromVictor Lazzarini
SubjectRe: [Csnd-dev] stack smashing error?
I had to lookup the C meaning of %n, as I
had never used it. It does not look like
it's a good thing to use it in this context.

What about the macros? I think it could
be that.


Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:35, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

Don't remember where I got that from, but I've been using %n in this script for 2-3 years without incident. Moreover, changing "%n" to "\n" makes no difference.

On Mon, Dec 26, 2016 at 12:32 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Ok. Why do you use %n ? Maybe that is making prints expect a numeric arg.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:28, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I have narrowed it done to this single line of code:

  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse response file: $IRFILE%noutput file: "


On Mon, Dec 26, 2016 at 12:24 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will do that. In the meantime, if I comment out everything in instr 1 except the following, the error still recurs:

  Soutfile getcfg 3
  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse response file: $IRFILE%noutput file: "
  prints Soutfile
  prints "%n==========%n%n"

and if I comment that code out as well, there is no error.

On Mon, Dec 26, 2016 at 12:22 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Well, these are pointing to module destruction, so it is just Csound loading/unloading these opcode libs.
Could you try deleting the libluaCsound.so etc files and running again?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:18, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I see a lot of Lua references. I have lua/luajit, and Csound is built with that options, but I am not using Lua at all in this CSD (and in fact have never used it to date) 

On Mon, Dec 26, 2016 at 12:15 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ valgrind csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==22822== Memcheck, a memory error detector
==22822== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==22822== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==22822== Command: csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==22822== 
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Last block truncated in .debug_info; ignoring
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==22822== Invalid read of size 8
==22822==    at 0xE88F356: operator==(LuaStateForThread const&, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893AC5: bool __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>::operator()<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892D9C: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>, std::random_access_iterator_tag) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891F88: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE8910E0: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::find<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread>(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F444: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==  Address 0xbdbf580 is 0 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== Invalid read of size 8
==22822==    at 0xE88F546: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Address 0xbdbf588 is 8 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== 
==22822== HEAP SUMMARY:
==22822==     in use at exit: 132,013 bytes in 110 blocks
==22822==   total heap usage: 19,966 allocs, 19,856 frees, 2,094,418 bytes allocated
==22822== 
==22822== LEAK SUMMARY:
==22822==    definitely lost: 136 bytes in 5 blocks
==22822==    indirectly lost: 12 bytes in 1 blocks
==22822==      possibly lost: 0 bytes in 0 blocks
==22822==    still reachable: 131,865 bytes in 104 blocks
==22822==         suppressed: 0 bytes in 0 blocks
==22822== Rerun with --leak-check=full to see details of leaked memory
==22822== 
==22822== For counts of detected and suppressed errors, rerun with: -v
==22822== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will try. Have never installed or used valgrind before (just never had the need, since I stopped working with C/C++ before I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff <jpff@codemist.co.uk> wrote:
Suggests overwriting somewhere.
Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?








Date2016-12-26 17:42
FromDave Seidel
SubjectRe: [Csnd-dev] stack smashing error?
Could be the macros, but they are apparently being used without problem elsewhere in the code. I don't have a problem removing the print lines and doing that in the wrapper script instead, but of course it would be good to understand the problem. As I said previously, changing %n to a normal escape sequence made no difference. 

On Mon, Dec 26, 2016 at 12:39 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
I had to lookup the C meaning of %n, as I
had never used it. It does not look like
it's a good thing to use it in this context.

What about the macros? I think it could
be that.


Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:35, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

Don't remember where I got that from, but I've been using %n in this script for 2-3 years without incident. Moreover, changing "%n" to "\n" makes no difference.

On Mon, Dec 26, 2016 at 12:32 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Ok. Why do you use %n ? Maybe that is making prints expect a numeric arg.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:28, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I have narrowed it done to this single line of code:

  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse response file: $IRFILE%noutput file: "


On Mon, Dec 26, 2016 at 12:24 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will do that. In the meantime, if I comment out everything in instr 1 except the following, the error still recurs:

  Soutfile getcfg 3
  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse response file: $IRFILE%noutput file: "
  prints Soutfile
  prints "%n==========%n%n"

and if I comment that code out as well, there is no error.

On Mon, Dec 26, 2016 at 12:22 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Well, these are pointing to module destruction, so it is just Csound loading/unloading these opcode libs.
Could you try deleting the libluaCsound.so etc files and running again?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:18, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

I see a lot of Lua references. I have lua/luajit, and Csound is built with that options, but I am not using Lua at all in this CSD (and in fact have never used it to date) 

On Mon, Dec 26, 2016 at 12:15 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ valgrind csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==22822== Memcheck, a memory error detector
==22822== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==22822== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==22822== Command: csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==22822== 
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Last block truncated in .debug_info; ignoring
--22822-- WARNING: Serious error when reading debug info
--22822-- When reading debug info from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==22822== Invalid read of size 8
==22822==    at 0xE88F356: operator==(LuaStateForThread const&, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893AC5: bool __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>::operator()<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892D9C: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>, std::random_access_iterator_tag) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891F88: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const> >(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread const>) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE8910E0: __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > > std::find<__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread>(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, __gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F444: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==  Address 0xbdbf580 is 0 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== Invalid read of size 8
==22822==    at 0xE88F546: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Address 0xbdbf588 is 8 bytes inside a block of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF: __gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::deallocate(std::allocator<LuaStateForThread>&, LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_deallocate(LuaStateForThread*, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::~_Vector_base() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::~vector() (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers (exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in /usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in /lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B: __gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned long, void const*) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7: __gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread> >::allocate(std::allocator<LuaStateForThread>&, unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5: std::_Vector_base<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_allocate(unsigned long) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*, std::vector<LuaStateForThread, std::allocator<LuaStateForThread> > >, LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C: std::vector<LuaStateForThread, std::allocator<LuaStateForThread> >::push_back(LuaStateForThread const&) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in /usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in /usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== 
==22822== HEAP SUMMARY:
==22822==     in use at exit: 132,013 bytes in 110 blocks
==22822==   total heap usage: 19,966 allocs, 19,856 frees, 2,094,418 bytes allocated
==22822== 
==22822== LEAK SUMMARY:
==22822==    definitely lost: 136 bytes in 5 blocks
==22822==    indirectly lost: 12 bytes in 1 blocks
==22822==      possibly lost: 0 bytes in 0 blocks
==22822==    still reachable: 131,865 bytes in 104 blocks
==22822==         suppressed: 0 bytes in 0 blocks
==22822== Rerun with --leak-check=full to see details of leaked memory
==22822== 
==22822== For counts of detected and suppressed errors, rerun with: -v
==22822== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
I will try. Have never installed or used valgrind before (just never had the need, since I stopped working with C/C++ before I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff <jpff@codemist.co.uk> wrote:
Suggests overwriting somewhere.
Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
command line I used:

csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"


On Mon, Dec 26, 2016 at 11:57 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
Using the develop branch. I just got a fatal error I never saw before:

*** stack smashing detected ***: csound terminated

what does this mean?









Date2016-12-26 18:17
Fromjpff
SubjectRe: [Csnd-dev] stack smashing error?
Looks as if valgrind is nt the coret tool.  Gdb and 2whee2 whe it crases 
might be better

%n in  writes the number of caracters writte to an int* argument which 
would give a major ovewrite, if it follows C rules.  I hae a suspicion it 
used to do \n in csound but this area of opodes is a monefield.

So run your command with "gdb --args" at te start, issue command "run" and 
we it stops use command "where"


On Mon, 26 Dec 2016, Dave Seidel wrote:

> I have narrowed it done to this single line of code:
>   prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse
> response file: $IRFILE%noutput file: "
> 
> 
> On Mon, Dec 26, 2016 at 12:24 PM, Dave Seidel  wrote:
>       I will do that. In the meantime, if I comment out everything in
>       instr 1 except the following, the error still recurs:
>   Soutfile getcfg 3
>   prints "%n==========%ninput file: $INFILE%ngain adjustment:
> $GAIN%nimpulse response file: $IRFILE%noutput file: "
>   prints Soutfile
>   prints "%n==========%n%n"
> 
> and if I comment that code out as well, there is no error.
> 
> On Mon, Dec 26, 2016 at 12:22 PM, Victor Lazzarini
>  wrote:
>       Well, these are pointing to module destruction, so it is
>       just Csound loading/unloading these opcode libs.
> Could you try deleting the libluaCsound.so etc files and running
> again?
> 
> Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
> 
> On 26 Dec 2016, at 17:18, Dave Seidel 
> wrote:
>
>       I see a lot of Lua references. I have lua/luajit, and
>       Csound is built with that options, but I am not using
>       Lua at all in this CSD (and in fact have never used it
>       to date) 
> 
> On Mon, Dec 26, 2016 at 12:15 PM, Dave Seidel
>  wrote:
>       dave@ramanujan
>       ~/GitHub/music-tools/csound-convolver $ valgrind
>       csound -m0 -d --sample-rate=96000 --ksmps=1--omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_
>       master.wav
>       --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav
>       --omacro:GAIN=0.1 -W -R -3 -o "out.wav"
>       "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
> ==22822== Memcheck, a memory error detector
> ==22822== Copyright (C) 2002-2015, and GNU GPL'd, by
> Julian Seward et al.
> ==22822== Using Valgrind-3.11.0 and LibVEX; rerun with
> -h for copyright info
> ==22822== Command: csound -m0 -d --sample-rate=96000
> --ksmps=1--omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_
> master.wav
> --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav
> --omacro:GAIN=0.1 -W -R -3 -o out.wav
> /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
> ==22822== 
> --22822-- WARNING: Serious error when reading debug
> info
> --22822-- When reading debug info from
> /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
> --22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
> --22822-- WARNING: Serious error when reading debug
> info
> --22822-- When reading debug info from
> /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
> --22822-- Last block truncated in .debug_info;
> ignoring
> --22822-- WARNING: Serious error when reading debug
> info
> --22822-- When reading debug info from
> /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
> --22822-- parse_CU_Header: is neither DWARF2 nor
> DWARF3 nor DWARF4
> virtual_keyboard real time MIDI plugin for Csound
> 0dBFS level = 32768.0
> --Csound version 6.09 (double samples) Dec 24 2016 
> [commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
> libsndfile-1.0.25
> UnifiedCSD:
>  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
> STARTING FILE
> Creating orchestra
> Creating score
> rtaudio: ALSA module enabled
> rtmidi: ALSA Raw MIDI module enabled
> *** stack smashing detected ***: csound terminated
> 
> csound command: Aborted
> end of score.   overall amps:      0.0
>   overall samples out of range:        0
> 0 errors in performance
> ==22822== Invalid read of size 8
> ==22822==    at 0xE88F356:
> operator==(LuaStateForThread const&, LuaStateForThread
> const&) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE893AC5: bool
> __gnu_cxx::__ops::_Iter_equals_val const>::operator()<__gnu_cxx::__normal_iterator std::vector std::allocator > >
> >(__gnu_cxx::__normal_iterator std::vector std::allocator > >) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE892D9C:
> __gnu_cxx::__normal_iterator std::vector std::allocator > >
> std::__find_if<__gnu_cxx::__normal_iterator std::vector std::allocator > >,
> __gnu_cxx::__ops::_Iter_equals_val const>
> >(__gnu_cxx::__normal_iterator std::vector std::allocator > >,
> __gnu_cxx::__normal_iterator std::vector std::allocator > >,
> __gnu_cxx::__ops::_Iter_equals_val const>, std::random_access_iterator_tag) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE891F88:
> __gnu_cxx::__normal_iterator std::vector std::allocator > >
> std::__find_if<__gnu_cxx::__normal_iterator std::vector std::allocator > >,
> __gnu_cxx::__ops::_Iter_equals_val const>
> >(__gnu_cxx::__normal_iterator std::vector std::allocator > >,
> __gnu_cxx::__normal_iterator std::vector std::allocator > >,
> __gnu_cxx::__ops::_Iter_equals_val const>) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE8910E0:
> __gnu_cxx::__normal_iterator std::vector std::allocator > >
> std::find<__gnu_cxx::__normal_iterator std::vector std::allocator > >,
> LuaStateForThread>(__gnu_cxx::__normal_iterator std::vector std::allocator > >,
> __gnu_cxx::__normal_iterator std::vector std::allocator > >,
> LuaStateForThread const&) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE88F444: manageLuaState(char) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE88F711: csoundModuleDestroy (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0x501736D: csoundDestroyModules (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822==    by 0x4E7DD46: reset (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822==    by 0x4E79895: csoundDestroy (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822==    by 0x4E79504: destroy_all_instances (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822==    by 0x5605FF7: __run_exit_handlers
> (exit.c:82)
> ==22822==  Address 0xbdbf580 is 0 bytes inside a block
> of size 16 free'd
> ==22822==    at 0x4C2F24B: operator delete(void*) (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==22822==    by 0xE894CBF:
> __gnu_cxx::new_allocator::deallocate(LuaStateForThread*,
> unsigned long) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE893A87:
> __gnu_cxx::__alloc_traits
> >::deallocate(std::allocator&,
> LuaStateForThread*, unsigned long) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE892BBC:
> std::_Vector_base std::allocator
> >::_M_deallocate(LuaStateForThread*, unsigned long)
> (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE891E66:
> std::_Vector_base std::allocator >::~_Vector_base()
> (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE890FE8:
> std::vector std::allocator >::~vector() (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0x5605FF7: __run_exit_handlers
> (exit.c:82)
> ==22822==    by 0x5606044: exit (exit.c:104)
> ==22822==    by 0x4014DC: signal_handler (in
> /usr/local/bin/csound)
> ==22822==    by 0x56014AF: ??? (in
> /lib/x86_64-linux-gnu/libc-2.23.so)
> ==22822==    by 0x5601427: raise (raise.c:54)
> ==22822==    by 0x5603029: abort (abort.c:89)
> ==22822==  Block was alloc'd at
> ==22822==    at 0x4C2E0EF: operator new(unsigned long)
> (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==22822==    by 0xE894D8B:
> __gnu_cxx::new_allocator::allocate(unsigned
> long, void const*) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE893BF7:
> __gnu_cxx::__alloc_traits
> >::allocate(std::allocator&,
> unsigned long) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE892FC5:
> std::_Vector_base std::allocator
> >::_M_allocate(unsigned long) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE892134:
> std::vector std::allocator
> >::_M_insert_aux(__gnu_cxx::__normal_iterator std::vector std::allocator > >,
> LuaStateForThread const&) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE89119C:
> std::vector std::allocator
> >::push_back(LuaStateForThread const&) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE88F4BE: manageLuaState(char) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE88F6F3: csoundModuleInit (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0x5016FCD: csoundInitModule (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822==    by 0x50171AB: csoundInitModules (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822==    by 0x4E7E8A7: csoundReset (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822==    by 0x4E797C1: csoundCreate (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822== 
> ==22822== Invalid read of size 8
> ==22822==    at 0xE88F546: manageLuaState(char) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE88F711: csoundModuleDestroy (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0x501736D: csoundDestroyModules (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822==    by 0x4E7DD46: reset (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822==    by 0x4E79895: csoundDestroy (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822==    by 0x4E79504: destroy_all_instances (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822==    by 0x5605FF7: __run_exit_handlers
> (exit.c:82)
> ==22822==    by 0x5606044: exit (exit.c:104)
> ==22822==    by 0x4014DC: signal_handler (in
> /usr/local/bin/csound)
> ==22822==    by 0x56014AF: ??? (in
> /lib/x86_64-linux-gnu/libc-2.23.so)
> ==22822==    by 0x5601427: raise (raise.c:54)
> ==22822==    by 0x5603029: abort (abort.c:89)
> ==22822==  Address 0xbdbf588 is 8 bytes inside a block
> of size 16 free'd
> ==22822==    at 0x4C2F24B: operator delete(void*) (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==22822==    by 0xE894CBF:
> __gnu_cxx::new_allocator::deallocate(LuaStateForThread*,
> unsigned long) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE893A87:
> __gnu_cxx::__alloc_traits
> >::deallocate(std::allocator&,
> LuaStateForThread*, unsigned long) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE892BBC:
> std::_Vector_base std::allocator
> >::_M_deallocate(LuaStateForThread*, unsigned long)
> (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE891E66:
> std::_Vector_base std::allocator >::~_Vector_base()
> (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE890FE8:
> std::vector std::allocator >::~vector() (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0x5605FF7: __run_exit_handlers
> (exit.c:82)
> ==22822==    by 0x5606044: exit (exit.c:104)
> ==22822==    by 0x4014DC: signal_handler (in
> /usr/local/bin/csound)
> ==22822==    by 0x56014AF: ??? (in
> /lib/x86_64-linux-gnu/libc-2.23.so)
> ==22822==    by 0x5601427: raise (raise.c:54)
> ==22822==    by 0x5603029: abort (abort.c:89)
> ==22822==  Block was alloc'd at
> ==22822==    at 0x4C2E0EF: operator new(unsigned long)
> (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==22822==    by 0xE894D8B:
> __gnu_cxx::new_allocator::allocate(unsigned
> long, void const*) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE893BF7:
> __gnu_cxx::__alloc_traits
> >::allocate(std::allocator&,
> unsigned long) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE892FC5:
> std::_Vector_base std::allocator
> >::_M_allocate(unsigned long) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE892134:
> std::vector std::allocator
> >::_M_insert_aux(__gnu_cxx::__normal_iterator std::vector std::allocator > >,
> LuaStateForThread const&) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE89119C:
> std::vector std::allocator
> >::push_back(LuaStateForThread const&) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE88F4BE: manageLuaState(char) (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0xE88F6F3: csoundModuleInit (in
> /usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
> ==22822==    by 0x5016FCD: csoundInitModule (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822==    by 0x50171AB: csoundInitModules (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822==    by 0x4E7E8A7: csoundReset (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822==    by 0x4E797C1: csoundCreate (in
> /usr/local/lib/libcsound64.so.6.0)
> ==22822== 
> ==22822== 
> ==22822== HEAP SUMMARY:
> ==22822==     in use at exit: 132,013 bytes in 110
> blocks
> ==22822==   total heap usage: 19,966 allocs, 19,856
> frees, 2,094,418 bytes allocated
> ==22822== 
> ==22822== LEAK SUMMARY:
> ==22822==    definitely lost: 136 bytes in 5 blocks
> ==22822==    indirectly lost: 12 bytes in 1 blocks
> ==22822==      possibly lost: 0 bytes in 0 blocks
> ==22822==    still reachable: 131,865 bytes in 104
> blocks
> ==22822==         suppressed: 0 bytes in 0 blocks
> ==22822== Rerun with --leak-check=full to see details
> of leaked memory
> ==22822== 
> ==22822== For counts of detected and suppressed
> errors, rerun with: -v
> ==22822== ERROR SUMMARY: 2 errors from 2 contexts
> (suppressed: 0 from 0)
> 
> 
> On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel
>  wrote:
>       I will try. Have never installed or used
>       valgrind before (just never had the need,
>       since I stopped working with C/C++ before
>       I switched to Linux).
> 
> On Mon, Dec 26, 2016 at 12:09 PM, John ff
>  wrote:
>       Suggests overwriting somewhere.
>       Can you run under valgrind?
> 
> Sent from TypeApp
> On 26 Dec 2016, at 17:02, Dave Seidel
>  wrote:
>       command line I used:
> csound -m0 -d --sample-rate=96000
> --ksmps=1--omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_
> master.wav
> --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav
> --omacro:GAIN=0.1 -W -R -3 -o
> "out.wav"
> "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
> 
> CSD file is: https://github.com/DaveSeidel/music-src/blob/master/csound-convolver/convolve
> r.csd
> 
> On Mon, Dec 26, 2016 at 11:57 AM,
> Dave Seidel 
> wrote:
>       Using the develop
>       branch. I just got a
>       fatal error I never saw
>       before:
> *** stack smashing detected
> ***: csound terminated
> 
> what does this mean?
> 
> 
> 
> 
> 
> 
> 
> 
>

Date2016-12-26 18:30
FromDave Seidel
SubjectRe: [Csnd-dev] stack smashing error?
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ gdb --args csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from csound...done.
(gdb) run
Starting program: /usr/local/bin/csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: /usr/local/bin/csound terminated

Program received signal SIGABRT, Aborted.
0x00007ffff72b1428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) where
#0  0x00007ffff72b1428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff72b302a in __GI_abort () at abort.c:89
#2  0x00007ffff72f37ea in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff740a8a2 "*** %s ***: %s terminated\n") at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff739456c in __GI___fortify_fail (msg=<optimized out>, msg@entry=0x7ffff740a884 "stack smashing detected") at fortify_fail.c:37
#4  0x00007ffff7394510 in __stack_chk_fail () at stack_chk_fail.c:28
#5  0x00007ffff7b19f6a in csound_orclex () from /usr/local/lib/libcsound64.so.6.0
#6  0x00007ffff7b1d311 in csound_orcparse () from /usr/local/lib/libcsound64.so.6.0
#7  0x00007ffff7b3cbd9 in csoundParseOrc () from /usr/local/lib/libcsound64.so.6.0
#8  0x00007ffff7b3af7e in csoundCompileOrc () from /usr/local/lib/libcsound64.so.6.0
#9  0x00007ffff7a407d1 in csoundCompileArgs () from /usr/local/lib/libcsound64.so.6.0
#10 0x00007ffff7a415be in csoundCompile () from /usr/local/lib/libcsound64.so.6.0
#11 0x0000000000401806 in main ()
(gdb) 


On Mon, Dec 26, 2016 at 1:17 PM, jpff <jpff@codemist.co.uk> wrote:
Looks as if valgrind is nt the coret tool.  Gdb and 2whee2 whe it crases might be better

%n in  writes the number of caracters writte to an int* argument which would give a major ovewrite, if it follows C rules.  I hae a suspicion it used to do \n in csound but this area of opodes is a monefield.

So run your command with "gdb --args" at te start, issue command "run" and we it stops use command "where"



On Mon, 26 Dec 2016, Dave Seidel wrote:

I have narrowed it done to this single line of code:
  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse
response file: $IRFILE%noutput file: "


On Mon, Dec 26, 2016 at 12:24 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
      I will do that. In the meantime, if I comment out everything in
      instr 1 except the following, the error still recurs:
  Soutfile getcfg 3
  prints "%n==========%ninput file: $INFILE%ngain adjustment:
$GAIN%nimpulse response file: $IRFILE%noutput file: "
  prints Soutfile
  prints "%n==========%n%n"

and if I comment that code out as well, there is no error.

On Mon, Dec 26, 2016 at 12:22 PM, Victor Lazzarini
<Victor.Lazzarini@nuim.ie> wrote:
      Well, these are pointing to module destruction, so it is
      just Csound loading/unloading these opcode libs.
Could you try deleting the libluaCsound.so etc files and running
again?

Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:18, Dave Seidel <dave.seidel@GMAIL.COM>
wrote:

      I see a lot of Lua references. I have lua/luajit, and
      Csound is built with that options, but I am not using
      Lua at all in this CSD (and in fact have never used it
      to date) 

On Mon, Dec 26, 2016 at 12:15 PM, Dave Seidel
<dave.seidel@gmail.com> wrote:
      dave@ramanujan
      ~/GitHub/music-tools/csound-convolver $ valgrind
      csound -m0 -d --sample-rate=96000 --ksmps=1--omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_
      master.wav
      --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav
      --omacro:GAIN=0.1 -W -R -3 -o "out.wav"
      "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==22822== Memcheck, a memory error detector
==22822== Copyright (C) 2002-2015, and GNU GPL'd, by
Julian Seward et al.
==22822== Using Valgrind-3.11.0 and LibVEX; rerun with
-h for copyright info
==22822== Command: csound -m0 -d --sample-rate=96000
--ksmps=1--omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_
master.wav
--omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav
--omacro:GAIN=0.1 -W -R -3 -o out.wav
/home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==22822== 
--22822-- WARNING: Serious error when reading debug
info
--22822-- When reading debug info from
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
--22822-- WARNING: Serious error when reading debug
info
--22822-- When reading debug info from
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Last block truncated in .debug_info;
ignoring
--22822-- WARNING: Serious error when reading debug
info
--22822-- When reading debug info from
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- parse_CU_Header: is neither DWARF2 nor
DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:
 /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==22822== Invalid read of size 8
==22822==    at 0xE88F356:
operator==(LuaStateForThread const&, LuaStateForThread
const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893AC5: bool
__gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread
const>::operator()<__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >
>(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892D9C:
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >
std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread
const>
>(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread
const>, std::random_access_iterator_tag) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891F88:
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >
std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread
const>
>(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread
const>) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE8910E0:
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >
std::find<__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
LuaStateForThread>(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
LuaStateForThread const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F444: manageLuaState(char) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers
(exit.c:82)
==22822==  Address 0xbdbf580 is 0 bytes inside a block
of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF:
__gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*,
unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87:
__gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread>
>::deallocate(std::allocator<LuaStateForThread>&,
LuaStateForThread*, unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_deallocate(LuaStateForThread*, unsigned long)
(in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread> >::~_Vector_base()
(in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> >::~vector() (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers
(exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in
/usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in
/lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long)
(in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B:
__gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned
long, void const*) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7:
__gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread>
>::allocate(std::allocator<LuaStateForThread>&,
unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_allocate(unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
LuaStateForThread const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread>
>::push_back(LuaStateForThread const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in
/usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== Invalid read of size 8
==22822==    at 0xE88F546: manageLuaState(char) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers
(exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in
/usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in
/lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Address 0xbdbf588 is 8 bytes inside a block
of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF:
__gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*,
unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87:
__gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread>
>::deallocate(std::allocator<LuaStateForThread>&,
LuaStateForThread*, unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_deallocate(LuaStateForThread*, unsigned long)
(in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread> >::~_Vector_base()
(in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> >::~vector() (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers
(exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in
/usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in
/lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long)
(in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B:
__gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned
long, void const*) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7:
__gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread>
>::allocate(std::allocator<LuaStateForThread>&,
unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_allocate(unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
LuaStateForThread const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread>
>::push_back(LuaStateForThread const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in
/usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== 
==22822== HEAP SUMMARY:
==22822==     in use at exit: 132,013 bytes in 110
blocks
==22822==   total heap usage: 19,966 allocs, 19,856
frees, 2,094,418 bytes allocated
==22822== 
==22822== LEAK SUMMARY:
==22822==    definitely lost: 136 bytes in 5 blocks
==22822==    indirectly lost: 12 bytes in 1 blocks
==22822==      possibly lost: 0 bytes in 0 blocks
==22822==    still reachable: 131,865 bytes in 104
blocks
==22822==         suppressed: 0 bytes in 0 blocks
==22822== Rerun with --leak-check=full to see details
of leaked memory
==22822== 
==22822== For counts of detected and suppressed
errors, rerun with: -v
==22822== ERROR SUMMARY: 2 errors from 2 contexts
(suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel
<dave.seidel@gmail.com> wrote:
      I will try. Have never installed or used
      valgrind before (just never had the need,
      since I stopped working with C/C++ before
      I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff
<jpff@codemist.co.uk> wrote:
      Suggests overwriting somewhere.
      Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel
<dave.seidel@GMAIL.COM> wrote:
      command line I used:
csound -m0 -d --sample-rate=96000
--ksmps=1--omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_
master.wav
--omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav
--omacro:GAIN=0.1 -W -R -3 -o
"out.wav"
"/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"

CSD file is: https://github.com/DaveSeidel/music-src/blob/master/csound-convolver/convolve
r.csd

On Mon, Dec 26, 2016 at 11:57 AM,
Dave Seidel <dave.seidel@gmail.com>
wrote:
      Using the develop
      branch. I just got a
      fatal error I never saw
      before:
*** stack smashing detected
***: csound terminated

what does this mean?










Date2016-12-26 18:32
FromDave Seidel
SubjectRe: [Csnd-dev] stack smashing error?
The above is the gdb output whether I use %n or \n (but I take your point, will not use %n again -- I think I only ever used it in this file),

On Mon, Dec 26, 2016 at 1:30 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ gdb --args csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from csound...done.
(gdb) run
Starting program: /usr/local/bin/csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: /usr/local/bin/csound terminated

Program received signal SIGABRT, Aborted.
0x00007ffff72b1428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) where
#0  0x00007ffff72b1428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff72b302a in __GI_abort () at abort.c:89
#2  0x00007ffff72f37ea in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff740a8a2 "*** %s ***: %s terminated\n") at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff739456c in __GI___fortify_fail (msg=<optimized out>, msg@entry=0x7ffff740a884 "stack smashing detected") at fortify_fail.c:37
#4  0x00007ffff7394510 in __stack_chk_fail () at stack_chk_fail.c:28
#5  0x00007ffff7b19f6a in csound_orclex () from /usr/local/lib/libcsound64.so.6.0
#6  0x00007ffff7b1d311 in csound_orcparse () from /usr/local/lib/libcsound64.so.6.0
#7  0x00007ffff7b3cbd9 in csoundParseOrc () from /usr/local/lib/libcsound64.so.6.0
#8  0x00007ffff7b3af7e in csoundCompileOrc () from /usr/local/lib/libcsound64.so.6.0
#9  0x00007ffff7a407d1 in csoundCompileArgs () from /usr/local/lib/libcsound64.so.6.0
#10 0x00007ffff7a415be in csoundCompile () from /usr/local/lib/libcsound64.so.6.0
#11 0x0000000000401806 in main ()
(gdb) 


On Mon, Dec 26, 2016 at 1:17 PM, jpff <jpff@codemist.co.uk> wrote:
Looks as if valgrind is nt the coret tool.  Gdb and 2whee2 whe it crases might be better

%n in  writes the number of caracters writte to an int* argument which would give a major ovewrite, if it follows C rules.  I hae a suspicion it used to do \n in csound but this area of opodes is a monefield.

So run your command with "gdb --args" at te start, issue command "run" and we it stops use command "where"



On Mon, 26 Dec 2016, Dave Seidel wrote:

I have narrowed it done to this single line of code:
  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse
response file: $IRFILE%noutput file: "


On Mon, Dec 26, 2016 at 12:24 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
      I will do that. In the meantime, if I comment out everything in
      instr 1 except the following, the error still recurs:
  Soutfile getcfg 3
  prints "%n==========%ninput file: $INFILE%ngain adjustment:
$GAIN%nimpulse response file: $IRFILE%noutput file: "
  prints Soutfile
  prints "%n==========%n%n"

and if I comment that code out as well, there is no error.

On Mon, Dec 26, 2016 at 12:22 PM, Victor Lazzarini
<Victor.Lazzarini@nuim.ie> wrote:
      Well, these are pointing to module destruction, so it is
      just Csound loading/unloading these opcode libs.
Could you try deleting the libluaCsound.so etc files and running
again?

Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:18, Dave Seidel <dave.seidel@GMAIL.COM>
wrote:

      I see a lot of Lua references. I have lua/luajit, and
      Csound is built with that options, but I am not using
      Lua at all in this CSD (and in fact have never used it
      to date) 

On Mon, Dec 26, 2016 at 12:15 PM, Dave Seidel
<dave.seidel@gmail.com> wrote:
      dave@ramanujan
      ~/GitHub/music-tools/csound-convolver $ valgrind
      csound -m0 -d --sample-rate=96000 --ksmps=1--omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_
      master.wav
      --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav
      --omacro:GAIN=0.1 -W -R -3 -o "out.wav"
      "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==22822== Memcheck, a memory error detector
==22822== Copyright (C) 2002-2015, and GNU GPL'd, by
Julian Seward et al.
==22822== Using Valgrind-3.11.0 and LibVEX; rerun with
-h for copyright info
==22822== Command: csound -m0 -d --sample-rate=96000
--ksmps=1--omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_
master.wav
--omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav
--omacro:GAIN=0.1 -W -R -3 -o out.wav
/home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==22822== 
--22822-- WARNING: Serious error when reading debug
info
--22822-- When reading debug info from
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
--22822-- WARNING: Serious error when reading debug
info
--22822-- When reading debug info from
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Last block truncated in .debug_info;
ignoring
--22822-- WARNING: Serious error when reading debug
info
--22822-- When reading debug info from
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- parse_CU_Header: is neither DWARF2 nor
DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:
 /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==22822== Invalid read of size 8
==22822==    at 0xE88F356:
operator==(LuaStateForThread const&, LuaStateForThread
const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893AC5: bool
__gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread
const>::operator()<__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >
>(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892D9C:
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >
std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread
const>
>(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread
const>, std::random_access_iterator_tag) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891F88:
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >
std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread
const>
>(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread
const>) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE8910E0:
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >
std::find<__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
LuaStateForThread>(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
LuaStateForThread const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F444: manageLuaState(char) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers
(exit.c:82)
==22822==  Address 0xbdbf580 is 0 bytes inside a block
of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF:
__gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*,
unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87:
__gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread>
>::deallocate(std::allocator<LuaStateForThread>&,
LuaStateForThread*, unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_deallocate(LuaStateForThread*, unsigned long)
(in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread> >::~_Vector_base()
(in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> >::~vector() (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers
(exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in
/usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in
/lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long)
(in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B:
__gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned
long, void const*) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7:
__gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread>
>::allocate(std::allocator<LuaStateForThread>&,
unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_allocate(unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
LuaStateForThread const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread>
>::push_back(LuaStateForThread const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in
/usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== Invalid read of size 8
==22822==    at 0xE88F546: manageLuaState(char) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers
(exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in
/usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in
/lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Address 0xbdbf588 is 8 bytes inside a block
of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF:
__gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*,
unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87:
__gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread>
>::deallocate(std::allocator<LuaStateForThread>&,
LuaStateForThread*, unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_deallocate(LuaStateForThread*, unsigned long)
(in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread> >::~_Vector_base()
(in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> >::~vector() (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers
(exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in
/usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in
/lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long)
(in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B:
__gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned
long, void const*) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7:
__gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread>
>::allocate(std::allocator<LuaStateForThread>&,
unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_allocate(unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
LuaStateForThread const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread>
>::push_back(LuaStateForThread const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in
/usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== 
==22822== HEAP SUMMARY:
==22822==     in use at exit: 132,013 bytes in 110
blocks
==22822==   total heap usage: 19,966 allocs, 19,856
frees, 2,094,418 bytes allocated
==22822== 
==22822== LEAK SUMMARY:
==22822==    definitely lost: 136 bytes in 5 blocks
==22822==    indirectly lost: 12 bytes in 1 blocks
==22822==      possibly lost: 0 bytes in 0 blocks
==22822==    still reachable: 131,865 bytes in 104
blocks
==22822==         suppressed: 0 bytes in 0 blocks
==22822== Rerun with --leak-check=full to see details
of leaked memory
==22822== 
==22822== For counts of detected and suppressed
errors, rerun with: -v
==22822== ERROR SUMMARY: 2 errors from 2 contexts
(suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel
<dave.seidel@gmail.com> wrote:
      I will try. Have never installed or used
      valgrind before (just never had the need,
      since I stopped working with C/C++ before
      I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff
<jpff@codemist.co.uk> wrote:
      Suggests overwriting somewhere.
      Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel
<dave.seidel@GMAIL.COM> wrote:
      command line I used:
csound -m0 -d --sample-rate=96000
--ksmps=1--omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_
master.wav
--omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav
--omacro:GAIN=0.1 -W -R -3 -o
"out.wav"
"/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"

CSD file is: https://github.com/DaveSeidel/music-src/blob/master/csound-convolver/convolve
r.csd

On Mon, Dec 26, 2016 at 11:57 AM,
Dave Seidel <dave.seidel@gmail.com>
wrote:
      Using the develop
      branch. I just got a
      fatal error I never saw
      before:
*** stack smashing detected
***: csound terminated

what does this mean?











Date2016-12-26 18:42
FromVictor Lazzarini
SubjectRe: [Csnd-dev] stack smashing error?
So it's a parser issue, I noticed that it never got to performance.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 18:33, Dave Seidel <dave.seidel@GMAIL.COM> wrote:

The above is the gdb output whether I use %n or \n (but I take your point, will not use %n again -- I think I only ever used it in this file),

On Mon, Dec 26, 2016 at 1:30 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
dave@ramanujan ~/GitHub/music-tools/csound-convolver $ gdb --args csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o "out.wav" "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from csound...done.
(gdb) run
Starting program: /usr/local/bin/csound -m0 -d --sample-rate=96000 --ksmps=1 --omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_master.wav --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav --omacro:GAIN=0.1 -W -R -3 -o out.wav /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:  /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: /usr/local/bin/csound terminated

Program received signal SIGABRT, Aborted.
0x00007ffff72b1428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) where
#0  0x00007ffff72b1428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff72b302a in __GI_abort () at abort.c:89
#2  0x00007ffff72f37ea in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff740a8a2 "*** %s ***: %s terminated\n") at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff739456c in __GI___fortify_fail (msg=<optimized out>, msg@entry=0x7ffff740a884 "stack smashing detected") at fortify_fail.c:37
#4  0x00007ffff7394510 in __stack_chk_fail () at stack_chk_fail.c:28
#5  0x00007ffff7b19f6a in csound_orclex () from /usr/local/lib/libcsound64.so.6.0
#6  0x00007ffff7b1d311 in csound_orcparse () from /usr/local/lib/libcsound64.so.6.0
#7  0x00007ffff7b3cbd9 in csoundParseOrc () from /usr/local/lib/libcsound64.so.6.0
#8  0x00007ffff7b3af7e in csoundCompileOrc () from /usr/local/lib/libcsound64.so.6.0
#9  0x00007ffff7a407d1 in csoundCompileArgs () from /usr/local/lib/libcsound64.so.6.0
#10 0x00007ffff7a415be in csoundCompile () from /usr/local/lib/libcsound64.so.6.0
#11 0x0000000000401806 in main ()
(gdb) 


On Mon, Dec 26, 2016 at 1:17 PM, jpff <jpff@codemist.co.uk> wrote:
Looks as if valgrind is nt the coret tool.  Gdb and 2whee2 whe it crases might be better

%n in  writes the number of caracters writte to an int* argument which would give a major ovewrite, if it follows C rules.  I hae a suspicion it used to do \n in csound but this area of opodes is a monefield.

So run your command with "gdb --args" at te start, issue command "run" and we it stops use command "where"



On Mon, 26 Dec 2016, Dave Seidel wrote:

I have narrowed it done to this single line of code:
  prints "%n==========%ninput file: $INFILE%ngain adjustment: $GAIN%nimpulse
response file: $IRFILE%noutput file: "


On Mon, Dec 26, 2016 at 12:24 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
      I will do that. In the meantime, if I comment out everything in
      instr 1 except the following, the error still recurs:
  Soutfile getcfg 3
  prints "%n==========%ninput file: $INFILE%ngain adjustment:
$GAIN%nimpulse response file: $IRFILE%noutput file: "
  prints Soutfile
  prints "%n==========%n%n"

and if I comment that code out as well, there is no error.

On Mon, Dec 26, 2016 at 12:22 PM, Victor Lazzarini
<Victor.Lazzarini@nuim.ie> wrote:
      Well, these are pointing to module destruction, so it is
      just Csound loading/unloading these opcode libs.
Could you try deleting the libluaCsound.so etc files and running
again?

Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 26 Dec 2016, at 17:18, Dave Seidel <dave.seidel@GMAIL.COM>
wrote:

      I see a lot of Lua references. I have lua/luajit, and
      Csound is built with that options, but I am not using
      Lua at all in this CSD (and in fact have never used it
      to date) 

On Mon, Dec 26, 2016 at 12:15 PM, Dave Seidel
<dave.seidel@gmail.com> wrote:
      dave@ramanujan
      ~/GitHub/music-tools/csound-convolver $ valgrind
      csound -m0 -d --sample-rate=96000 --ksmps=1--omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_
      master.wav
      --omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav
      --omacro:GAIN=0.1 -W -R -3 -o "out.wav"
      "/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"
==22822== Memcheck, a memory error detector
==22822== Copyright (C) 2002-2015, and GNU GPL'd, by
Julian Seward et al.
==22822== Using Valgrind-3.11.0 and LibVEX; rerun with
-h for copyright info
==22822== Command: csound -m0 -d --sample-rate=96000
--ksmps=1--omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_
master.wav
--omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav
--omacro:GAIN=0.1 -W -R -3 -o out.wav
/home/dave/GitHub/music-tools/csound-convolver/convolver.csd
==22822== 
--22822-- WARNING: Serious error when reading debug
info
--22822-- When reading debug info from
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Ignoring non-Dwarf2/3/4 block in .debug_info
--22822-- WARNING: Serious error when reading debug
info
--22822-- When reading debug info from
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- Last block truncated in .debug_info;
ignoring
--22822-- WARNING: Serious error when reading debug
info
--22822-- When reading debug info from
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0:
--22822-- parse_CU_Header: is neither DWARF2 nor
DWARF3 nor DWARF4
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) Dec 24 2016 
[commit: 0c78692211dbe165c8fd7fc93dc2d30087d1e88e]
libsndfile-1.0.25
UnifiedCSD:
 /home/dave/GitHub/music-tools/csound-convolver/convolver.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
*** stack smashing detected ***: csound terminated

csound command: Aborted
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
==22822== Invalid read of size 8
==22822==    at 0xE88F356:
operator==(LuaStateForThread const&, LuaStateForThread
const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893AC5: bool
__gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread
const>::operator()<__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >
>(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892D9C:
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >
std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread
const>
>(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread
const>, std::random_access_iterator_tag) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891F88:
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >
std::__find_if<__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread
const>
>(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__ops::_Iter_equals_val<LuaStateForThread
const>) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE8910E0:
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >
std::find<__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
LuaStateForThread>(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
LuaStateForThread const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F444: manageLuaState(char) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers
(exit.c:82)
==22822==  Address 0xbdbf580 is 0 bytes inside a block
of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF:
__gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*,
unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87:
__gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread>
>::deallocate(std::allocator<LuaStateForThread>&,
LuaStateForThread*, unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_deallocate(LuaStateForThread*, unsigned long)
(in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread> >::~_Vector_base()
(in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> >::~vector() (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers
(exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in
/usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in
/lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long)
(in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B:
__gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned
long, void const*) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7:
__gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread>
>::allocate(std::allocator<LuaStateForThread>&,
unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_allocate(unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
LuaStateForThread const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread>
>::push_back(LuaStateForThread const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in
/usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== Invalid read of size 8
==22822==    at 0xE88F546: manageLuaState(char) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F711: csoundModuleDestroy (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x501736D: csoundDestroyModules (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7DD46: reset (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79895: csoundDestroy (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E79504: destroy_all_instances (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x5605FF7: __run_exit_handlers
(exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in
/usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in
/lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Address 0xbdbf588 is 8 bytes inside a block
of size 16 free'd
==22822==    at 0x4C2F24B: operator delete(void*) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894CBF:
__gnu_cxx::new_allocator<LuaStateForThread>::deallocate(LuaStateForThread*,
unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893A87:
__gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread>
>::deallocate(std::allocator<LuaStateForThread>&,
LuaStateForThread*, unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892BBC:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_deallocate(LuaStateForThread*, unsigned long)
(in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE891E66:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread> >::~_Vector_base()
(in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE890FE8:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> >::~vector() (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5605FF7: __run_exit_handlers
(exit.c:82)
==22822==    by 0x5606044: exit (exit.c:104)
==22822==    by 0x4014DC: signal_handler (in
/usr/local/bin/csound)
==22822==    by 0x56014AF: ??? (in
/lib/x86_64-linux-gnu/libc-2.23.so)
==22822==    by 0x5601427: raise (raise.c:54)
==22822==    by 0x5603029: abort (abort.c:89)
==22822==  Block was alloc'd at
==22822==    at 0x4C2E0EF: operator new(unsigned long)
(in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22822==    by 0xE894D8B:
__gnu_cxx::new_allocator<LuaStateForThread>::allocate(unsigned
long, void const*) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE893BF7:
__gnu_cxx::__alloc_traits<std::allocator<LuaStateForThread>
>::allocate(std::allocator<LuaStateForThread>&,
unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892FC5:
std::_Vector_base<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_allocate(unsigned long) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE892134:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<LuaStateForThread*,
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread> > >,
LuaStateForThread const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE89119C:
std::vector<LuaStateForThread,
std::allocator<LuaStateForThread>
>::push_back(LuaStateForThread const&) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F4BE: manageLuaState(char) (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0xE88F6F3: csoundModuleInit (in
/usr/local/lib/csound/plugins64-6.0/libLuaCsound.so)
==22822==    by 0x5016FCD: csoundInitModule (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x50171AB: csoundInitModules (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E7E8A7: csoundReset (in
/usr/local/lib/libcsound64.so.6.0)
==22822==    by 0x4E797C1: csoundCreate (in
/usr/local/lib/libcsound64.so.6.0)
==22822== 
==22822== 
==22822== HEAP SUMMARY:
==22822==     in use at exit: 132,013 bytes in 110
blocks
==22822==   total heap usage: 19,966 allocs, 19,856
frees, 2,094,418 bytes allocated
==22822== 
==22822== LEAK SUMMARY:
==22822==    definitely lost: 136 bytes in 5 blocks
==22822==    indirectly lost: 12 bytes in 1 blocks
==22822==      possibly lost: 0 bytes in 0 blocks
==22822==    still reachable: 131,865 bytes in 104
blocks
==22822==         suppressed: 0 bytes in 0 blocks
==22822== Rerun with --leak-check=full to see details
of leaked memory
==22822== 
==22822== For counts of detected and suppressed
errors, rerun with: -v
==22822== ERROR SUMMARY: 2 errors from 2 contexts
(suppressed: 0 from 0)


On Mon, Dec 26, 2016 at 12:12 PM, Dave Seidel
<dave.seidel@gmail.com> wrote:
      I will try. Have never installed or used
      valgrind before (just never had the need,
      since I stopped working with C/C++ before
      I switched to Linux).

On Mon, Dec 26, 2016 at 12:09 PM, John ff
<jpff@codemist.co.uk> wrote:
      Suggests overwriting somewhere.
      Can you run under valgrind?

Sent from TypeApp
On 26 Dec 2016, at 17:02, Dave Seidel
<dave.seidel@GMAIL.COM> wrote:
      command line I used:
csound -m0 -d --sample-rate=96000
--ksmps=1--omacro:INFILE=/home/dave/work/hexany_catalogue/output/hexany_catalog_part1_
master.wav
--omacro:IRFILE=/home/dave/work/ir/minster1_000_ortf_96k.wav
--omacro:GAIN=0.1 -W -R -3 -o
"out.wav"
"/home/dave/GitHub/music-tools/csound-convolver/convolver.csd"

CSD file is: https://github.com/DaveSeidel/music-src/blob/master/csound-convolver/convolve
r.csd

On Mon, Dec 26, 2016 at 11:57 AM,
Dave Seidel <dave.seidel@gmail.com>
wrote:
      Using the develop
      branch. I just got a
      fatal error I never saw
      before:
*** stack smashing detected
***: csound terminated

what does this mean?