Csound Csound-dev Csound-tekno Search About

[Cs-dev] search paths

Date2006-11-07 23:42
FromJonathan Murphy
Subject[Cs-dev] search paths
I think that there may be a bug in the new search paths code. Csound is no
longer finding files in subdirectories of INCDIR. The following used
to work:

#include "udo/foobar.orc"

but now provokes:

*** glibc detected *** malloc(): memory corruption: 0x08075078 ***

If I make a symlink in my INCDIR:

foobar.orc --> /INCDIR/udo/foobar.orc

or to the working directory everything is fine, so there's nothing
wrong with the file, or the positioning of the #include in the
orchestra header. Csound is still finding files in subdirectories of
SSDIR, so possibly a typo somewhere?

J.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-11-08 05:39
FromAnthony Kozar
SubjectRe: [Cs-dev] search paths
Hi Jonathan,

Thanks very much for the bug report.  Unfortunately, I have not found the
problem yet because subdirectories of INCDIR are working fine for me here on
MacOS 9 (which is not a very good test since some different code is being
executed on other platforms).  I have also scanned the code again for
possible errors that could cause this and have not spotted it yet.  It also
seems strange to me that it works for SSDIR and not INCDIR.  (pretty much
the same code ...)

Can you please provide more information such as the platform you are running
on, your environment settings, the full path to the orchestra or CSD you are
running.  Sending me the files (or a simplified version that reproduces the
bug) would be very helpful.  Also, if you can do anything like use gdb to
narrow down the file and line # to where the crash occurs, that would be
very helpful.  (On OS X, you can use the Console application to examine a
crash log whenever a program crashes, and it will provide this information
when possible).

Thanks.

Anthony Kozar
anthonykozar AT sbcglobal DOT net


Jonathan Murphy wrote on 11/7/06 6:42 PM:

> 
> I think that there may be a bug in the new search paths code. Csound is no
> longer finding files in subdirectories of INCDIR. The following used
> to work:
> 
> #include "udo/foobar.orc"
> 
> but now provokes:
> 
> *** glibc detected *** malloc(): memory corruption: 0x08075078 ***
> 
> If I make a symlink in my INCDIR:
> 
> foobar.orc --> /INCDIR/udo/foobar.orc
> 
> or to the working directory everything is fine, so there's nothing
> wrong with the file, or the positioning of the #include in the
> orchestra header. Csound is still finding files in subdirectories of
> SSDIR, so possibly a typo somewhere?


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-11-08 08:51
FromJonathan Murphy
SubjectRe: [Cs-dev] search paths
Hi Anthony,

Hope that this helps,

linux 2.6.18.2-preempt

OPCODEDIR=/usr/local/lib/csound/plugins
SFDIR=/Csound/Sounds
SADIR=/Csound/Analysis
SSDIR=/Csound/Samples
INCDIR=/Csound/Includes

I always run csound from the shell, and this (and the scary malloc
message that I posted earlier) is what I'm getting.

*** glibc detected *** free(): invalid next size (fast): 0x080552c0
    ***

I'm unable to exit csound, even though it's received an abort signal,
attaching gdb to the running(?) process logs this: 

Attaching to process 6112
Reading symbols from /usr/local/bin/csound...done.
Using host libthread_db library "/lib/libthread_db.so.1".
Reading symbols from /usr/local/lib/libcsound.so.5.1...done.
Loaded symbols for /usr/local/lib/libcsound.so.5.1
Reading symbols from /usr/lib/libsndfile.so.1...done.
Loaded symbols for /usr/lib/libsndfile.so.1
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread -1211242832 (LWP 6112)]
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /usr/lib/libFLAC.so.7...done.
Loaded symbols for /usr/lib/libFLAC.so.7
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/local/lib/csound/plugins/libstdopcod.so...done.
Loaded symbols for /usr/local/lib/csound/plugins/libstdopcod.so
Reading symbols from /usr/local/lib/csound/plugins/libftest.so...done.
Loaded symbols for /usr/local/lib/csound/plugins/libftest.so
Reading symbols from /usr/local/lib/csound/plugins/libvaops.so...done.
Loaded symbols for /usr/local/lib/csound/plugins/libvaops.so
Reading symbols from /usr/local/lib/csound/plugins/libugakbari.so...done.
Loaded symbols for /usr/local/lib/csound/plugins/libugakbari.so
Reading symbols from /usr/local/lib/csound/plugins/libharmon.so...done.
Loaded symbols for /usr/local/lib/csound/plugins/libharmon.so
Reading symbols from /usr/local/lib/csound/plugins/libvirtual.so...done.
Loaded symbols for /usr/local/lib/csound/plugins/libvirtual.so
Reading symbols from /usr/lib/libfltk_images.so.1.1...done.
Loaded symbols for /usr/lib/libfltk_images.so.1.1
Reading symbols from /usr/lib/libpng.so.3...done.
Loaded symbols for /usr/lib/libpng.so.3
Reading symbols from /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /usr/lib/libjpeg.so.62...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /usr/lib/libfltk.so.1.1...done.
Loaded symbols for /usr/lib/libfltk.so.1.1
Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
Loaded symbols for /usr/X11R6/lib/libXext.so.6
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Loaded symbols for /usr/X11R6/lib/libX11.so.6
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /usr/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/lib/libgcc_s.so.1
Reading symbols from /usr/local/lib/csound/plugins/librtalsa.so...done.
Loaded symbols for /usr/local/lib/csound/plugins/librtalsa.so
Reading symbols from /usr/lib/libasound.so.2...done.
Loaded symbols for /usr/lib/libasound.so.2
Reading symbols from /usr/local/lib/csound/plugins/librtjack.so...done.
Loaded symbols for /usr/local/lib/csound/plugins/librtjack.so
Reading symbols from /usr/lib/libjack.so.0...done.
Loaded symbols for /usr/lib/libjack.so.0
Reading symbols from /usr/local/lib/csound/plugins/libstdutil.so...done.
Loaded symbols for /usr/local/lib/csound/plugins/libstdutil.so
0xb7f9a410 in __kernel_vsyscall ()
The program is running.  Quit anyway (and detach it)? (y or n) Detaching from program: /usr/local/bin/csound, process 6112
 

Here is a csd which crashes:




-+rtaudio=alsa -+rtmidi=alsa -Mhw:1,0 -d -m0 --expression-opt -odac -b64




  sr	    =  48000
  ksmps	    =  64
  nchnls    =  1

  gisin	    ftgen     1, 0, 8192, 10, 1

	    massign   1, 1

#include "udo/envelope.orc"

    instr 1

  kcps	cpsmidib

  iatt1	    =  0.1
  idec1	    =  0.2
  isus1	    =  0.75
  irel1	    =  1

  aenv	    envelope  iatt1, idec1, isus1, irel1

  aosc	oscil	aenv, kcps, 1
 
	    out	      aosc * 10000

    endin




i1 0 60





Jonathan.


Anthony Kozar  writes:

> Hi Jonathan,
>
> Thanks very much for the bug report.  Unfortunately, I have not found the
> problem yet because subdirectories of INCDIR are working fine for me here on
> MacOS 9 (which is not a very good test since some different code is being
> executed on other platforms).  I have also scanned the code again for
> possible errors that could cause this and have not spotted it yet.  It also
> seems strange to me that it works for SSDIR and not INCDIR.  (pretty much
> the same code ...)
>
> Can you please provide more information such as the platform you are running
> on, your environment settings, the full path to the orchestra or CSD you are
> running.  Sending me the files (or a simplified version that reproduces the
> bug) would be very helpful.  Also, if you can do anything like use gdb to
> narrow down the file and line # to where the crash occurs, that would be
> very helpful.  (On OS X, you can use the Console application to examine a
> crash log whenever a program crashes, and it will provide this information
> when possible).
>
> Thanks.
>
> Anthony Kozar
> anthonykozar AT sbcglobal DOT net
>
>
> Jonathan Murphy wrote on 11/7/06 6:42 PM:
>
>> 
>> I think that there may be a bug in the new search paths code. Csound is no
>> longer finding files in subdirectories of INCDIR. The following used
>> to work:
>> 
>> #include "udo/foobar.orc"
>> 
>> but now provokes:
>> 
>> *** glibc detected *** malloc(): memory corruption: 0x08075078 ***
>> 
>> If I make a symlink in my INCDIR:
>> 
>> foobar.orc --> /INCDIR/udo/foobar.orc
>> 
>> or to the working directory everything is fine, so there's nothing
>> wrong with the file, or the positioning of the #include in the
>> orchestra header. Csound is still finding files in subdirectories of
>> SSDIR, so possibly a typo somewhere?
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-11-08 14:31
From"Steven Yi"
SubjectRe: [Cs-dev] search paths
AttachmentsNone  

Date2006-11-08 14:54
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] search paths
Have you tried running with electricfence or one of the alternative malloc 
libraries?  Sounds like free being called on something already free.

Valgrind?



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-11-08 15:19
From"Steven Yi"
SubjectRe: [Cs-dev] search paths
AttachmentsNone  

Date2006-11-08 16:54
From
SubjectRe: [Cs-dev] search paths
I think it shoudl be

   else {
        len = lastIndex - convPath;
        partialPath = (char*) mmalloc(csound, len+1);
        strncpy(partialPath, convPath, len);
        partialPath[len] = '\0';
   }

Usually string of length n needs n+1 characters.

==John ffitch

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-11-08 17:30
FromAnthony Kozar
SubjectRe: [Cs-dev] search paths
Yes!  I am sorry about that ... very stupid mistake ...

I will check it in if I see that it has not changed yet.

Thanks to everyone who spent their time tracking down my mistake!

Anthony

jpff@cs.bath.ac.uk wrote on 11/8/06 11:54 AM:

> I think it shoudl be
> 
> else {
> len = lastIndex - convPath;
> partialPath = (char*) mmalloc(csound, len+1);
> strncpy(partialPath, convPath, len);
> partialPath[len] = '\0';
> }
> 
> Usually string of length n needs n+1 characters.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net