Until 3.0, available here in the source code, is released as a package, the local installations will remain at 2.4z. But it has a problem, which looks to me like a memory leak: repeated re-config of the marker text with the same string generates printable and non-printable characters or simply blanks out (under undroidwish/vanillawish, or wish 8.5-8.6), on a x86_64 Linux platform (tested on several OS versions, from RHEL 7 to Debian buster). Sometimes, every second click, sometimes every few clicks. Sometimes returns back to the original string, sometimes never does. Much depends on other variables being used by the program, sometimes recognizable bits of code flash by,
The minimal script to demonstrate the effect is this:
package require BLT 2.4 ;# 3 does not have this problem
namespace import ::blt::marker
namespace import ::blt::graph
wm title . "Left-click and string is messed up..."
frame .g
pack .g
graph .g.c -width 640 -height 480
pack .g.c
.g.c marker create text -name gt
set i 0
bind .g.c <ButtonRelease-1> {
set i [expr $i+1]
puts "Refresh No. $i"
.g.c marker configure gt -coords {0.5 0.2} -text "Click to refresh..."
}
Does anybody know a workaround, for use under 2.4z until 3.0 is released?
In BLT 3.0 (compiled from the code in this project) things work without a glitch. I am not sure this qualifies as a true bug - it looks like it has been fixed - but I still need to survive until the new release.
Actually, I did find a workaround: delete and re-create the marker every time. Is this the best I can do?