0

I keep getting the following error when running the fingerprint verification procedure on the Digital Persona Template. I am now at my wits end. My knowledge is short and I don’t have somebody I can turn to. Can you please assist.

ERROR MESSAGE

Test17.exe raised EacessViolation with message;Access violation at address 004033B7E in module ‘Test17.exe’

DELPHI 5 CODE TO DO THE VERIFICATION

procedure TFormVerify.DPFPVerificationControl1Complete(Sender: TObject;
  const pFeatureSet, pStatus: IDispatch);
var
  lStr, Str1,Str2       : AnsiString;           //Deserialize method
  lByteArray            : Variant;
  lArrayPointer         : Pointer;
  DPFPTemplate          : TDPFPTemplate;        //IDispatch;
  MFar                  : Integer;              //Long integer of result archieved
  MVerified             : Boolean;              //Result of whether finger has been verified or not
  MFeatureSet           : Variant;              //IDispatch, Variant;
  MTemplate             : Variant;              //IDispatch, Variant;
  MRes                  : Variant;              //TDPFPVerificationResult;
  oVerificationResult   : DPFPVerificationResult;
begin
  // Experiment
  MFeatureSet           := pFeatureSet;                 // Dispatch cast to Variant
  MTemplate             := Template;                    // Dispatch cast to Variant
  Str1                  := MfeatureSet.Serialize;   // Note string shows
  Str2                  := Mtemplate.Serialize;       // Note string shows
  try
    if (pFeatureSet=nil) or (Template=nil) then
      MessageDlg('Empty Featureset or Template!', mtInformation,[mbOk], 0)
    else
      Res := Ver.Verify(pFeatureSet, Template);          // ERROR MESSAGE
    MRes  := Res;
    MVerified     := MRes.Verified;                     
    MFar          := MRes.QueryInterface.FARAchieved;     DPFPVerificationResult1.FARAchieved;
  except
    on E: Exception do MessageDlg(E.Message +' : ' + IntToStr(E.HelpContext), mtInformation,[mbOk], 0);
  end;
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • 4
    Don't know anything about digital persona, so can't help you there. But: where does Ver get its value? In the line producing the error message you use "Ver.Verify(...)", but I do not see Ver being declared, initialized or checked anywhere... – Marjan Venema Nov 14 '10 at 08:28
  • I suggest you inspect the value passed as pFeatureSet parameter, or the global Template or Ver variables/fields/methods/properties. The access violation occurs on a non zero address... I bet is the address where a already-destroyed object was at a time. pFeatureSet is an Interface, but the program may Free the underlying object before calling this routine. It applies the same for the pointers to Ver and Template (if they are objects or interfaces). – jachguate Nov 17 '10 at 03:33

2 Answers2

0

Possible causes:

(1) if pFeatureSet or Template is nil, hten Res will be undefined, leading to an exception when Res.Verified is invoked

(2) MRes.QueryInterface is nil;

(3) DPFPVerificationResult1 is nil

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Sean B. Durkin
  • 12,659
  • 1
  • 36
  • 65
0
DPFPTemplate: DPFPFeatureSet;        //IDispatch;

MFeatureSet := pFeatureSet as DPFPFeatureSet;  // Dispatch cast to Variant
fcdt
  • 2,371
  • 5
  • 14
  • 26