| Description: |
When the script below is executed using BWidget-1.4.1,
it works fine. However using BWidget-1.6.0 causes this
code to seg-fault. To crash this code drop down the
list and select an item. Then repeat. When the list
is resized, thats all folks! My debugging tells me
that there is memory usage problems in the Tk library.
valgrind displays an 'invalid read of size 4' So
there must have been a change somewhere in the current
BWidget version that brought out an old bug in Tk. Or
I could be wrong. Any Idea how to fix this?
proc change_b { b } {
set size [random 29]
set vlist ""
for {set i 0} {$i<$size} {incr i} {
lappend vlist [clock seconds]
}
$b configure -values $vlist
}
proc main { } {
set width 200
set height 200
# BWidget::place . $width $height center
wm geom . ${width}x${height}
wm deiconify .
raise .
focus -force .
set rt [catch {set version [package require
BWidget]} err]
if {$rt != 0} {
puts "error getting package BWidget"
return
}
set .b [ComboBox .b -modifycmd {change_b .b}]
.b configure -values "Select an item"
pack .b -side top
}
main
wm geom . [wm geom .]
|