This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
dev build 200305030100 Sun JDK 1.4.1 Run the attached testcase under command-line and under the Netbeans terminal emulator. You will notice that the testcase always runs fine under cmdline but seems to exibit race conditions under the terminal emulator. Expected behavior: 1) Upon getting the "prompt>", type "test<enter>" 2) App will then respond: "got: test" and terminate Actual behavior: 1) If "test<enter>" is entered quickly, the correct behavior occurs. 2) If you wait 3 seconds before entering "test<enter>", in.readLine() never seems to terminate so the app keeps on taking in input forever. See attached testcase.
Created attachment 10215 [details] Testcase
Adding Ivan to cc.
Is the OS truly OS/2? Is it _only_ failing on OS/2? Can you reproduce this on some other more easily available platform? Is this happening with internal or external execution? Both?
OS is really OS/2 :) Executation is external. Please try reproducing this on your machine as I don't have Windows handy here. If you still can't reproduce it on your end I will investigate it further under OS/2. Thanks, Gili
I can't reproduce it on Solaris and I don't have access to an OS/2 machine, nor even easy access to windows :-(. I can give you some guidelines as to what to look for: In org.netbeans.core.output.OutputTabTerm is a nested class TIListener with methods sendChar() and sendChars(). When you type input these methods should be called. These in turn calls java.io.PipedWriter.write() which will get buffered in the pipe. The other side of the pipe is inReader which is returned by OutputTabTerm.getIn(). This inReader gets connected to some thread in the Executor module that has a worker thread (I think) that passes on the characters from the pipe to the externally executing child process. My suspicion of the race condition would therefor be in how the Executor module sets up these connections, but we should frst double-check that Term and OutputTabTerm actually pass on the typed characters to the pipe/
Ivan - do you want to take this issue? I don't know as much about the problem, and it sounds like you've at least looked at it.
Clearing STARTED status on this issue - nobody here has an OS/2 machine to test against, so I'm not going to be able to work on this. If and when OutputTabTerm is rewritten (see issue 28297), the problem will probably clear up - the current code is over-synchronized.
Reassigning to Marek, new owner of output window and help system
Marek, Would it make sense to thest this issue against the NB 4.0 dev builds. I have an OS/2 here. ;-)
Output window is rewritten. Terminal emulator is not used anymore in NB 4.0. We keep this issue open to track terminal emulator issues.
Got an OK from submitter to close this.
closed