views:

248

answers:

1

I have a web application using the TWebModule component. It runs as a module on Apache. The code below throws a "Stack Overflow" error on the ExportToFilter. The same exact code works fine from a Winforms Application and even a service for that matter. I have seen other discussions on this which indicate it has something to do with threading.

var
  mFileName: String;
  AExportFilter:;
begin
    mFileName := 'c:\temp\calendar.pdf';
    AExportFilter:=TQRPDFDocumentFilter.Create(mFileName);
    try

      WebSchdHistCalendarForm := TWebSchdHistCalendarForm.create(nil);
      WebSchdHistCalendarForm.quickrep1.ShowProgress := False;
      WebSchdHistCalendarForm.quickrep1.ExportToFilter(AExportFilter  );
    finally
     AExportFilter.Free;
     WebSchdHistCalendarForm.Free;
    end;
A: 

If I'm not mistaken you get Stack overflow on infinite recursive method calls. This might not be the case here though.

johnny
It raises a non-Delphi exception (ntdll.rtlconvertuLongToLargeInteger) within the cvtInt function of QRPDFFilt.pas
M Schenkel