> // Load all the file names into ListOfFiles
Do you use any plain C-strings in this bit of code?

Or do you call malloc / new at all anywhere prior to the code that fails?