Artifacts Associated With Ticket 219191ffffffffff
Ticket change [52d2b12220] (rid 126386) by nobody on 2000-10-26 05:03:20:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 2577 Bug Version: 8.0.5 SubmitDate: '1999-08-18' LastModified: '2000-04-03' Severity: SER Status: Assigned Submitter: techsupp ChangedBy: hobbs RelatedBugIDs: 3998 750 OS: Solaris OSVersion: 2.5.1 Machine: Other FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: Tedd Hadley Comments: The reason for the error seems to be code in tclTimer.c AfterProc: result = afterPtr->command); if (result != TCL_OK) { Tcl_AddErrorInfo(interp, "\n (\"after\" script)"); Tcl_BackgroundError(interp); } Tcl_GlobalEval can, of course, return a value other than TCL_OK without it being TCL_ERROR -- TCL_RETURN in this case. I patched my version by changing the condition to if(result == TCL_ERROR). This may or may not be the right fix... ReproducibleScript: after 0 { return } update ObservedBehavior: return in an after script causes a fake error. DesiredBehavior: No error expected wish4.2 didn't complain, but 8.0+ does. -- 04/03/2000 hobbs - foundin initialized to: "final: 8.0.5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to: "return in after script causes bogus bgerror"
- type initialized to: "Bug"
Ticket change [2fa3d680e8] (rid 93091) by dkf on 2000-11-13 20:50:43:
- icomment:
Return at the global level (which is where after scripts are executed) should always cause an error.
- login: "dkf"
- mimetype: "text/plain"
- subsystem changed to: "81. Bundled Packages"
- username: "dkf"
- icomment:
Ticket change [f6392eb9a1] (rid 130261) by dgp on 2000-11-14 04:53:50:
- icomment:
I disagree that [return] should throw an error at level #0. That's not what the docs say. From return(n): ... DESCRIPTION Return immediately from the current procedure (or top-level command or source command), with string as the return value. ... [return] has behaved this way at least as long as I've used Tcl (since Tcl 7.4), and I've seen plenty of code that depends on this behavior. Notably the use of [return] to exit a pkgIndex.tcl file before the end of file is quite useful. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [8fd39304be] (rid 120343) by dkf on 2000-11-24 20:24:57:
- icomment:
And if the [return] *is* the current top-level command? In that case, I read the description as being functionally equivalent to something that just has a result of the given string (like [format %s $string] for example.) IMHO, what [return] does is make the current context terminate with the given message/code/errorInfo/errorCode. But what this means at the top-level is a little unclear to me.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [5784627daf] (rid 94496) by dgp on 2001-04-05 08:03:55:
- subsystem changed to: "03. Timer Events"
Ticket change [bc4fc0f18b] (rid 101727) by andreas_kupries on 2001-09-08 06:27:03:
- assignee changed to: "kennykb"
Ticket change [19b83d34a2] (rid 122840) by dgp on 2001-09-10 11:48:17:
- icomment:
Logged In: YES user_id=80530 Note that TIP 56 is likely to fix this.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [9ca3b60f68] (rid 96178) by dgp on 2001-09-14 01:57:35:
- icomment:
Logged In: YES user_id=80530 I was wrong. TIP 56 had no effect. The original report identified the cause. Either we should allow TCL_RETURN to be the return code from an after script, or when we see it, we should generate an error message stating that it is not allowed. As is, the empty error message due to no TCL_ERROR does not help.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [3c6c05d579] (rid 120916) by dgp on 2001-09-14 03:28:11:
- icomment:
Logged In: YES user_id=80530 OK, now I'm having second thoughts about this specific bug report. The "Reproducible Script" submitted above throws an error in Tcl 7.5 and 7.6 as well as in 8.x. As Jeff reports above, things are different in Tk 4.2. I think it's an improvement that Tk 8 is consistent with Tcl 8, and the incompatible change did occur at a major version increment for Tk. I think there's still a bug here in the form of the empty error message. That should be corrected. Beyond that, if there's still a constituency out there for accepting TCL_RETURN as the result of evaluation of an [after] script, they ought to file a feature request.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [8bb211ba91] (rid 127611) by kennykb on 2001-11-28 07:05:46:
- icomment:
Logged In: YES user_id=99768 We have deeper inconsistencies. Consider: % break invoked "break" outside of a loop % return -code break invoked "break" outside of a loop % continue invoked "continue" outside of a loop % return -code continue invoked "continue" outside of a loop % return % return -code return command returned bad code: 2 Any of the above six commands result in a bgerror with a null message when invoked from [after].
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
- icomment:
Ticket change [dbe198cbaf] (rid 108041) by kennykb on 2002-03-19 04:56:22:
- assignee changed to: "dgp"
- icomment:
Logged In: YES user_id=99768 Don Porter says that he plans to look at this stuff in the context of TIP #90: it hits some of the same areas in the code.
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
Ticket change [314c138c39] (rid 93402) by dgp on 2003-04-28 22:36:22:
- icomment:
Logged In: YES user_id=80530 TIP 90 does not change these things. This is an effect of TCL_RETURN being handled by TclUpdateReturnInfo if it is seen at the toplevel only. Wish event loop operates at toplevel; event loops in commands like [update] or [vwait] do not.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [de5b674802] (rid 114832) by dgp on 2004-09-20 04:14:06:
- icomment:
Logged In: YES user_id=80530 TIP 221 is related to the issues attached to this report.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [99485bc20b] (rid 110762) by dgp on 2004-11-16 05:33:42:
- priority changed to: "8"
Ticket change [7f90534210] (rid 97581) by dgp on 2007-09-07 01:13:23:
- closedate changed to: "2007-09-06T18:13:23"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Originator: NO fixed in HEAD
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- subsystem changed to: "02. Event Loops"
- username: "dgp"