Bug Report B145502
Visible to All Users

AV in DLL using dxRibbon

created 15 years ago

We have a DLL that keeps giving AV errors. It seems to be linked with the Ribbon bars. Below you can see the exception log.
Any ideas ?
Last message:
Application Name: C:\Program Files\Stokers Ltd\Instore\SOS.exe
Version: 2.2.0.131
Description: In-Furniture Main Program
Error Message: Access violation at address 03156394 in module 'STOKERS_EMAIL.DLL'. Read of address 234760AA
Machine: DWTV-SVR
Logged On as :DTV_2
User: LORRAINE WINSTANLEY
ERROR IN: C:\WINDOWS\system32\STOKERS_EMAIL.DLL VERSION: 3.2.0.105
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxRibbon.pas:11802
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:38283
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:38282
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxRibbon.pas:5567
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:40673
C:\Program Files\Stokers Ltd\Instore\SOS.exe:cxContainer.pas:6159
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:cxContainer.pas:6159
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:19489
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:19441
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:42088
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:19259
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:19266
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:19265
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:41145
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:43472
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:20749
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:20743
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:43444
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:40331
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:40303
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:28445
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:28440
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:28853
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:28833
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:dxBar.pas:17586
C:\WINDOWS\system32\STOKERS_EMAIL.DLL:Main.pas:339
C:\Program Files\Stokers Ltd\Instore\SOS.exe:MainGUI.pas:456
C:\Program Files\Stokers Ltd\Instore\SOS.exe:MainGUI.pas:444
C:\Program Files\Stokers Ltd\Instore\SOS.exe:GUI_Main.pas:895
C:\Program Files\Stokers Ltd\Instore\SOS.exe:cxButtons.pas:1867
C:\Program Files\Stokers Ltd\Instore\SOS.exe:dxLayoutControl.pas:6400
C:\Program Files\Stokers Ltd\Instore\SOS.exe:SOS.dpr:24
; DXSKINSDXRIBBONPAINTER.TDXSKINRIBBONPAINTER.GETSKINDATA (LINE=338 - OFFSET=0) ; -----------------------------------------------------------------------------
03163F28 PUSH EBX
03163F29 PUSH ESI
03163F2A MOV ESI, EDX
03163F2C MOV EBX, EAX
;
; LINE=339 - OFFSET=1
; -------------------
03163F2E CALL CXLOOKANDFEELPAINTERS.GETEXTENDEDSTYLEPAINTERS
03163F33 MOV ECX, ESI
03163F35 MOV EDX, [EBX+$0624]
03163F3B MOV EDX, [EDX+$44] ; <-- EXCEPTION
03163F3E CALL CXLOOKANDFEELPAINTERS.TCXEXTENDEDSTYLEPAINTERS.GETPAINTERDATA
;
; LINE=340 - OFFSET=2
; -------------------
03163F43 POP ESI
03163F44 POP EBX
03163F45 RET

Comments (3)
DevExpress Support Team 15 years ago

    Hello Mark.
    First, please accept my apologies for the delay in responding.
    Unfortunately, this information is not enough to determine the exact cause of this problem. Please try to create some example to reproduce this problem and attach it to your next message.
    We suppose that this problem is related to incorrect initializing of the DLL with Ribbon. Do you call the dxInitializeGDIPlus/dxFinalizeGDIPlus methods in your DLL?
    Please review the following reports, which contain helpful information:
    B142804: OCX with a dxRibbon causes error when creating
    B94305: Need to Call dxFinalizeGDIPlus before free library
    B93061: AV exiting DLL with DX components
    Best regards,
    Ingvar.

      The procedure that is causing the problem has not been changed for at least 6 months. The AV problem has only really started in the past 3-4 weeks. I use many .dll's and call them all in the same fashion - see below
      I'll have a look at your suggested links (one of which was mine a while back !) - and see if it sheds any light on the problem.
      Mark
       Handle := LoadLibrary('STOKERS_EMAIL.DLL');
           if Handle <> 0 then
              begin
                   try
                    @SendMessage := GetProcAddress(Handle,'Send_Message');
                    dxInitializeGDIPlus := GetProcAddress(Handle,'dxInitializeGDIPlus');
                    if Assigned(dxInitializeGDIPlus) then
                      dxInitializeGDIPlus;
                    if @SendMessage <> nil then
                      SendMessage(Application.Handle);
                   finally
                    dxFinalizeGDIPlus := GetProcAddress(Handle,'dxFinalizeGDIPlus');
                    if Assigned(dxFinalizeGDIPlus) then
                      dxFinalizeGDIPlus;
                    FreeLibrary(Handle);
                  end;
              end;

      DevExpress Support Team 15 years ago

        Hello Mark.
        Thank you for the response.
        Unfortunately, I did not manage to reproduce this problem. Attached is an example that works as expected on my side. Please modify it to illustrate the problem or provide us with your own sample project. We will test it and try to find an acceptable solution for you.
        Best regards,
        Ingvar.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.