Re: Problem in data capture (Bad comedi_t structure) "SOLUTION"

> On Wed, Jun 05, 2002 at 06:58:54PM +0200, Pedro Jurado Maqueda wrote:
>> Hi, I'm development a program that capture a data and introduce it in
>> a database (with mysql). My problem happens when the program is
>> running, aproximately 15 minutes after begin, the  program don't get
>> more data, not abnormal termination, it continues but show me the next
>> error whit strerror:
>> 
>> "Bad comedi_t structure"
> 
> This is usually due to corruption of the comedi_t structure, probably
> because of some code writing outside the bounds of an array.  Try
> using something like ElectricFence -- it usually picks up those
> kinds of errors immediately.
> 
  I have the solution, the problem was that I open the device but I don't close it, this
possibly produced an "overload" to the user's memory allocation, because C language
don't has a garbage recollector.
Only I put the function comedi_close(*cf), in the end of the function captura.c to
resolve all my problems (except with my girlfriend, of course XD).
Thanks David, your answer shows me the way.

                                                                         FDO. ER_MELENAS

Received on 2002-06-11Z14:21:20