This is a nasty one I can't get to the bottom of, so any clues or tips
would be appreciated.
Fundamental problem: Access Violation on accessing a stringlist.
Situation: Database update process iterates 700+ times, doing the same
thing, before tipping over.
It's like the tstringlist "disappears" for some unknown reason.
I use the same method in thousands of other lines, and never fails.
Breaks on two servers at the customers place, but not on my dev server.
Multi-threaded tray app, using Indy http server.
Snips:
Main.pas
threadvar
tlResult:TStringlist;
Main.pas
Procedure TimerExecute;
Tlresult:=tstringlist.create;
DoDatabaseProcessing;
Database.pas
Procedure DoDatabaseProcessing;
While not database.eof do begin
.. hundreds of lines
tlresult.add('Ok: Processed item '+IntToStr(RecordNo)); // access
violation
end;
I tried descending tstringlist and putting in a log on BeforeDestruction
, but it does not appear the stringlist is explicitly being destroyed.
It is more like something else is clobbering it's memory, and it is
"disappearing" at some point.
Any help appreciated.
David McNeill
McPond eCommerce Software
[EMAIL PROTECTED]
Buchanan Road
Franklin
New Zealand
Phone 09 292 7212
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/