Skip to content
Tcl Source Code History Of Ticket 835020ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 835020ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 835020ffffffffffffffffffffffffffffffffff

  1. Ticket change [6160801c86] (rid 92232) by pbiereic on 2003-11-03 13:29:51:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Tcl version: 8.4.3
      OS platform: Redhat 9, Solaris 2.8, SuSE 8, HP-UX 11
      
      Problem behaviour: "lassign" does not store the value
        of the member variable x in method "store" (see
        sample code).
        Running the sample code will print "0" on 8.4.3
        and "2" on previous versions.
        If the member variable x is referenced (e.g. with
        "set a $x" then 8.4.3 will print the correct value.
      
      Expected Behavior: as for previous tcl (tclx) versions
        
      Concise Code Sample:
      
      package require Tclx
      package require Itcl
      
      itcl::class T {
          protected variable x 0
      
          constructor {args} {
      store
      print
          }
          protected method store {} {
      lassign 2 x
                   # set a $x
          }
          protected method print {} {
      puts $x
          }
      }
      
      T t
      
      
    4. foundin initialized to: "obsolete: 8.4.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "pbiereic"
    9. subsystem initialized to: "07. Variables"
    10. title initialized to: "lassign to member variables in itcl methods"
    11. type initialized to: "Bug"
  2. Ticket change [d754f41683] (rid 123964) by msofer on 2003-11-04 00:16:53:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      It looks like it could be a symptom of bug
      https://sourceforge.net/tracker/index.php?func=detail&aid=631741&group_id=10894&atid=110894
      which is fixed in Tcl8.4.4
      
      Does upgrading solve the issue?
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  3. Ticket change [3e5c6d0e7a] (rid 121250) by pbiereic on 2003-11-04 02:25:53:

    1. icomment:
      Logged In: YES 
      user_id=422762
      
      Using Tcl 8.4.4 did not solve the issue.
      
      
    2. login: "pbiereic"
    3. mimetype: "text/plain"
    4. username: "pbiereic"
  4. Ticket change [650f06ec24] (rid 92879) by msofer on 2003-11-04 05:11:12:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      TclX's lassign does a lookup by name, as
      Tcl_SetVar2Ex(interp, Tcl_GetStringFromObj(objv [idx],
      NULL), NULL, elemPtr, TCL_PARSE_PART1 | TCL_LEAVE_ERR_MSG) 
      
      Apparently the problem is in how itcl varname resolver
      interact with the new tclVar code in this particular case;
      more research needed ...
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  5. Ticket change [dff435e759] (rid 115109) by eallaert on 2003-11-14 15:03:30:

    1. icomment:
      Logged In: YES 
      user_id=204408
      
      This problem appears also for TclX's "keylset" command,
      its "loop" command and any other command that is using
      a var-name as an argument.
      
      So the problem has unfortunately a much wider scope than 
      originally reported.
      
      
      
    2. login: "eallaert"
    3. mimetype: "text/plain"
    4. username: "eallaert"
  6. Ticket change [ad33c23bc2] (rid 101432) by msofer on 2003-11-20 23:50:09:

    1. foundin changed to: "obsolete: 8.4.4"
  7. Ticket change [dd0564b5ea] (rid 114587) by msofer on 2003-11-20 23:50:10:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Eril Allaert reports in clt (verified with 8.4.4):
      Try the following script, using tclsh:
      
        package require Itcl
        package require Tclx
      
        itcl::class Test {
            variable x 0
            variable y 0
      
            constructor {args} {
                prep;                # this should modify x and y ...
                puts "$x [incr y]";  # ... which should be
      noticeable here
            }
            method prep {} {
                loop x 1 3 {puts "$x [incr y]"}
                puts "local vars: >[info locals]<"
            }
        }
      
        Test t
      
      Expected output: 4 lines containing resp "1 1", "2 2",
      "local vars: ><"
      and "3 3". You get exactly that with Tcl 8.3.4, [incr Tcl]
      3.2 and
      TclX 8.3.5. But with Tcl 8.4.3, iTcl 3.3 and TclX 8.4 the
      last line
      is "0 3", and the one before "local vars: >x<". Same if Tcl
      is upgraded
      to Tcl 8.4.4.
      
      Replacing TclX's loop command in the method prep by any of
      the 17 other
      TclX commands that require a variable name as argument
      demonstrates the
      same problem. The work-around to get this working again as
      expected is
      to have at least one standard Tcl command referring to this
      variable
      (e.g. "set x") anywhere within this prep method. This was
      reported as
      bug 835020 on SF, but initially mentioned only TclX's
      "lassign" command.
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. priority changed to: "8"
    5. username: "msofer"
  8. Ticket change [bc8e095b78] (rid 101770) by dkf on 2003-11-21 01:09:44:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Miguel's tracked this down to a clash between
      LOOKUP_FOR_UPVAR and TCL_PARSE_PART1
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  9. Ticket change [3c70f3fcf4] (rid 120919) by msofer on 2003-11-21 01:50:37:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Bug found, fix committed to HEAD (8.5a0). It is possibly too
      late to get this fixed in 8.4.5, already frozen ...
      
      If you are compiling tcl from source: the fix is changing in
      generic/tclVar.c the flag value LOOKUP_FOR_UPVAR to 0x40000
      (to avoid a collision with the deprecated TCL_PARSE_PART1,
      used throughout TclX).
      
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  10. Ticket change [5078ee01a0] (rid 125976) by msofer on 2003-11-21 01:52:07:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Leaving open until tests for this bug are added to the testsuite
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. priority changed to: "4"
    5. username: "msofer"
  11. Ticket change [9b23b950b3] (rid 111070) by eallaert on 2003-11-21 19:32:02:

    1. icomment:
      Logged In: YES 
      user_id=204408
      
      I've tried the fix given by Miguel (changing
      LOOKUP_FOR_UPVAR in the file tclVar.c) on Tcl 8.4.3 and Tcl
      8.4.4. I confirm that it fixes the problem as reported.
      
      
    2. login: "eallaert"
    3. mimetype: "text/plain"
    4. username: "eallaert"
  12. Ticket change [10b33bd8c7] (rid 95005) by msofer on 2004-03-27 04:57:02:

    1. closedate changed to: "2004-03-26T21:57:02"
    2. closer changed to: "msofer"
    3. icomment:
      Logged In: YES 
      user_id=148712
      
      No pure-tcl test possible, I'm afraid. If anybody's got an
      idea ...
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Pending"
    8. username: "msofer"
  13. Ticket change [ed22514d68] (rid 103825) by dkf on 2004-03-29 16:16:41:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Exercising the API with the fault should be done via the
      tcltest binary even though the actual fault requires Itcl as
      well.
      
      8.5 won't hit this with lassign, since that command has been
      completely reimplemented there.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "dkf"
  14. Ticket change [7836572648] (rid 89917) by msofer on 2004-03-30 09:39:16:

    1. closedate changed to: "2004-03-30T02:39:16"
    2. closer changed to: "msofer"
    3. icomment:
      Logged In: YES 
      user_id=148712
      
      Change of opinion: I do not think that a test for this
      particular flag collision's symptoms is necessary or
      interesting. Closing.
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "msofer"