|
In article <slrn8fimoa.t82.guito@cr185313-a.pr1.on.wave.home.com>,
guito@guito.dhs.org (guito) wrote:
> Dave Baum <dbaum@spambgoneenteract.com> wrote:
>
> > This is very strange. Communication looks perfectly normal. I can't
> > think of any reason for a hang. Is it possible for you to build nqc
> > from source? If so, we can instrument any calls to the serial driver
> > and determine if the driver is hanging or nqc.
>
> the same thing is happening to me, and i did build it from source.
> i can recompile with changes, if you think it might be useful in
> figuring out whats going on, though.
The first thing I'd try would be to add a pair of printf() statements
before and after the tcdrain() call in PSerial_unix::FlushWrite() (in
file platform/PSerial_unix.cpp). Call be paranoid, but calls like this
always make me nervous...they're just asking for your program to hang
due to some mysterious system condition.
If the hang happens within tcdrain(), then we'd have to debug it a bit
to decide why its happening, but you could also probably make due by
commenting out the tcdrain() call. Timeouts won't be as reliable, but
communication still should work. If latency is real bad through the
serial drivers, then you'd also have to bump up the timeout with a -t
option on the command line.
If tcdrain() isn't the problem, I'd check the PSerial_unix::Write() and
PSerial_unix::Read() calls. Again use the printfs to mark entry and
exit from the functions. Read() is going to be nasty because there are
a lot of early returns. An easy hack would be to rename Read() to
Read2(), then create another Read() that just prints, calls Read2() and
prints again. This way you don't run the risk of missing an early
return out of the original Read().
Dave Baum
--
reply to: dbaum at enteract dot com
|
|
Message is in Reply To:
| | Re: NQC on Linux dilema...
|
| (...) the same thing is happening to me, and i did build it from source. i can recompile with changes, if you think it might be useful in figuring out whats going on, though. (25 years ago, 17-Apr-00, to lugnet.robotics.rcx.nqc)
|
8 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|