Benoit, Just to let you know, for your information only. My serial port applicationS that have been running 24 hours for 4 years on over 150 computers works much better when pull out All less 1 byte each _Read event as opposed to. I've found out that sometimes, rarely, _Read didn't fire and this worked better. Still Using 1.0.18 or .19 and solid as a rock!! -Fernando
---------- Original Message ----------- From: Benoît Minisini <[email protected]> To: mailing list for gambas users <[email protected]> Sent: Sat, 5 Dec 2009 20:48:26 +0100 Subject: Re: [Gambas-user] Serial Port Change Events Not Working after Upgrade to Karmic > > > > > > Benoit, > > > > > > runned valgrind tool for a while. > > > > > > And I got a rather strange winner, I got 3 milion calls of _add_char in > > > gb_error.c > > > > > > Some debug code hanging around or something like that? > > > > > > See attached valgrind file. > > > > > > Regards, > > > Ron_2nd. > > > > The reason is a lot of one-byte reading that raises the EOF error. This > > should be logical if the read event handler is called whereas there is > > nothing to read, and then you read one byte. > > > > But why Linux tells me (the interpreter actually) that there is something > > to read on the serial port file descriptor, whereas there is nothing? > > > > Regards, > > > > Hmm. I tested the SerialPort example by sending data to it, and I don't see > any CPU consumption. > > What happens if you don't read the data byte by byte, but all the available > data at once, as the SerialPort example does? This way: > > PUBLIC SUB MySerialPort_Read() > DIM s AS String > READ #MySerialPort, s, Lof(MySerialPort) > ... > END > > -- > Benoît Minisini > > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > Gambas-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
