Tk Library Source Code

View Ticket
Login
Ticket UUID: 1492527
Title: bwidget - Dialog uses tk_messageBox: frozen gui.
Type: Bug Version: None
Submitter: nobody Created on: 2006-05-21 15:52:54
Subsystem: bwidget Assigned To: damonc
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2009-06-29 21:15:34
Resolution: Rejected Closed By: oehhar
    Closed on: 2009-06-29 14:15:34
Description:
Executing the attached code on wish from ActiveState 8.
4.[11,13] results
on an unresponsive gui when the user does something of 
this:

* click the Dialog's button labeled as "click me!". 
Then click the ok
  button on the messagebox. [Win2KSP4, ActiveState Tcl/
Tk 8.4.11].

* click the dialog's button labeled as "click me!", 
then click the
  Dialog's title bar, the click the Ok button on the
  messagebox. [WinXPSP2, ActiveState Tcl/Tk 8.4.13].

* click the dialog's button labeled as "click me!", the 
click the Ok
  button on the messagebox, click again the "click me!" 
button, click
  again the messagebox Ok button [WinXPSP2, ActiveState 
Tcl/Tk 8.4.13].

The OS/Tcl version combination is just the setup 
available to
me. Nothing beyond that was tested.
User Comments: oehhar added on 2009-06-29 21:15:34:
Hi,
thank you for reporting, it is reproductible on windows.
Considering the following code on windows tk without BWidget:
---
pack [button .b -text t -command "tk_messageBox"]
focus .b
raise .
grab -global .b
-EOF-
we get a similar deadlock effect.
As a workaround, I suggest to release the grab (or not use global grabs at all) before opening another window.

This is filed as tk bug  2814003

As a workaround, a tk_messageBox routine might be created like
set grabcur [grab]
if {"" ne $grabcur} {
    grab release $grabcur
}
tk_messageBox ...
if {"" ne $grabcur} {
    grab $grabcur
}

mic42 added on 2006-07-15 19:54:52:
Logged In: YES 
user_id=302287

Could only reproduce after a lot of clicking on the Buttons,
not just the few clicks you reported.

As you use Dialog -modal global this is probably a global
grab which is not released.

nobody added on 2006-05-21 22:52:55:

File Added - 178772: foo.tcl

Attachments: