[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
oTcl and SCO OpenServer5.0.2
When I was testing otcl0.96 with tcl7.6p2 I got some errors, which
I think are related to memory.
===================================
>./otclsh lib/test.tcl
PASSED objectdispatch
PASSED paperexamples
PASSED classcreate
PASSED inheritance
PASSED classdestroy
PASSED objectinits
PASSED objectvariables
invalid command name "
while executing
""
invoked from within
"atest $i"
invoked from within
"if {![atest $i]} then {
error "FAILED $self - wrong proc result"
}"
("for" body line 2)
invoked from within
"for {set i 0} {$i <= $n} {incr i} {
if {![atest $i]} then {
error "FAILED $self - wrong proc result"
}
} "
(procedure "autoload" line 42)
invoked from within
"autoload run"
invoked from within
"puts [autoload run]..."
(procedure "TestSuite" line 17)
invoked from within
"TestSuite run"
(file "lib/test.tcl" line 648)
*** Error code 1 (bu21)
===================================
Explanations: test failed on TesSuite autoload from test.tcl
for {set i 0} {$i <= $n} {incr i} {
if {![atest $i]} then {
->> Right here when evaluating atest 6 (for $i=6).
error "FAILED $self - wrong proc result"
}
}
When I was debugging this script (using tcldbg) I found that for all $i < 6
"atest $i" returns 1, but for "atest 6" I got the same error as above.
Supprisingly when I called "atest 7" I got the same error, but if
I call then "atest 6" againg -> NO ERROR. And with the same pattern
all the way up to "atest 10", which originally produced errors (6 through
10)
The atest object is declared above in
set m [expr {$n/2}]
if {[catch {AutoTest$m atest} msg]} then {
error "FAILED $self - $msg"
}
with $m == 5.
May be this is the reason, but I think oTCL should catch that
case and not create the error. May be I'm missing something in here, I do
not know oTCL much.
>From this investigation I'm concluding that it was oTCL who created memory
mess when I was testing ns2.0. May be I'll get into that error again when
I'll be modifying ns2.1 to suite my research needs. For now no any errors.
If there is someone who can explain why oTCL behaives like that, we then
can fix it and have ns2.0, ns2.1 running OK on SCO.
Ihor