Norton Allen
04/22/2009 12:58 PM
post27776
|
I have a PtTree with a PtDivider to use two columns. I am currently trying to use no images. In a separate dialog, I
have PtText widgets to edit the names of some of the tree items. Whenever the PtText widgets are updated
(Pt_CB_MODIFY_NOTIFY), I call
PtTreeChangeItem(tree, item, newname, NULL);
to update the tree text. Before long (after 4 or 5 updates) I get a SIGSEGV from within PtTreeChangeItem():
32 _list_release() 0xb0327324
31 __prelocked_free() 0xb0328b0e
30 __free() 0xb0328c79
29 free() 0xb0325b1d
28 __realloc() 0xb0328879
27 realloc() 0xb0325bf4
26 PtGenListItemRealloc() 0xb826f0d1
25 PtGenTreeItemRealloc() 0xb8277f1a
24 tree_setstring() 0xb82d2058
23 PtTreeChangeItem() 0xb82d2101
The tree items are created with:
TreeItem = PtTreeAllocItem(ABW_Graphs_Tab, temp_buf, -1, -1);
The documentation for PtTreeChangeItem is vague as to the implications of passing in a NULL for the attributes argument.
It says:
Set to NULL to display no images, and use the widget-defined font and
colors. The Pt_TREE_ITEM_HAS_ATTRS flag bit is still set for the item.
What are the implications of having Pt_TREE_ITEM_HAS_ATTRS set, particularly if no attrs have been supplied? Is it
possible that the library is attempting to dereference the attribute pointer or free it?
|
|
|