Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254811 - x11-misc/xdialog-2.2.1-r1 often freezes when backgrounded
Summary: x11-misc/xdialog-2.2.1-r1 often freezes when backgrounded
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Desktop Misc. Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-13 11:24 UTC by DEMAINE Benoît-Pierre, aka DoubleHP
Modified: 2010-06-06 16:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/tmp/emerge--info (emerge--info,11.06 KB, text/plain)
2009-01-13 11:26 UTC, DEMAINE Benoît-Pierre, aka DoubleHP
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DEMAINE Benoît-Pierre, aka DoubleHP 2009-01-13 11:24:07 UTC
This bugs happen to me when using Xdialog launched, either from a script ( background script for .xinitrc), or in Eterm/bash. My script is a bash script. My window manager is E17.

Someone on IRC told me that "similar" bug happen in the CLI version (dialog). Means, this bug seems to be E17, Eterm, and X idnependant.

Repro:
- open Eterm with bash
- run: Xdialog --infobox "message" 10 50 0 &
- move the window, out of the screen (side of screen), take it back (or cover and uncover)
- the content is not rederawn
- press ENTER in the console, it says "[2]+  Stopped".

Workaround: Xdialog --infobox "message" 10 50 99999999 &
but this will show a green button, i want a red one.

The dead window will be more or less difficult to kill depending on the WM.

Other case where similar behaviour happens (do not try to repro this if you first could not repro the first one):
{ echo plop1 ; sleep 5 ; echo plop2 ; } | Xdialog --logbox - 10 50 &
during the sleep 5, move the window, and see that content is not refreshed. The bug fades away after the input is closed (no clue why): bug occurs while dialog is waiting for input, and stops when input stream terminates. Then, after plop2, content is refreshed as expected.

***

I am in hurry to find WA; i tried things like
( { echo plop1 ; sleep 5 ; echo plop2 ; } | Xdialog --logbox - 10 50 ) &

To get content refreshed after "bash -c "Xdialog --infobox "message" 10 50 0" &" the procedure is easy:
- type fg, and terminate it with ENTER
- press ENTER a second time: window is rederawn

The IRC guy said me that *dialog are waiting for some input.

***

Ah, found tricks:
( sleep 99 | Xdialog --infobox "message" 10 50 0 ) &
{ sleep 99 | Xdialog --infobox "message" 10 50 0 ; } &

But cant find any similar trick for --logbox ...
Comment 1 DEMAINE Benoît-Pierre, aka DoubleHP 2009-01-13 11:26:53 UTC
Created attachment 178345 [details]
/tmp/emerge--info

(not sure how emerge --info can help)

dhp@moon-gen-3:~$ emerge -vp xdialog
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild   R   ] x11-misc/xdialog-2.2.1-r1  USE="nls" 0 kB
Total: 1 package (1 reinstall), Size of downloads: 0 kB
dhp@moon-gen-3:~$

Good luck.
Comment 2 DEMAINE Benoît-Pierre, aka DoubleHP 2009-01-13 11:31:26 UTC
found a strange behaviour:

{ sleep 5 | Xdialog --infobox "message" 10 50 0 ; } &

This explains why Xdialog waits for input, and can stall when backgrouded ... 
Comment 3 DEMAINE Benoît-Pierre, aka DoubleHP 2009-01-13 11:45:55 UTC
better trick:
sleep 99 | Xdialog --infobox "message" 10 50 0 &
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2009-01-14 15:37:06 UTC
It looks to me like Xdialog is merely waiting for stdin to close and unfreezes very nicely when that condition is met.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2010-06-06 16:23:07 UTC
I don't see a bug here... it's how Jeroen explained, imho.