View Issue Details

IDProjectCategoryView StatusLast Update
0001384JEDI VCL00 JVCL Componentspublic2004-03-09 02:44
ReporteranonymousAssigned Touser72 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001384: Invalid Pointer Operation in JvHTTPGrabber when URL is empty
DescriptionHi, I am trying to make a little example for the JvHTTPGrabber component and discoverd a cosmetic bug.

If the property URL is empty an the method execute is called, then an Invalid Pointer Operation error shows up.
Additional Informationprocedure TFrmMain.JvBitBtn1Click(Sender: TObject);
begin
  JvHTTPGrabber1.Execute; //<-- error if url property is emtpy.
end;

procedure TFrmMain.JvHTTPGrabber1Error(Sender: TObject; ErrorMsg: String);
begin
  showmessage(ErrorMsg); //<-- error message is empty
end;

Fix in File JvHTTPGrabber

procedure TJvHTTPGrabber.Execute;
begin
  if Url='' then
  begin
    Error(self,'No URL defined. Please setup the URL property.');
    Exit;
  end;
  //Download it
  if FThread = nil then
  begin
    FThread := TJvHttpThread.Create(Url, Referer, Username, FileName, Password,
      OutPutMode, Error, DoneFile, DoneStream, Progress, Agent, Status);
    FThread.OnTerminate := ThreadFinished;
    FThread.Resume;
    FThread.WaitFor;
  end;
end;
TagsNo tags attached.

Activities

user72

2004-02-27 11:52

  ~0003108

Thanks. I'd recommend trying TJvURLGrabber in JVCL 3. It supports several protocols in one component and is mutli-threade (you can download several URL's at the same time)

user72

2004-02-27 14:49

  ~0003109

Fixed in CVS

Issue History

Date Modified Username Field Change
2004-02-27 11:44 anonymous New Issue
2004-02-27 11:52 user72 Note Added: 0003108
2004-02-27 14:49 user72 Status new => resolved
2004-02-27 14:49 user72 Resolution open => fixed
2004-02-27 14:49 user72 Assigned To => user72
2004-02-27 14:49 user72 Note Added: 0003109
2004-02-27 14:51 user72 Status resolved => feedback
2004-02-27 14:51 user72 Resolution fixed => reopened
2004-02-27 14:54 user72 Status feedback => resolved
2004-02-27 14:54 user72 Resolution reopened => fixed
2004-03-09 02:44 user72 Status resolved => closed