Couple of possibilities that I can think of:
1) Are you using interfaces? If so, check that the referenced object hasn't
been relased.

2) Have you got your code that references the stringlist wrapped up in a
critical section?

3) Are you trying to access an item in the list that doesn't exist (eg,
MyList[4] when MyList only contains 4 items - remember that TStringList is 0
based)?

These are probably all obvious ones you have already checked, but you didn't
say what you had checked or not.

Phil.
----- Original Message ----- 
From: "David McNeill" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Thursday, September 11, 2003 11:56 AM
Subject: [DUG]: TStringList or Memory error.


> 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/
>


---------------------------------------------------------------------------
    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/

Reply via email to