Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] [Csnd] simple pvsbuffer example - segment violation

Date2007-10-24 08:35
FromVictor Lazzarini
SubjectRe: [Cs-dev] [Csnd] simple pvsbuffer example - segment violation
Somehow there is an ivalid handle. I need to add
a check for that.

Victor

>
> (Moved this over from main csound list as it's dev
> related)
>
> I checked out a fresh CVS copy and compiled with debug on
> to run with gdb.  I got this:
>
> Program received signal SIGSEGV, Segmentation fault.
> pvsbufreadproc (csound=0x3d5a30, p=0x4f9b18) at
> Opcodes/pvsbuffer.c:168 168             fout[i] =
> frame1[i] + frac*(frame2[i] - frame1[i]); (gdb)
>
>
> This is using Rory's example.  Any ideas?
>
> steven
>
>
>
> On 10/23/07, Jean-Pierre Lemoine 
> > wrote: I have done more tests,
> > fsb1  pvsbufread  0, khan1, 0, 2500 -> segment violation
> > fsb1  pvsbufread  2.1, khan1, 0, 2500 -> no violation,
> > but out of range samples
> >
> > jean-pierre
> >
> > Steven Yi a écrit :
> > > I got a Segmentation Violation here on WinXP.  Latest
> > > compiled from CVS but for double precision.  Perhaps
> > > there is a hardcoaded float somewhere?
> > >
> > > On 10/23/07, Rory Walsh  wrote:
> > >
> > >> That's strange. I am using the latest build from the
> > CVS, float >> precision, winxp and it runs fine, so does
> > Victor's sample? >>
> > >> Jean-Pierre Lemoine wrote:
> > >>
> > >>> This example doesn't run on my system (Vista+csound
> > 5.07 double >>> precision). Segment violation!
> > >>> I have tried other examples posted on the list and
> > this is the same >>> error. I have tried to comment
> > lines for finding the culprit; and it >>> seems to be
> > pvsbufread. >>> CsOptions is -odac6 -b2048
> > >>> I have tried with a wav file, and also using vco2.
> > No way >>>
> > >>> jean-pierre
> > >>>
> > >>> Rory Walsh a écrit :
> > >>>
> > >>>> Here's another example. These opcodes are a lot of
> > fun. I've been >>>> playing around with a mic for this
> > one but a soundfile will work too... >>>>
> > >>>>
> > >>>> 
> > >>>> 
> > >>>> -odevaudio -b64 -idevaudio
> > >>>> 
> > >>>> 
> > >>>> sr = 44100
> > >>>> ksmps = 1
> > >>>> nchnls = 2
> > >>>>
> > >>>> instr 1
> > >>>> igain = 0.6
> > >>>>
> > >>>> afdb1 init 0
> > >>>> afdb2 init 0
> > >>>> afdb3 init 0
> > >>>>
> > >>>> asig inch 1
> > >>>> ;asig soundin
> > "D:/MyDocuments/csoundfiles/Old/Radiohead.wav" >>>>
> > >>>> k1 phasor 0.5
> > >>>>
> > >>>> kdel1 randi 1, 0.5, 0.2
> > >>>> kdel2 randi 1, 1,   0.4
> > >>>> kdel3 randi 1, 1.5, 0.5
> > >>>>
> > >>>> fsig1   pvsanal   asig+afdb1,1024, 512,1024,1
> > >>>> fsig2   pvsanal   asig+afdb2,1024, 512,1024,1
> > >>>> fsig3   pvsanal   asig+afdb3,1024, 512,1024,1
> > >>>>
> > >>>> ibuf1,kt1   pvsbuffer   fsig1, 2
> > >>>> ibuf2,kt1   pvsbuffer   fsig2, 2
> > >>>> ibuf3,kt1   pvsbuffer   fsig3, 2
> > >>>>
> > >>>> khan1 init ibuf1
> > >>>> khan2 init ibuf2
> > >>>> khan3 init ibuf3
> > >>>>
> > >>>> fsb1  pvsbufread  k1-kdel1, khan1, 0, 2500
> > >>>> fsb2  pvsbufread  k1-kdel2, khan2, 2500, 7000
> > >>>> fsb3  pvsbufread  k1-kdel3, khan3, 7000, 18000
> > >>>>
> > >>>> aout1  pvsynth   fsb1
> > >>>> aout2  pvsynth   fsb2
> > >>>> aout3  pvsynth   fsb3
> > >>>>
> > >>>> afdb1 = (afdb1+aout1)*igain
> > >>>> afdb2 = (afdb2+aout2)*igain
> > >>>> afdb3 = (afdb3+aout3)*igain
> > >>>>
> > >>>> aLeft = (afdb1*kdel1)+(afdb2*kdel2)+(afdb3*kdel3)
> > >>>> aRight =
> > (afdb1*(1-kdel1))+(afdb2*(1-kdel2))+(afdb3*(1-kdel3))
> > >>>> outs aLeft, aRight >>>>
> > >>>> endin
> > >>>>
> > >>>>
> > >>>> 
> > >>>> 
> > >>>> f1 0 1024 10 1
> > >>>> i1 0 100
> > >>>> 
> > >>>> 
> > >>>>
> > >>>
> > >>>
> > >> --
> > >> Send bugs reports to this list.
> > >> To unsubscribe, send email to
> > csound-unsubscribe@lists.bath.ac.uk >>
> > >>
> >
> >
> >
> > --
> > Send bugs reports to this list.
> > To unsubscribe, send email to
> csound-unsubscribe@lists.bath.ac.uk >
>
> ----------------------------------------------------------
> --------------- This SF.net email is sponsored by: Splunk
> Inc. Still grepping through log files to find problems?
> Stop. Now Search log events and configuration files using
> AJAX and a browser. Download your FREE copy of Splunk now
> >> http://get.splunk.com/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2007-10-24 17:34
From"Steven Yi"
SubjectRe: [Cs-dev] [Csnd] simple pvsbuffer example - segment violation
AttachmentsNone  

Date2007-10-24 18:06
FromRory Walsh
SubjectRe: [Cs-dev] [Csnd] simple pvsbuffer example - segment violation
> Also, I'm confused how Rory is able to run it but Jean-Pierre and I are
> not able to do so.

You're not the only one!

Rory.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net