Icon View Incident Report

Serious Serious
Reported By: Carlos Guerra
Reported On: 5/7/2006
For: Version 4.24 Build 1
# 2199 Using OnRemoteSendProgress Event with Pinging Causes Client Application To Freeze

I have chosen to file documents in a BLOB field on the database server. Everything works fine except when I try to use the PercentDone in the OnRemoteSendProgress on a ProgressBar or ProgressDialog

1 out of 8 "uploads" to the BLOB the whole application freezes, and if you try to Empty,Verify the table it shows a DBISAM error #11013, I have to stop/restart the Server service, an all cases it freezes when the PercentDone reach 100%.

I can not be certain that is a DBISAM problem but I did a lot of trial and error and it only fails if I use the PercentDone, the only thing I can use inside the OnRemoteSendProgress is the "NumBytes", this will work OK on both the ProgressBar and ProgressDialog captions.

I'm using a Public variable as a Flag to to let the OnRemoteSendProgress know a file is being uploaded but I do not think that creates a problem.

procedure TMainDataModule.NXDBSession1RemoteSendProgress(Sender: TObject;
  NumBytes: Integer; PercentDone: Word);
begin
  if MvSendingFile then begin
//    MLProgress1.Position1 := PercentDone; << This eventually fails 
after some uploads
    MLProgress1.Caption1 := IntToStr(NumBytes)+'kb'; << this will work OK
  end;
end;
*********************

And this is the example code I use to upload the file to the Blob:
*********************
procedure TEmbarquesForm.Insert2Click(Sender: TObject);
begin
    if OpenDialog1.Execute then begin
      MainDataModule.MvSendingFile := True;
      MainDataModule.MLProgress1.Show;
      MainDataModule.MLProgress1.Title := 'Archivando Documento';
      DBTableEmbarquesDocumentos.Append;
      DBTableEmbarquesDocumentosArchivo.LoadFromFile(OpenDialog1.FileName);
      DBTableEmbarquesDocumentos.FieldByName('TipoDocumento').AsString 
:=  ExtractFileName(OpenDialog1.FileName);
      DBTableEmbarquesDocumentos.FieldByName('ArchivoOriginal').AsString 
:=  ExtractFileName(OpenDialog1.FileName);
      try
        DBTableEmbarquesDocumentos.Post;
      finally
        MainDataModule.MvSendingFile := False;
        MainDataModule.MLProgress1.Hide;
      end;
    end;
end;



Comments Comments
The issue was with the progress bar being updated from within the internal ping thread. The control did not respond well to updating in this manner. However, the ping thread shouldn't have been firing the progress events anyways, so this behavior was removed.


Resolution Resolution
Fixed Problem on 5/10/2006 in version 4.25 build 1


Products Affected Products Affected
DBISAM Additional Software and Utilities
DBISAM CLX Client-Server
DBISAM CLX Client-Server with Source
DBISAM CLX Standard
DBISAM CLX Standard with Source
DBISAM ODBC Client-Server
DBISAM ODBC Client-Server with Source
DBISAM ODBC Standard
DBISAM ODBC Standard with Source
DBISAM ODBC Trial
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source
DBISAM VCL Trial

Image