<br><br><div class="gmail_quote">On Sun, Dec 30, 2012 at 6:25 PM, Johnny Rosenberg <span dir="ltr"><<a href="mailto:gurus.knugum@gmail.com" target="_blank">gurus.knugum@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In a terminal (things in <> are instructions, don't type those…):<br>
$ cat > Musicians<br>
FALSE<br>
First Name<br>
FALSE<br>
Second Name<br>
FALSE<br>
Third Name<br>
<Press Ctrl+d><br>
$ zenity --list --title "Select musicians" --text="Some text"<br>
--column="Select" --column="Musician" --checklist --separator="\n"<br>
--height=480 --width=370 < Musicians<br>
<br>
The dialogue opens. Now hit OK or Cancel.<br>
<br>
Now, sometimes this works, but most of the time the dialogue freeze.<br>
The terminal shows the following:<br>
<br>
(zenity:3629): GLib-WARNING **:<br>
/build/buildd/glib2.0-2.32.3/./glib/giounix.c:411Error while getting<br>
flags for FD: Bad file descriptor (9)<br>
<br>
<br>
(zenity:3629): GLib-WARNING **:<br>
/build/buildd/glib2.0-2.32.3/./glib/giounix.c:411Error while getting<br>
flags for FD: Bad file descriptor (9)<br>
<br>
<br>
(zenity:3629): GLib-WARNING **:<br>
/build/buildd/glib2.0-2.32.3/./glib/giounix.c:411Error while getting<br>
flags for FD: Bad file descriptor (9)<br>
<br>
and so on.<br>
<br>
Ctrl+c in the terminal cancels the dialogue.<br>
<br>
So, what is this? User error or Zenity error? If user error, what did<br>
I do wrong? This worked in Ubuntu 10.10, at least better than in<br>
Ubuntu 12.04. I think I remember that it freeze in Ubuntu 10.10 too,<br>
but not almost every time, like it does in Ubuntu 12.04.<br>
<br>
<br>
Kind regards<br>
<span class="HOEnZb"><font color="#888888"><br>
Johnny Rosenberg<br>
$B%8%g%K!<!&%m!<%<%s%P!<%0(B</font></span></blockquote><div><br>Hi Johnny,<br>The bad file descriptor number 9 very likely refers to a pipe file descriptor.<br>The process on the other end of the pipe dies, and the process at the other end<br>
will not longer be able to read/write the pipe, and thus reports this error.<br>This is hapenning in the background, so you do not see it.<br><br>One way to get a total backtrace of all threads involved (and thus<br>determine which thread is exiting and thus closing it's FD's), is to<br>
run the command like so:<br><br>strace -tt -ff -o /tmp/zenity zenity --list --title "Select musicians" --text="Some text" --column="Select" --column="Musician" --checklist --separator="\n" --height=480 --width=370 < Musicians<br>
<br>The files in /tmp called zenity.<pid> will contain the per-pid system calls. Each system call<br>preceded by a full timestamp. This way you will be able to tell which thread exited or closed<br>the FD before the thread that wanted to read/write to it was hit with the error.<br>
<br> <br></div></div>