Solved the issue:
For some reason Delphi 11 and Android 9 & 12 do not like refreshing LabelLine1.Text ... it will cause a segment fault refreshing it. I don't understand... but after commenting that line out just before the copying of a file makes it run perfectly! Even though memo1.lines is in dString... the LabelLine1.Text was the issue! This is the DEFAULT Label component that comes with Delphi 11 Enterprise! I wonder if Skia Label will handle better?
try
//if FileExists(RandomFileName) = true then DeleteFile(RandomFileName);
------->LabelLine1.Text := 'Creating: ran' + IntToStr(FileNameCounter) + '.txt';
dString('Create RandomFile:'+RandomFileName);
sleep(50); //dString writes to a file log file.
TFile.Copy(RandomFileToCopy, RandomFileName, true);
Except
On E: Exception Do
begin
dString('TFile.Copy(RandomFileToCopy, RandomFileName):'+E.ClassName + ' ERROR: ' + E.Message);
breakit := true; //break on error
end;
end;