Skip to content
Tcl Source Code History Of Ticket 219191ffffffffff
Login

History Of Ticket 219191ffffffffff

Artifacts Associated With Ticket 219191ffffffffff

  1. Ticket change [52d2b12220] (rid 126386) by nobody on 2000-10-26 05:03:20:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. 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
      
    4. foundin initialized to: "final: 8.0.5"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "69. Other"
    10. title initialized to: "return in after script causes bogus bgerror"
    11. type initialized to: "Bug"
  2. Ticket change [2fa3d680e8] (rid 93091) by dkf on 2000-11-13 20:50:43:

    1. icomment:
      Return at the global level (which is where after scripts are executed) should always cause an error.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. subsystem changed to: "81. Bundled Packages"
    5. username: "dkf"
  3. Ticket change [f6392eb9a1] (rid 130261) by dgp on 2000-11-14 04:53:50:

    1. 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.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [8fd39304be] (rid 120343) by dkf on 2000-11-24 20:24:57:

    1. 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.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  5. Ticket change [5784627daf] (rid 94496) by dgp on 2001-04-05 08:03:55:

    1. subsystem changed to: "03. Timer Events"
  6. Ticket change [bc4fc0f18b] (rid 101727) by andreas_kupries on 2001-09-08 06:27:03:

    1. assignee changed to: "kennykb"
  7. Ticket change [19b83d34a2] (rid 122840) by dgp on 2001-09-10 11:48:17:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Note that TIP 56 is likely to fix this.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  8. Ticket change [9ca3b60f68] (rid 96178) by dgp on 2001-09-14 01:57:35:

    1. 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.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  9. Ticket change [3c6c05d579] (rid 120916) by dgp on 2001-09-14 03:28:11:

    1. 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.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  10. Ticket change [8bb211ba91] (rid 127611) by kennykb on 2001-11-28 07:05:46:

    1. 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].
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  11. Ticket change [dbe198cbaf] (rid 108041) by kennykb on 2002-03-19 04:56:22:

    1. assignee changed to: "dgp"
    2. 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.
      
      
    3. login: "kennykb"
    4. mimetype: "text/plain"
    5. username: "kennykb"
  12. Ticket change [314c138c39] (rid 93402) by dgp on 2003-04-28 22:36:22:

    1. 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.
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  13. Ticket change [de5b674802] (rid 114832) by dgp on 2004-09-20 04:14:06:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      TIP 221 is related to the issues
      attached to this report.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  14. Ticket change [99485bc20b] (rid 110762) by dgp on 2004-11-16 05:33:42:

    1. priority changed to: "8"
  15. Ticket change [7f90534210] (rid 97581) by dgp on 2007-09-07 01:13:23:

    1. closedate changed to: "2007-09-06T18:13:23"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      fixed in HEAD
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. subsystem changed to: "02. Event Loops"
    9. username: "dgp"