Skip to content
Tcl Source Code History Of Ticket 217978
Login

History Of Ticket 217978

Artifacts Associated With Ticket 217978

  1. Ticket change [327538d7ae] (rid 93613) by nobody on 2000-10-26 00:47:05:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 5373 Bug
      Version: 8.3.1
      SubmitDate: '2000-05-05'
      LastModified: '2000-06-25'
      Severity: MED
      Status: Closed
      Submitter: techsupp
      ChangedBy: ericm
      RelatedBugIDs: 5845
      OS: Solaris
      OSVersion: solaris2.6, linux2.x
      Machine: sun-ultra5, pentium 686
      FixedDate: '2000-06-25'
      ClosedDate: '2000-10-25'
      
      
      Name:
      Hemang Lavana
      
      ReproducibleScript:
      I am experimenting with the "interp hide" and "interp invokehidden"
      commands. I do the following (see the attached example script):
        1. create a child interpreter
        2. load Tk package into the child interpreter
        3. hide the "button" command
        4. create an alias to a proc, called "button" in child interpreter,
            that uses "interp invokehidden" command to invoke the
            original (hidden) button command. It also prints a message
            to stdout whenever button command is called
        5. Create and pack buttons in the child interpreter.
      
      ----------------------
      # interphide.tk
      
      #wm iconify .
      set iid [interp create]
      load {} Tk $iid
      
      set tkcmds "button label"
      
      foreach cmd $tkcmds {
        $iid hide $cmd
        $iid alias $cmd createWidget $iid $cmd
      }
      
      proc createWidget {iid cmd pathname args} {
        set ret [uplevel 1 $iid invokehidden $cmd $pathname $args]
        puts stdout "$cmd $pathname $args, RETURNS=$ret."
        $iid hide $pathname
        $iid alias $pathname invokePathname $iid $pathname
        return $ret
      } ;# End of proc createWidget
      
      proc invokePathname {iid pathname args} {
        set ret [uplevel 1 $iid invokehidden $pathname $args]
        puts stdout "$pathname $args, RETURNS=$ret."
        return $ret
      } ;# End of proc invokePathname
      
      $iid eval {
        pack [button .b1 -text "Button B1" -command {puts .b1}]
        pack [button .b2 -text "Button B2" -command {puts .b2}]
      #  pack [label .l1 -text "label 1"]
      #  pack [label .l2 -text "label 2"]
      }
      # interphide.tk
      
      #wm iconify .
      set iid [interp create]
      load {} Tk $iid
      
      set tkcmds "button label"
      
      foreach cmd $tkcmds {
        $iid hide $cmd
        $iid alias $cmd createWidget $iid $cmd
      }
      
      proc createWidget {iid cmd pathname args} {
        set ret [uplevel 1 $iid invokehidden $cmd $pathname $args]
        puts stdout "$cmd $pathname $args, RETURNS=$ret."
        $iid hide $pathname
        $iid alias $pathname invokePathname $iid $pathname
        return $ret
      } ;# End of proc createWidget
      
      proc invokePathname {iid pathname args} {
        set ret [uplevel 1 $iid invokehidden $pathname $args]
        puts stdout "$pathname $args, RETURNS=$ret."
        return $ret
      } ;# End of proc invokePathname
      
      $iid eval {
        pack [button .b1 -text "Button B1" -command {puts .b1}]
        pack [button .b2 -text "Button B2" -command {puts .b2}]
      #  pack [label .l1 -text "label 1"]
      #  pack [label .l2 -text "label 2"]
      }
      -----------------------------
      
      When I invoke this script with wish8.3.1, I get a segmentation fault/bus
      error if I try to create more than one button. I do not get this errror, when
      invoked with wish8.0.5.
      
      u11> uname -a
      SunOS hlavana-u5 5.6 Generic_105181-10 sun4u sparc SUNW,Ultra-5_10
      
      u12> wish8.3 interhide.tk
      button .b1 -text {Button B1} -command {puts .b1}, RETURNS=.b1
      Bus error
      
      u13> wish8.0 interphide.tk
      button .b1 -text {Button B1} -command {puts .b1}, RETURNS=.b1
      button .b2 -text {Button B2} -command {puts .b2}, RETURNS=.b2
      ^C
      u14>
      
      ObservedBehavior:
      The "interp invokehidden" creates a bus error, whenever more than one button is
      created in the child interpreter. Similar results occur for other widgets too - I have
      observed this behavior for with "label" widget.
      
      This behavior is also noticed on linux2.x version (I don't recall the exact version number,
      but it was linux-mandrade 7.0). I have not tested on winNT/9x yet.
      
      DesiredBehavior:
      No "segmentation fault/bus error".
      
      
      
      
      
    4. foundin initialized to: "obsolete: 8.3.1"
    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: "interp hide, invokehidden bug"
    11. type initialized to: "Bug"
  2. Ticket change [9b2f8d8ee9] (rid 111086) by welch on 2000-10-26 08:12:09:

    1. closedate changed to: "2000-10-26T01:12:09"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [8ad0c03e9a] (rid 127454) by dgp on 2001-04-14 03:16:47:

    1. closedate changed to: "2001-04-13T20:16:47"
    2. closer changed to: "dgp"
    3. subsystem changed to: "20. [interp]"