On November 24 I posted a note ("Text file problem") about a problem I was having in which a text file that was legitimately closed by my program ended up being considered still open by Windows. marcov said "This is a known (Windows) issue". This problem was unpredictable and would only happen every once in a while but testing did show some interesting results. Sometimes when I run Windows Explorer I notice that its progress bar runs very, very slowly and never really ends, even going beyond the end of its containment box. Rebooting the computer usually fixes this.
When the progress bar is behaving like this then the chances of the error occurring are vastly increased. My computer is a Windows 7 machine that was upgraded to Windows 10 and it seems to behave oddly at times. If I use YouTube a lot then the computer crashes, shutting itself off. I changed the power settings but it still happens if I play many YouTube videos.
I did some research on the slow progress bar. I have been using Task Manager to check processing performance and I ended up changing Windows indexing options but I don't know if this is the solution to the text file problem.
I did find an interesting Lazarus Forum topic titled "Delphi, Lazarus Pi Performance Benchmark" and I was wondering if it might be possible to programmatically do some kind of performance check before the program creates and uses those text files. My program is currently set up to provide work around options when the error happens but I haven't been able to solve the problem except by shutting the program down and thus freeing up the file/s involved. I'm really just groping in the dark here.