Bug 4483 - Terminal Window gets random garbage
Summary: Terminal Window gets random garbage
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Rick Moseley
URL:
Keywords:
Depends on:
Blocks: 1633 4193
  Show dependency treegraph
 
Reported: 2007-05-10 16:03 UTC by Rick Moseley
Modified: 2007-06-01 19:41 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Screenshot of garbage in terminal window (39.00 KB, image/png)
2007-05-10 16:12 UTC, Rick Moseley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Moseley 2007-05-10 16:03:14 UTC
After bringing up a terminal window that has STDIN, STDOUT, STDERR for a process
I activated using the "Run Executable" selection from the source window "File"
pulldown, random garbage gets sent to it which looks like DWARF output of some
sort, but it is so garbled I cannot tell exactly what it is.  Looking at the
process' "/proc/PID/fd" directory I see that indeed STNDIN, STDOUT, STDERR got
correctly assigned as I see this:

 ls -la /proc/3698/fd
total 0
dr-x------ 2 rmoseley rmoseley  0 May 10 09:42 .
dr-xr-xr-x 5 rmoseley rmoseley  0 May 10 09:39 ..
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 0 -> /dev/pts/11
l-wx------ 1 rmoseley rmoseley 64 May 10 09:47 1 -> /dev/pts/11
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 10 -> pipe:[13003]
l-wx------ 1 rmoseley rmoseley 64 May 10 09:47 11 -> pipe:[13003]
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 14 -> /bin/bash
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 15 -> /lib/libc-2.4.so
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 16 -> /bin/bash
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 17 -> /bin/bash
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 18 -> /bin/bash
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 19 -> /bin/bash
l-wx------ 1 rmoseley rmoseley 64 May 10 09:42 2 -> /dev/pts/11
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 20 -> /bin/bash
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 21 -> /bin/bash
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 22 -> /bin/bash
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 23 -> /bin/bash
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 24 -> /bin/bash
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 25 -> /bin/bash
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 26 -> /bin/bash
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 27 -> /bin/bash
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 28 -> /lib/libc-2.4.so
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 29 -> /bin/bash
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 30 -> pipe:[13110]
l-wx------ 1 rmoseley rmoseley 64 May 10 09:47 31 -> pipe:[13110]
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 32 -> pipe:[13111]
l-wx------ 1 rmoseley rmoseley 64 May 10 09:47 33 -> pipe:[13111]
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 34 -> pipe:[13112]
l-wx------ 1 rmoseley rmoseley 64 May 10 09:47 35 -> pipe:[13112]
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 36 -> pipe:[13113]
l-wx------ 1 rmoseley rmoseley 64 May 10 09:47 37 -> pipe:[13113]
lr-x------ 1 rmoseley rmoseley 64 May 10 09:47 43 -> inotify
lrwx------ 1 rmoseley rmoseley 64 May 10 09:47 44 -> /dev/ptmx

As can be seen, FD's 0,1,2 point to /dev/pts/11 which is correct.  I will attach
a screenshot of what comes out on the terminal window in a few.
Comment 1 Rick Moseley 2007-05-10 16:12:09 UTC
Created attachment 1781 [details]
Screenshot of garbage in terminal window

Here is a screenshot of the garbage that appears randomly in the terminal
window.  I will add that I do not have to do anything to have the garbage
appear.  I can just bring up the window and if the garbage does not appear
immediately, it usuaaly does after a minute or two.  You can facilitate the
garbage output by stopping the process and stepping it a few times.

Also, it looks like pretty much the same garbage every time.
Comment 2 Rick Moseley 2007-05-10 19:06:18 UTC
Hmmmm, I just tried an experiment by hardcoding the STDIN/OUT/ERR to a known
/dev/pts that is running a bash shell and I cannot get any garbage characters
sent to that.  Weird.
Comment 3 Rick Moseley 2007-06-01 19:41:05 UTC
Fixed in CVS head in TermWindow.java and SourceWindow.java.  The terminal was
being garbage-collected because the object that created it was not persistent.