I've tracked down an intermittent core dump that's
caused by a call to Blt_GraphTags with an object whose
classUid is null.
Graphically: If I add and remove an axis in the right
margin (y2axis), then any mouse motion across the
graph's right edge (where the y2axis was) causes an
segmentation fault.
Stack: An EnterNotify event is generated in
PickCurrentItem (bltBind.c:340). DoEvent calls the
bindPtr's tagProc (bltBind.c:125), which is
Blt_GraphTags. Blt_GraphTags calls Blt_ListAppend for a
null elemPtr->classUid on line 547 of bltGraph.c.
Below is a simple test script to demonstrate the problem
(tcl/tk 8.3.4 on Linux, blt2.4x). After sourcing the script,
repeated mouse motion over the right edge of the graph
(where the y2axis is no longer) should cause the crash
(sooner or later).
Perhaps I'm not supposed to use [y2axis use ""]. Is there
a better way to un-use an axis?
I patched bltGraph.c to avoid the core dump, for now, by
testing elemPtr->classUid for null before calling
Blt_ListAppend on line 547. Probably not a good solution.
package require BLT
blt::graph .g
pack .g
.g axis create testing -title Testing
.g y2axis use testing
update
.g y2axis use ""