Overview
| Artifact ID: | fa646db1e40fec3b32870094ef211945bff31367 |
|---|---|
| Ticket: | 1960724fffffffffffffffffffffffffffffffff
crash calling a method |
| User & Date: | pertronic on 2008-05-09 04:25:08 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
# winXP, TclOO 0.2 Tcl 8.5.2 The following crashes on the "internal" call to copy. The crash is sensitive to the number of object properties, e.g. if "my variable np_name" is removed from the constructor there is no crash. package require TclOO namespace import oo::* class create A { constructor {name} { my variable np_name set np_name $name } # # make a deep copy # method copy {nm} { set cpy [[info object class [self]] new $nm] foreach var [info object vars [self]] { my variable $var set val [set $var] if {[string match o_* $var]} { set objs {} foreach ref $val { # call to "copy" crashes lappend objs [$ref copy {}] } $cpy prop $var $objs } else { $cpy prop $var $val } } return $cpy } method prop {name val} { my variable $name set $name $val } } set o1 [A new {}] set o2 [A new {}] $o1 prop o_object $o2 $o1 copy aa - foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "pertronic"
- subsystem changed to: "35. TclOO Package"
- title changed to: "crash calling a method"
- type changed to: "Bug"