Looks like your memory is in a mess when you malloc. Try running under valgrind or use efence (or similar) Quoting Rory Walsh : > That gives the same error. I also just tried explicitly allocating enough > space ala: > > int tableSize = csound->TableLength(1); > MYFLT* temp = (MYFLT *)malloc(tableSize * sizeof(MYFLT)); > csound->TableCopyOut(1, temp); > > but that gives a whole host of new errors: > > 0 0x00007ffff700e425 __GI_raise ../nptl/sysdeps/unix/sysv/linux/raise.c > 64 > 1 0x00007ffff7011b8b __GI_abort abort.c 91 > 2 0x00007ffff704c39e __libc_message > ../sysdeps/unix/sysv/linux/libc_fatal.c 201 > 3 0x00007ffff7056b96 malloc_printerr malloc.c 5039 > 4 0x00007ffff790bd03 mfree > /home/rory/sourcecode/csound-csound6-git/Engine/memalloc.c 157 > 5 0x00007ffff79042c1 orcompact > /home/rory/sourcecode/csound-csound6-git/Engine/insert.c 813 > 6 0x00007ffff790f714 csoundCleanup > /home/rory/sourcecode/csound-csound6-git/Engine/musmon.c 447 > 7 0x00007ffff7a61b48 reset > /home/rory/sourcecode/csound-csound6-git/Top/csound.c 2646 > 8 0x00007ffff7a5e64c csoundDestroy > /home/rory/sourcecode/csound-csound6-git/Top/csound.c 1212 > 9 0x000000000040551f Csound::~Csound() > 10 0x0000000000405552 Csound::~Csound() > 11 0x00000000004037f6 main > > I'm not sure why ptable was 0x0 in my first report from a few days ago, it > certainly seems valid now. I think I might have tried initialized it to > something in an attempt go bypass this problem. > > > On 19 March 2014 15:19, Victor Lazzarini wrote: > >> MYFLT* temp = 0; >> int tableSize = csound->TableLength(1); >> csound->TableCopyOut(1, temp); >> >> You need memory to copy into. Try allocating it. >> >> >> ======================== >> Dr Victor Lazzarini >> Senior Lecturer >> NUI Maynooth, Ireland >> victor dot lazzarini at nuim dot ie >> >> >> >> >> On 19 Mar 2014, at 14:59, Rory Walsh wrote: >> >> > I tried to do some more digging around this but I can't see why memcpy >> is giving a problem. When I break at memcpy: >> > >> > memcpy(ptable, ftab, (size_t) (len*sizeof(MYFLT))); >> > >> > The values read: >> > ptable = 0x4035c0 >> > len = 1024 >> > ftab = 0x7a2d50 >> > >> > These addresses appear to be valid, but how would one find out for sure? >> > >> > >> > On 14 March 2014 14:45, Rory Walsh wrote: >> > Attached are the source and csd file that will produce the problem. >> > >> > Backtrace: >> > #0 __memcpy_ssse3_back () >> > at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:1579 >> > #1 0x00007ffff7a6b992 in csoundTableCopyOut (csound=0x609030, table=1, >> > ptable=0x0) at >> /home/rory/sourcecode/csound-csound6-git/Top/threadsafe.c:50 >> > #2 0x0000000000404e12 in Csound::TableCopyOut(int, float*) () >> > #3 0x0000000000403779 in main () >> > >> > >> > >> ------------------------------------------------------------------------------ >> > Learn Graph Databases - Download FREE O'Reilly Book >> > "Graph Databases" is the definitive new guide to graph databases and >> their >> > applications. Written by three acclaimed leaders in the field, >> > this first edition is now available. Download your free book today! >> > >> http://p.sf.net/sfu/13534_NeoTech_______________________________________________ >> > Csound-devel mailing list >> > Csound-devel@lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/csound-devel >> >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and their >> applications. Written by three acclaimed leaders in the field, >> this first edition is now available. Download your free book today! >> http://p.sf.net/sfu/13534_NeoTech >> _______________________________________________ >> Csound-devel mailing list >> Csound-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/csound-devel >> ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net