I rebuild od project from CVI7.1.1 in new CVI 2010 10.0.1 and when run i get error " NON-FATAL RUN-TIME ERROR: ... Attempt to free pointer to memory not allocated by malloc() or calloc()." at source line with function call ListDispose(list);
After some investigation i found that this is in connection with ListPrealocate and ListCompact.
There is simplified sample code:
ListDispose(list);//runtime error at this line //i also get error when i try call InsertItem after ListCompact
form toolbox.c it seems to me that problem is in listCompact which free memory but do not update pointer in struct.
i like to have oficial patch for this "bug" to do not have my own version of toolbox.c(because of poslible updates of CVI) and also for other users that can benefit from it.
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: