acces violation at address 004b84 in module "SecurityScreensaver.exe"
Expand Post »
Hello, i have this code who ive been using whitout any problems. and then suddenly at says acces violation at address 004b84 in module
"SecurityScreensaver.exe" when i trie to save a tstringlist to a file.
this is how the code looks
procedure TForm7.Button8Click(Sender: TObject);
var s : tstringlist;
begin
savedialog1.Title := 'Save image list to file (PS. Remember to add the extension name (etc. *.sss) to the end of the file';
// Only allow existing files to be selected
savedialog1.Options := [ofFileMustExist];
// Select All supportet formats
savedialog1.FilterIndex := 3;
// Display the open file dialog
if savedialog1.Execute then
begin
S := TStringList.Create;
for i := 0 to ListView1.Items.Count do
begin
S.Add(ListView1.Items[i].Caption); {This is where the error occurs}
end;
S.SaveToFile(savedialog1.FileName);
S.Free;
multipleimages := true;
multipleimagesdes := savedialog1.FileName
end
else
begin
multipleimages := false;
multipleimagesdes := 'None';
end;
end;
Re: acces violation at address 004b84 in module "SecurityScreensaver.exe"
Despite missing the lack of -i what I said still stands, as of course item[i] was 1 too high so wasnt defined .. but then I guess thats partly what debuggings for
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.