Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2007-04-03
20:55 • Closed ticket [1693091fff]: Bug in event loop? plus 8 other changes artifact: fe40b1562a user: dgp
16:44 • Ticket [1693091fff]: 4 changes artifact: 8e2dee4bf6 user: fridolin
15:46 • Ticket [1693091fff]: 4 changes artifact: d8fe65fd08 user: fridolin
15:18 • Open ticket [1693091fff]. artifact: d3ce2245f2 user: fridolin
01:32 • Pending ticket [1693091fff]. artifact: 7111d103d9 user: dgp
2007-04-02
16:33 • New ticket [1693091fff]. artifact: 9aa497247f user: nobody

Bug in event loop?

Closed / Duplicate1693091fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2007-04-02 16:33:32
An application of mine which works great under Linux freezes under Windows. 

Under Windows I bound an event bind to a button an to the F11-Key.
Pressing the button works, but the F11-Key freezes my application.

Here is the simplest way show the bug.
You'll need cygwins "cat", because stdin/stdout must be pipes. Open a dos box.

c:\> cat | wish | cat
button .b -text b -command {puts hey} ; pack .b ; bind . <F11> {puts hey}

=> Button works, F11 shows no output.
Then send another newline to your dos box.
=> You'll see the missing heys
dgpplain2007-04-03 01:32:51
Logged In: YES 
user_id=80530
Originator: NO


You filed this bug for Tcl, but you use
wish to demonstrate the problem.

Are you sure the problem isn't really
in Tk/wish?

Can you make the demo with tclsh?

Better yet, can you make the demo
without Cygwin so we can be sure
the Cygwin project is not to blame?
fridolinplain2007-04-03 15:18:35
Logged In: YES 
user_id=13583
Originator: NO

I haven't found a demo for tclsh. Thus should I 
submit a new bug for tktoolkit?

Here is an example where cygwins cat is replaced by 
tclsh.

C:\>tclsh
%  set fd [open |wish r+]
file9ab2d0
%  fconfigure $fd -buffering none
%  fileevent $fd readable {puts [gets $fd]}
% puts $fd {button .b -text b -command {puts hey} ; pack .b ; bind . <F11> {put
 hey}}

# Then I press the button b three times

% update
hey
hey
hey

# Now I press F11

% update
%

Windows tells me "Application is not responding"
It's not specific to F11. Other keys show the same
behaviour.
fridolinplain2007-04-03 15:46:10
Logged In: YES 
user_id=13583
Originator: NO

This bug seems to be a duplicate of Tktoolik Bug #1572743.
fridolinplain2007-04-03 16:44:46
Logged In: YES 
user_id=13583
Originator: NO

There is a copy and paste error. Here is the corrected line:

% puts $fd {button .b -text b -command {puts hey} ; pack .b ; bind . <F11> {puts hey}}
dgpplain2007-04-03 20:55:05
Logged In: YES 
user_id=80530
Originator: NO


Thanks for tracking that down.
Closing as a duplicate.
Log in (anonymous is fine) to add a comment.