Post by Bob Murdoch on Jul 1, 2004 15:48:06 GMT -5
I'm using the registered version of 2.23 in a com object used by an ASP application.
I am having problems with Unzipping, where the com object hangs. The zip files contain a single file that is less than 5mb uncompressed. In some cases the unzipping works fine, and in others it simply hangs at the call to Unzip().
The code looks like this:
with TVclUnZip.create(nil) do try
ZipName := AMsg;
DestDir := FPath;
DoAll := TRUE;
ReadZip;
if Count < 0 then begin
ServerErrorMessage(AObject, 'Error opening compressed report files - no files exist', -1);
exit;
end;
try
vUnzipped := Unzip;
except
on e: Exception do begin
ServerErrorMessage(AObject, 'Cannot unzip - ' + e.message, -1);
exit;
end;
end;
if vUnzipped = 0 then begin
ServerErrorMessage(AObject, 'Cannot decompress data from report server', -1);
end;
finally
free;
end;
Tracing thru the code, I know that ReadZip works because the count is correct. However, once I call Unzip, everything hangs - there is no exception, and there is never a call check vUnzipped to see the number of files that were unzipped.
Is there something else I should be doing to make this thread-safe? Testing in a single user environment results in 99% successful completion. Moving to a multi-user web site results in the first time working, but subsequent times failing. I don't have a clue how that could be, because the VCLUnzip component is obviously being freed, along with the components that create it.
Help,
Bob M..
I am having problems with Unzipping, where the com object hangs. The zip files contain a single file that is less than 5mb uncompressed. In some cases the unzipping works fine, and in others it simply hangs at the call to Unzip().
The code looks like this:
with TVclUnZip.create(nil) do try
ZipName := AMsg;
DestDir := FPath;
DoAll := TRUE;
ReadZip;
if Count < 0 then begin
ServerErrorMessage(AObject, 'Error opening compressed report files - no files exist', -1);
exit;
end;
try
vUnzipped := Unzip;
except
on e: Exception do begin
ServerErrorMessage(AObject, 'Cannot unzip - ' + e.message, -1);
exit;
end;
end;
if vUnzipped = 0 then begin
ServerErrorMessage(AObject, 'Cannot decompress data from report server', -1);
end;
finally
free;
end;
Tracing thru the code, I know that ReadZip works because the count is correct. However, once I call Unzip, everything hangs - there is no exception, and there is never a call check vUnzipped to see the number of files that were unzipped.
Is there something else I should be doing to make this thread-safe? Testing in a single user environment results in 99% successful completion. Moving to a multi-user web site results in the first time working, but subsequent times failing. I don't have a clue how that could be, because the VCLUnzip component is obviously being freed, along with the components that create it.
Help,
Bob M..