Re: comedi_do_insn() segmentation fault

On Friday 21 September 2007 23:23, george gomes wrote:
> Thank you for your help Ian.
>
> On 9/17/07, Ian Abbott <abbotti_at_mev.co.uk> wrote:
> > On 16/09/2007 02:38, george gomes wrote:
> > > Hi all
> > >
> > > I am having a segmentation fault problem when I execute the line:
> > >
> > > int ret = comedi_do_insn(dev, &insn);
> > >
> > > If i reboot i don't get the fault one time but when run it again i
> > > do.
> >
> > Is it a kernel Oops?  I.e., do you see a kernel stacktrace when you
> > run 'dmesg'?
>
> I belive the answer to your question is yes.  Here are the tail lines of
> dmesg.  "hithere" is the name of the app.  What is the matter?

The BUG is happening because the driver is attempting to allocate the a dma 
channel for the analog out a second time, without releasing the one it 
already got before the first internal trigger attempt failed.  As to why 
the first internal trigger failed in the first place, probably not enough 
samples were loaded into comedi's buffer before doing the trigger.

-- 
Frank

Received on 2007-09-23Z14:12:44