Skip Menu |
 

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 90266
Status: open
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: Daniel.Richards [...] onsemi.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Bug with Dialog/DialogBox
Date: Mon, 11 Nov 2013 21:07:39 +0000
To: "bug-Tk [...] rt.cpan.org" <bug-Tk [...] rt.cpan.org>
From: Daniel Richards <Daniel.Richards [...] onsemi.com>
Download (untitled) / with headers
text/plain 1.5k
Recently I was trying out Tk::TOTD, and came across a bug. Initially, I thought it was just their problem, but after they investigated it, it turns out to be a problem with the Dialog/DialogBox module. The bug: Whenever I have a Dialog/DialogBox open and close the main window with the x button, the script does not close gracefully. In other words, control is not given back to the shell that called the script. This bug is reproducible in the code below. As I mentioned, it happens with either Dialog or DialogBox. #!/usr/bin/env perl use Tk; use strict; use warnings; my $mw = MainWindow->new; my $dialog = $mw->Dialog(-default_button => 'Yes', -buttons => [qw/Yes No Cancel/]); $dialog->Show; MainLoop; Casey Kirsle, of Tk::TOTD, responded with this to say (along with the original bug report): <URL: https://rt.cpan.org/Ticket/Display.html?id=90045 > This seems to be a problem in Tk::DialogBox, which Tk::TOTD uses on the back-end. I think the root problem is, again, that Tk::DialogBox uses waitVariable to determine when to close the dialog window, so when the dialog is open and you close the MainWindow behind its back, the variable it's waiting on is never updated, so the program doesn't exit. You might try opening a bug report for Tk::DialogBox to fix this underlying problem. Casey also provided a workaround, also shown in the bug report. Hopefully this will help you find the problem. Daniel Richards Intern ON Semiconductor Corp R&D Integration Email: daniel.richards@onsemi.com Work: 208-233-4690 x6316
On 2013-11-11 16:07:53, Daniel.Richards@onsemi.com wrote: Show quoted text
> Recently I was trying out Tk::TOTD, and came across a bug. Initially, > I thought it was just their problem, but after they investigated it, > it turns out to be a problem with the Dialog/DialogBox module. > > The bug: Whenever I have a Dialog/DialogBox open and close the main > window with the x button, the script does not close gracefully. In > other words, control is not given back to the shell that called the > script. This bug is reproducible in the code below. As I mentioned, it > happens with either Dialog or DialogBox. > #!/usr/bin/env perl > use Tk; > use strict; > use warnings; > my $mw = MainWindow->new; > my $dialog = $mw->Dialog(-default_button => 'Yes', -buttons => [qw/Yes > No Cancel/]); > $dialog->Show; > MainLoop; > > Casey Kirsle, of Tk::TOTD, responded with this to say (along with the > original bug report): > > <URL: https://rt.cpan.org/Ticket/Display.html?id=90045 > > > > > This seems to be a problem in Tk::DialogBox, which Tk::TOTD uses on > the back-end. > > > > I think the root problem is, again, that Tk::DialogBox uses > waitVariable to determine when to close the dialog window, so when the > dialog is open and you close the MainWindow behind its back, the > variable it's waiting on is never updated, so the program doesn't > exit. You might try opening a bug report for Tk::DialogBox to fix this > underlying problem. > Casey also provided a workaround, also shown in the bug report. > > Hopefully this will help you find the problem.
Hi Daniel, the problem sounds familiar, and indeed this problem was already solved: commit 844575816d66be7bcfb1d9b2094ab600c276e8b3 Author: Slaven Rezic <slaven@rezic.de> Date: Tue Jul 10 22:05:43 2007 +0000 Make sure waitVariable exits if a waiting dialog is destroyed, with interactive tests But it seems that it happens again, maybe due to changes in perl's internals. Unfortunately the tests are only interactive and don't run by default, so nobody noticed when things broke again :-( Regards, Slaven
Subject: RE: [rt.cpan.org #90266] Bug with Dialog/DialogBox
Date: Fri, 15 Nov 2013 22:53:24 +0000
To: "bug-Tk [...] rt.cpan.org" <bug-Tk [...] rt.cpan.org>
From: Daniel Richards <Daniel.Richards [...] onsemi.com>
Download (untitled) / with headers
text/plain 2.8k
Understandable. I'm not surprised that things would break when Perl changes. Must be a pretty recent change, as my version of Perl was released last year. I haven't tested the latest version(s) yet. For what it's worth, I'm using Perl 5.16.0 on x86_64-linux, and my Tk::Dialog and Tk::DialogBox are up to date (4.005 and 4.016, respectively). Hope this helps. Daniel Richards Intern ON Semiconductor Corp R&D Integration Email: daniel.richards@onsemi.com Work: 208-233-4690 x6316 Show quoted text
-----Original Message----- From: Slaven_Rezic via RT [mailto:bug-Tk@rt.cpan.org] Sent: Friday, November 15, 2013 3:42 PM To: Daniel Richards Subject: [rt.cpan.org #90266] Bug with Dialog/DialogBox <URL: https://rt.cpan.org/Ticket/Display.html?id=90266 > On 2013-11-11 16:07:53, Daniel.Richards@onsemi.com wrote:
> Recently I was trying out Tk::TOTD, and came across a bug. Initially, > I thought it was just their problem, but after they investigated it, > it turns out to be a problem with the Dialog/DialogBox module. > > The bug: Whenever I have a Dialog/DialogBox open and close the main > window with the x button, the script does not close gracefully. In > other words, control is not given back to the shell that called the > script. This bug is reproducible in the code below. As I mentioned, it > happens with either Dialog or DialogBox. > #!/usr/bin/env perl > use Tk; > use strict; > use warnings; > my $mw = MainWindow->new; > my $dialog = $mw->Dialog(-default_button => 'Yes', -buttons => [qw/Yes > No Cancel/]); > $dialog->Show; > MainLoop; > > Casey Kirsle, of Tk::TOTD, responded with this to say (along with the > original bug report): > > <URL: https://rt.cpan.org/Ticket/Display.html?id=90045 > > > > > This seems to be a problem in Tk::DialogBox, which Tk::TOTD uses on > the back-end. > > > > I think the root problem is, again, that Tk::DialogBox uses > waitVariable to determine when to close the dialog window, so when the > dialog is open and you close the MainWindow behind its back, the > variable it's waiting on is never updated, so the program doesn't > exit. You might try opening a bug report for Tk::DialogBox to fix this > underlying problem. > Casey also provided a workaround, also shown in the bug report. > > Hopefully this will help you find the problem.
Hi Daniel, the problem sounds familiar, and indeed this problem was already solved: commit 844575816d66be7bcfb1d9b2094ab600c276e8b3 Author: Slaven Rezic <slaven@rezic.de> Date: Tue Jul 10 22:05:43 2007 +0000 Make sure waitVariable exits if a waiting dialog is destroyed, with interactive tests But it seems that it happens again, maybe due to changes in perl's internals. Unfortunately the tests are only interactive and don't run by default, so nobody noticed when things broke again :-( Regards, Slaven
Download (untitled) / with headers
text/plain 579b
On 2013-11-15 17:53:39, Daniel.Richards@onsemi.com wrote: Show quoted text
> Understandable. I'm not surprised that things would break when Perl > changes. Must be a pretty recent change, as my version of Perl was > released last year. I haven't tested the latest version(s) yet. > > For what it's worth, I'm using Perl 5.16.0 on x86_64-linux, and my > Tk::Dialog and Tk::DialogBox are up to date (4.005 and 4.016, > respectively). Hope this helps.
I can reproduce the problem with perl 5.14.4 on a freebsd box, and there's no problem with perl 5.10.x on a centos 6.4 box. Regards, Slaven
Subject: RE: [rt.cpan.org #90266] Bug with Dialog/DialogBox
Date: Fri, 15 Nov 2013 23:49:19 +0000
To: "bug-Tk [...] rt.cpan.org" <bug-Tk [...] rt.cpan.org>
From: Daniel Richards <Daniel.Richards [...] onsemi.com>
Download (untitled) / with headers
text/plain 1.3k
Ah, so somewhere between 10 and 14 it broke. 5.10.0 was released at the end of 2007; 5.10.1 was released in 2009; 5.12.0 was released in early 2010; 5.14.0 in 2011; 5.12.5 at end of 2012; and 5.14.4 early 2013. I got this from http://www.cpan.org/src/ Hopefully that helps narrow down the culprit. Btw, I'm on a Red Hat 5 box, if that makes a difference. Daniel Richards Intern ON Semiconductor Corp R&D Integration Email: daniel.richards@onsemi.com Work: 208-233-4690 x6316 Show quoted text
-----Original Message----- From: Slaven_Rezic via RT [mailto:bug-Tk@rt.cpan.org] Sent: Friday, November 15, 2013 4:39 PM To: Daniel Richards Subject: [rt.cpan.org #90266] Bug with Dialog/DialogBox <URL: https://rt.cpan.org/Ticket/Display.html?id=90266 > On 2013-11-15 17:53:39, Daniel.Richards@onsemi.com wrote:
> Understandable. I'm not surprised that things would break when Perl > changes. Must be a pretty recent change, as my version of Perl was > released last year. I haven't tested the latest version(s) yet. > > For what it's worth, I'm using Perl 5.16.0 on x86_64-linux, and my > Tk::Dialog and Tk::DialogBox are up to date (4.005 and 4.016, > respectively). Hope this helps.
I can reproduce the problem with perl 5.14.4 on a freebsd box, and there's no problem with perl 5.10.x on a centos 6.4 box. Regards, Slaven
Subject: RE: [rt.cpan.org #90266] Bug with Dialog/DialogBox
Date: Sat, 16 Nov 2013 00:02:52 +0000
To: "bug-Tk [...] rt.cpan.org" <bug-Tk [...] rt.cpan.org>
From: Daniel Richards <Daniel.Richards [...] onsemi.com>
And I can confirm, for what it's worth, that the bug still exists in 5.18.1. Daniel Richards Intern ON Semiconductor Corp R&D Integration Email: daniel.richards@onsemi.com Work: 208-233-4690 x6316 Show quoted text
-----Original Message----- From: Slaven_Rezic via RT [mailto:bug-Tk@rt.cpan.org] Sent: Friday, November 15, 2013 4:39 PM To: Daniel Richards Subject: [rt.cpan.org #90266] Bug with Dialog/DialogBox <URL: https://rt.cpan.org/Ticket/Display.html?id=90266 > On 2013-11-15 17:53:39, Daniel.Richards@onsemi.com wrote:
> Understandable. I'm not surprised that things would break when Perl > changes. Must be a pretty recent change, as my version of Perl was > released last year. I haven't tested the latest version(s) yet. > > For what it's worth, I'm using Perl 5.16.0 on x86_64-linux, and my > Tk::Dialog and Tk::DialogBox are up to date (4.005 and 4.016, > respectively). Hope this helps.
I can reproduce the problem with perl 5.14.4 on a freebsd box, and there's no problem with perl 5.10.x on a centos 6.4 box. Regards, Slaven


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.