From: Rick M. <obj...@gm...> - 2009-04-17 18:33:29
|
Ok, one additional datapoint here. I've figured out where the "r" came from. If I rename "rexx.exe" to "oorexx.exe", the overlay character is now an "o" rather than an "r". Somehow the first character of the command used to launch rexx is showing up as the first character at a read prompt. Rick On Fri, Apr 17, 2009 at 2:25 PM, Rick McGuire <obj...@gm...> wrote: > For some time now, I've been seeing random occurrences in a problem > with linein() reading from the console. When this happens, the first > character of the line is somehow overlayed with the character "r". > The first few times I saw this, I thought I was seeing things. The > problem was really hard to reproduce, and I never once got it to > happen while in the debugger. I generally chalked it up to some > wierd problem that only I was seeing because of how I was running > ooRexx. > > Well, there are now two crazy people here, as Mike Cowlishaw has been > seeing the same thing in some of his programs. I, of course, have > been unable to reproduce it all, until Mike observed that it seemed to > occur more often when there was a load on his system. > > So, I instrumented the stream library looking to narrow down where the > spurious letter is coming from, started two small programs with do > forever loops to provide some background noise. Under these > conditions, I was able to trigger the problem again. I'm not sure I > like what I'm seeing. All of my instrumentation is pointing to this > coming directly from the C runtime _read() function. The return code > on the read is always a good line, but the character is coming in as > an 'r' rather than the typed character. > > At this point, I'm basically stuck for a fix. It would be a fairly > extensive rewrite to convert from using the C runtime functions to > direct Win API calls, so I really don't want to do that....and there's > no guarantee that it would even fix the problem. > > Mark, have you ever heard of such a situation? > > Rick > |