Update: the thread seems to be running fine this way! But I can't really test since now file operations are very unstable.
I've got a TStringList, and I use LoadFromFile to load a text file (path correct). One should think that this is simple - but every second time or so, I get an EFOpenError exception - every other time it just loads. I replaced the mystringlist.LoadFromFile with a filestream that I opened with fmOpenRead and fmOpenShareDenyNone, and then used mystringlist.LoadFromStream, but this also throws an exception every second time.
At least this problem did not happen when I used the full Lazarus version
procedure TMyApp.DoLoadButton;
var sl: TStringList;
i: integer;
begin
ClearListBox(hList);
sl := TStringList.Create;
sl.LoadFromFile(ExtractFilePath(ParamStr(0))+'test.txt');
sl.Free;
for i := 0 to Pred(sl.Count)
do AddListBoxItem(hList,sl[i]);
end;
* DoLoadButton is an event handler called when pressing a button on the form
* AddListBoxItem is my mini frameworks function to add strings to a ListBox, and works on other buttons
* test.txt is an existing file, the error message shows the correct path:
An unhandled exception occured at $000.....: EFOpenError: Unable to open file "\Storage Card\test\test.txt" $000.....At the same time, using AssignFile, Reset, Read, CloseFile works - so there's probably some kind of problem in higher level file routines!
(update: submitted a bug to the bugtracker, category RTL, with a most simplified test application)