1) When over 1,000 files are selected with mdlFileList_edit() and mdlStringList_getMember() is used to extract the file names, the last file in the list is corrupt.
2) When over 2,000 files are selected .... the last N file names are corrupt
3) When under 1,000 files are selected the list is fine
Notes:
- This is repeatable in v8i and CONNECT
- The numbers given (1,000 and 2,000) are approximate, I dont have the time to figure out exact numbers but have repeated the 3 above issues multiple times with several different machines
- I will also be opening a SELECT service ticket for this if Bentley does not respond to this here.
Code to reproduce:
CONNECT code (v8i almost identical except WChar functions)
#define EXIST(fname) (!_waccess(fname,0))
strListP = mdlFileList_edit(&fileInfo, NULL,
FILELISTATTR_FILES | FILELISTATTR_OPEN | FILELISTATTR_UNIQUE |
FILELISTATTR_SORT | FILELISTATTR_MULTIPLE | FILELISTATTR_CASESENSITIVE,
title, L"files to process:", L"*.fpt", curdgn);
if (fileInfo.lastAction == ACTIONBUTTON_CANCEL) return;
for (i=0;i<mdlStringList_size(strListP);i++)
{
//print the contents out in the message window
mdlStringList_getMember(&str, NULL, strListP, i);
wcscpy(filestr, str);
swprintf(szBufferW, L"[%d of %d][%s]", i+1, mdlStringList_size(strListP), filestr);
Msg(szBufferW);
if (!EXIST(filestr)) // We know the list is corrupt because we just selected valid files
{
swprintf(szBufferW, L"Error importing Footprint File\nFile %d of %d does not exist\n[%s]", i+1, mdlStringList_size(strListP), filestr);
MsgBox(szBufferW);
return;
}
...