For Programmers: Free Programming Magazines  


Home > Archive > Delphi > March 2004 > What would cause this for loop to fail in Dell 800?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author What would cause this for loop to fail in Dell 800?
Ralph Freshour

2004-03-27, 12:21 am

I have the following code that is generating an error at around the
500th index - I'm trying to create 1000 objects. This code works OK in
many PC's except the Dell Latitude D600 and D800.

Does anyone know what might be different in these machines that would
cause this code to fail half way through the for loop? One machine has
1GB of ram and is running windows 2000.

for i := 0 to MAX_HTTP_OBJECTS do
begin
try
VUSER[i].status := 'Initialized';
VUSER[i].queryFilesRecordIndex := 0;
VUSER[i].queryFileIndex := 0;
except
Writeln(LogF,' error creating
createHTTPRecordCompanionArrayObjects');

Writeln(LogF,' index == ' + IntToStr(i));
Writeln(LogF,'createHTTPRecordCompanionA
rrayObjects -
exit');
Result := True; // True == will return to main() and
terminate app
exit;
end;
end;

Jamie

2004-03-27, 12:21 am

memory fragmetation ?
try running the code out side the IDE..


Ralph Freshour wrote:
> I have the following code that is generating an error at around the
> 500th index - I'm trying to create 1000 objects. This code works OK in
> many PC's except the Dell Latitude D600 and D800.
>
> Does anyone know what might be different in these machines that would
> cause this code to fail half way through the for loop? One machine has
> 1GB of ram and is running windows 2000.
>
> for i := 0 to MAX_HTTP_OBJECTS do
> begin
> try
> VUSER[i].status := 'Initialized';
> VUSER[i].queryFilesRecordIndex := 0;
> VUSER[i].queryFileIndex := 0;
> except
> Writeln(LogF,' error creating
> createHTTPRecordCompanionArrayObjects');

> Writeln(LogF,' index == ' + IntToStr(i));
> Writeln(LogF,'createHTTPRecordCompanionA
rrayObjects -
> exit');
> Result := True; // True == will return to main() and
> terminate app
> exit;
> end;
> end;
>


Martin James

2004-03-31, 10:34 pm

What is the exception.message?

try
...
except
on e:exception do Writeln(LogF,' error'+e.message);
end;

Rgds,
Martin


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com