Hi OVR_CZ,
Thank you for bringing this to our attention. I have verified that this is a bug in toolbox.c. I have submitted a bug report (tracking #335805) and it should be resolved in the next release of CVI.
Since we provide the source code for toolbox.c, you can actually make the change in your copy yourself. In the ListCompact function in toolbox.c, simply modify the if statement at the bottom of the function as shown below:
void CVIFUNC ListCompact (ListType list)
{
unsigned int tracking;
void *newPtr = 0;
#ifndef TB_NO_SAFETY_CHECKS
if (!VALIDATE_LIST (list))
return;
#endif
list = LIST_GET_POINTER (list);
if (list->listSize == list->numItems)
return;
#if defined(_NI_mswin_) && _NI_mswin_
tracking = SetEnableResourceTracking (0);
#endif
newPtr = realloc(list->itemList, list->numItems * list->itemSize);
#if defined(_NI_mswin_) && _NI_mswin_
SetEnableResourceTracking (tracking);
#endif
if (newPtr || list->numItems == 0) {
list->itemList = newPtr;
list->listSize = list->numItems;
}
}
Note: This may or may not be the change we actually implment for the next release of CVI.
National Instruments
Product Support Engineer