Go Premium for a chance to win a PS4. Enter to Win

x
?

DELPHI app ADO and LOEPRO32.dll

Posted on 2017-10-10
10
Low Priority
?
40 Views
Last Modified: 2017-10-15
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
Comment
Question by:Hans Hoogbergen
  • 5
  • 3
  • 2
10 Comments
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 42325147
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
 
LVL 28

Expert Comment

by:Sinisa Vuk
ID: 42325178
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
 

Author Comment

by:Hans Hoogbergen
ID: 42325360
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 28

Expert Comment

by:Sinisa Vuk
ID: 42325370
Cannot see exception text....to small. What you do (code ) when exception raise?
0
 

Author Comment

by:Hans Hoogbergen
ID: 42325379
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
 

Author Comment

by:Hans Hoogbergen
ID: 42325406
Installed Madexcept
Opened en clicked about everything
No exceptions in app

did create leak report
maybe has nothing todo with this
0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 42330619
You have a memory leak when you create a quickreport ?
0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 42330621
Current versions are unicode.

Pre d2009 are not.

Maybe it's that
0
 

Author Comment

by:Hans Hoogbergen
ID: 42332372
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Join & Write a Comment

The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question