Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Open
  • Priority: Low
  • Security: Public
  • Views: 52
  • Last Modified:

DELPHI app ADO and LOEPRO32.dll

Hi there,

I made a small win32 db-applicatie for warehouse for education a couple of years ago (Delphi 2007), using ADO en msaccess db.
Since a couple of months two things happen with the application:

1 slow start up and slow shut down in win10. In DELPHI IDE it 'hangs' on olepro32.dll.
2 i can't reproduce but some win10 user get errors (external exception / access violations)

I read something about how MS after june 2017 updates dll's.
Could that have anything to do with this?

Every help appreciated.
0
Hans Hoogbergen
Asked:
Hans Hoogbergen
  • 5
  • 3
  • 2
10 Comments
 
Geert GruwezOracle dbaCommented:
that's not a lot of info to go on.

have considered an error tool like MadExcept or Eurekalog ?
MadExcept > http://madshi.net

It plugs into the ide upon install
Activate it, set a few mailing options and recompile your project.

When an unhandled exception occurs, you get a complete stack trace
which helps in pinpointing the error.


Slow ...
can also be caused by the virusscanner.
Exclusions might help.  Delphi has often been flagged as a false positive ...
0
 
Sinisa VukCommented:
Reasons for an exceptions could be few tons... Do users get exception upon opening database? Is it in "between" of work?
Where db is located? ... We need more info.

Note: Proper exception handling using try...except...end could help you to debug this issue too.
0
 
Hans HoogbergenEducational DeveloperAuthor Commented:
Thanks for your reactions.

I try to always use proper excepting handling, The error came in a messagebox in the except / finally part.

scrdmp.png
Thanks, Geert; I installed madshi en recompiled the project. Maybe it will give more information.

As far as I know now:
- this app, this version has been working for years
- now suddenly i get these errors (win7 and win10)
- only some users have these errors
So I thought it might be  an external DLL causing the problem

 Thanks again, I try to work it out.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Sinisa VukCommented:
Cannot see exception text....to small. What you do (code ) when exception raise?
0
 
Hans HoogbergenEducational DeveloperAuthor Commented:
in specific procedures where exception handling should be, i give a normal response

I also use

procedure TOVD_MainForm.AppException(Sender: TObject; E: Exception);
begin
     //formuleer foutmelding
     sErrorText := 'Er is een fout opgetreden in ' + PCHAR(cnstApplName) + ' . Foutmelding: ' + E.Message;
     //Geef message
     Application.MessageBox(PCHAR(sErrortext), PCHAR(cnstApplMessage), mb_IconInformation + mb_OK);
end;

it's Dutch, but i guess you'll understand it
0
 
Hans HoogbergenEducational DeveloperAuthor Commented:
Installed Madexcept
Opened en clicked about everything
No exceptions in app

did create leak report
maybe has nothing todo with this
0
 
Hans HoogbergenEducational DeveloperAuthor Commented:
0
 
Geert GruwezOracle dbaCommented:
You have a memory leak when you create a quickreport ?
0
 
Geert GruwezOracle dbaCommented:
Current versions are unicode.

Pre d2009 are not.

Maybe it's that
0
 
Hans HoogbergenEducational DeveloperAuthor Commented:
Memory leak seems to happen on QR.
Got some screendumps. Seems to happen around this line of code.

procedure TOVD_MainForm.DrukRapportAf;
var
     repReport : TComponent;
     label1, label2 : TQRLabel;
     iCopyCount : Integer;
begin
     //load printer
     TRY Application.CreateForm(TfmRapportForm, fmRapportForm);
     EXCEPT BEGIN
                Application.MessageBox('Rapport wil niet laden. Controleer of standaardprinter bereikbaar is.',
                    PCHAR(cnstApplMessage), mb_OK + mb_IconInformation);
                Exit;
            END;
     END;

     //report
     TRY repReport := fmRapportForm.findComponent('Report');
     EXCEPT BEGIN
                Application.MessageBox('Rapport wil niet laden.',
                    PCHAR(cnstApplMessage), mb_OK + mb_IconInformation);
                Exit;
            END;
     END;


     TRY BEGIN
         //iPrintOption: 0 = CANCEL / 1 = PREVIEW / 2 = PRINT
         IF iPrintOption = 0 THEN Exit;
         //find number of copies (app-defined)
         IF CopyDefine
         THEN WITH OVDDatamodule.ADOTable_SYS DO
              BEGIN
                Open;
                iCopyCount := FieldByName('SYS_REPORTCOUNT').AsInteger;
                Close;
              END
         ELSE iCopyCount := 1;
         //set number of copies
         WITH repReport AS TQuickRep DO
         Printersettings.Copies := iCopyCount;

         //view or print
         IF iPrintOption = 1
         THEN BEGIN
               //reportpreview
               WITH repReport AS TQuickRep DO
                BEGIN
                 //background image
                 BackImageControl:='QRGrImageBG';
                 //form instellen
                 PrevFormStyle := fsMDIChild;
                 PreviewInitialState := wsMaximized;
                 PreviewDefaultSaveType := stPDF;
                 //init
                 PrevShowSearch := False;
                 PrevShowThumbs := False;

                 //barcodes
                 IF NOT (BonCode = 0)
                 THEN BEGIN
                        ReportTitle := ReportTitle + ' ' + IntToStr(BonCode);
                        Tag := BonCode;
                      END;
                 //show it
                 Preview;
                END;
              END
         ELSE BEGIN
               //reportprint
               WITH fmRapportForm DO
                 WITH repReport AS TQuickRep DO
                 BEGIN
                  Print;
                 END;
              END;
         fmRapportForm.Close;
         END;
     FINALLY TRY BEGIN
                    fmRapportForm.Free;
                    WITH Sender AS TObject DO Enabled := True;
                 END;
             EXCEPT Application.MessageBox('Er ging iets fout! Probeer nog eens.',
                    PCHAR(cnstApplMessage), mb_OK + mb_IconInformation);
             END;
     END;
0

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 5
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now