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.
Hans HoogbergenEducational DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Geert GOracle 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 VukSoftware architectCommented:
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Sinisa VukSoftware architectCommented:
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 GOracle dbaCommented:
You have a memory leak when you create a quickreport ?
0
Geert GOracle 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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.