[Lazarus] TStringList error

Vincent Snijders vsnijders at quicknet.nl
Mon Jul 21 16:22:56 CEST 2008

Bob K. schreef:
> I'm getting the error: *unit1.pas(48,3) Warning: Local variable "List" 
> does not seem to be initialized*
> Here's the code (which used to work):

Then you were unbelievable lucky.

list := TStringList.Create is missing.

If it used to work, then you the uninitialized variable list was pointing to a 
memory location in the heap, contained valid (or at least non-crash causing) 
information and updating that upformation, e.g. the count value of the list didn't 
cause a crash. Extremely lucky.

Next time, try adding the -gt option, to decrease your chances on such luck and get 
a crash sooner rather than later.


More information about the Lazarus mailing list