Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Memory Leak in RibbonBar example Collapse All
Subject Author Date
Roongrit Charoensupkul Oct 3, 2006 - 8:28 PM

1. Click on File menu.
2. Choose "Exit" from the pop up menu.

the Output shows as follow

* * * TERMINATING DYNAMIC LIBRARY: ProfUIS version 2.60 * * *
Detected memory leaks!
Dumping objects ->
..\Src\ExtCmdIcon.cpp(6467) : {7740} normal block at 0x01F909F0, 4192 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD F0 09 F9 01
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7585} normal block at 0x01F8DCE8, 66 bytes long.
Data: <| Ox > 7C D9 4F 78 18 00 00 00 18 00 00 00 01 00 00 00
..\Src\ExtToolBoxWnd.cpp(4150) : {7584} normal block at 0x01F8F8D8, 152 bytes long.
Data: < g | > C4 67 C8 00 7C B7 F8 01 D4 C7 BE 00 00 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7582} normal block at 0x01F8C768, 66 bytes long.
Data: <| Ox > 7C D9 4F 78 18 00 00 00 18 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\array_p.cpp(110) : {7581} normal block at 0x01F8C708, 36 bytes long.
Data: < T P ( > 90 54 F7 01 50 C1 F8 01 28 C2 F8 01 80 C3 F8 01
..\Src\ExtToolBoxWnd.cpp(4150) : {7580} normal block at 0x01F8C630, 152 bytes long.
Data: < g | > C4 67 C8 00 7C B7 F8 01 D4 C7 BE 00 00 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7578} normal block at 0x01F8C5B0, 66 bytes long.
Data: <| Ox > 7C D9 4F 78 18 00 00 00 18 00 00 00 01 00 00 00
..\Src\ExtToolBoxWnd.cpp(4150) : {7577} normal block at 0x01F8C4D8, 152 bytes long.
Data: < g | > C4 67 C8 00 7C B7 F8 01 D4 C7 BE 00 00 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7575} normal block at 0x01F8C458, 66 bytes long.
Data: <| Ox > 7C D9 4F 78 18 00 00 00 18 00 00 00 01 00 00 00
..\Src\ExtToolBoxWnd.cpp(4150) : {7574} normal block at 0x01F8C380, 152 bytes long.
Data: < g | > C4 67 C8 00 7C B7 F8 01 D4 C7 BE 00 00 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7572} normal block at 0x01F8C300, 66 bytes long.
Data: <| Ox > 7C D9 4F 78 18 00 00 00 18 00 00 00 01 00 00 00
..\Src\ExtToolBoxWnd.cpp(4150) : {7571} normal block at 0x01F8C228, 152 bytes long.
Data: < g | > C4 67 C8 00 7C B7 F8 01 D4 C7 BE 00 00 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7569} normal block at 0x01F8DBD8, 50 bytes long.
Data: <| Ox > 7C D9 4F 78 10 00 00 00 10 00 00 00 01 00 00 00
..\Src\ExtToolBoxWnd.cpp(4150) : {7567} normal block at 0x01F8C150, 152 bytes long.
Data: < g | > C4 67 C8 00 7C B7 F8 01 D4 C7 BE 00 00 00 00 00
{7538} normal block at 0x01F8EEA8, 2548 bytes long.
Data: < O > B8 B1 F2 01 00 00 00 00 00 00 00 00 EC 4F 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7532} normal block at 0x01F8DB78, 30 bytes long.
Data: <| Ox > 7C D9 4F 78 06 00 00 00 06 00 00 00 01 00 00 00
{7528} normal block at 0x01F8EA98, 980 bytes long.
Data: < M O > E0 4D F4 01 00 00 00 00 00 00 00 00 FC 4F 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7522} normal block at 0x01F8DC78, 46 bytes long.
Data: <| Ox > 7C D9 4F 78 0E 00 00 00 0E 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7515} normal block at 0x01F8DB10, 42 bytes long.
Data: <| Ox > 7C D9 4F 78 0C 00 00 00 0C 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7512} normal block at 0x01F8DAB0, 36 bytes long.
Data: <| Ox > 7C D9 4F 78 09 00 00 00 09 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7511} normal block at 0x01F8DA30, 62 bytes long.
Data: <| Ox > 7C D9 4F 78 16 00 00 00 16 00 00 00 01 00 00 00
..\Src\ExtCmdIcon.cpp(6467) : {7510} normal block at 0x01F8D590, 1120 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD 90 D5 F8 01
..\Src\ExtPopupMenuWnd.cpp(7340) : {7508} client block at 0x01F8CF00, subtype c0, 1620 bytes long.
a CExtPopupMenuWnd object at $01F8CF00, 1620 bytes long
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7499} normal block at 0x01F8EA10, 76 bytes long.
Data: <| Ox > 7C D9 4F 78 1D 00 00 00 1D 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7498} normal block at 0x01F8E930, 160 bytes long.
Data: <| OxG G > 7C D9 4F 78 47 00 00 00 47 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7492} normal block at 0x01F8E8A0, 78 bytes long.
Data: <| Ox > 7C D9 4F 78 1E 00 00 00 1E 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7491} normal block at 0x020703A8, 150 bytes long.
Data: <| OxB B > 7C D9 4F 78 42 00 00 00 42 00 00 00 01 00 00 00
{7490} normal block at 0x01F8E490, 980 bytes long.
Data:

50 E7 F3 01 00 00 00 00 00 00 00 00 F8 4F 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7484} normal block at 0x020704A8, 50 bytes long.
Data: <| Ox > 7C D9 4F 78 10 00 00 00 10 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7483} normal block at 0x01F8E3E0, 116 bytes long.
Data: <| Ox1 1 > 7C D9 4F 78 31 00 00 00 31 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7476} normal block at 0x02070348, 36 bytes long.
Data: <| Ox > 7C D9 4F 78 09 00 00 00 09 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7475} normal block at 0x02070298, 112 bytes long.
Data: <| Ox/ / > 7C D9 4F 78 2F 00 00 00 2F 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7472} normal block at 0x02070238, 30 bytes long.
Data: <| Ox > 7C D9 4F 78 06 00 00 00 06 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7471} normal block at 0x020701C0, 56 bytes long.
Data: <| Ox > 7C D9 4F 78 13 00 00 00 13 00 00 00 01 00 00 00
..\Src\ExtCmdIcon.cpp(6467) : {7470} normal block at 0x01F8DF40, 1120 bytes long.
Data: < @ > CD CD CD CD CD CD CD CD CD CD CD CD 40 DF F8 01
..\Src\ExtPopupMenuWnd.cpp(7340) : {7467} client block at 0x01F8C870, subtype c0, 1620 bytes long.
a CExtPopupMenuWnd object at $01F8C870, 1620 bytes long
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7457} normal block at 0x02088EF8, 46 bytes long.
Data: <| Ox > 7C D9 4F 78 0E 00 00 00 0E 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7456} normal block at 0x01F8C080, 142 bytes long.
Data: <| Ox> > > 7C D9 4F 78 3E 00 00 00 3E 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7450} normal block at 0x01F6A0E8, 68 bytes long.
Data: <| Ox > 7C D9 4F 78 19 00 00 00 19 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7449} normal block at 0x01F8BFB0, 146 bytes long.
Data: <| Ox@ @ > 7C D9 4F 78 40 00 00 00 40 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7443} normal block at 0x01F8BF28, 72 bytes long.
Data: <| Ox > 7C D9 4F 78 1B 00 00 00 1B 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7442} normal block at 0x01F69738, 160 bytes long.
Data: <| OxG G > 7C D9 4F 78 47 00 00 00 47 00 00 00 01 00 00 00
{7441} normal block at 0x01F69328, 980 bytes long.
Data: <( O > 28 D1 F2 01 00 00 00 00 00 00 00 00 F2 4F 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7432} normal block at 0x02088E70, 70 bytes long.
Data: <| Ox > 7C D9 4F 78 1A 00 00 00 1A 00 00 00 01 00 00 00
{7431} normal block at 0x01F69CD8, 980 bytes long.
Data: <` T# > 60 20 F3 01 00 00 00 00 00 00 00 00 54 23 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7425} normal block at 0x02088F70, 60 bytes long.
Data: <| Ox > 7C D9 4F 78 15 00 00 00 15 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7418} normal block at 0x02088DF8, 58 bytes long.
Data: <| Ox > 7C D9 4F 78 14 00 00 00 14 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7415} normal block at 0x02088D80, 58 bytes long.
Data: <| Ox > 7C D9 4F 78 14 00 00 00 14 00 00 00 01 00 00 00
..\Src\ExtCmdIcon.cpp(6467) : {7414} normal block at 0x01F68E88, 1120 bytes long.
Data: < > CD CD CD CD 88 8E F6 01 00 00 FF 00 00 FF 00 00
..\Src\ExtPopupMenuWnd.cpp(7340) : {7412} client block at 0x01F687F8, subtype c0, 1620 bytes long.
a CExtPopupMenuWnd object at $01F687F8, 1620 bytes long
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7411} normal block at 0x02088CA8, 154 bytes long.
Data: <| OxD D > 7C D9 4F 78 44 00 00 00 44 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7404} normal block at 0x01F8BEB0, 58 bytes long.
Data: <| Ox > 7C D9 4F 78 14 00 00 00 14 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7403} normal block at 0x01F8BDE0, 148 bytes long.
Data: <| OxA A > 7C D9 4F 78 41 00 00 00 41 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7400} normal block at 0x01F8BD80, 32 bytes long.
Data: <| Ox > 7C D9 4F 78 07 00 00 00 07 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7399} normal block at 0x01FA8FB8, 50 bytes long.
Data: <| Ox > 7C D9 4F 78 10 00 00 00 10 00 00 00 01 00 00 00
..\Src\ExtCmdIcon.cpp(6467) : {7398} normal block at 0x01F69838, 1120 bytes long.
Data: < 8 > CD CD CD CD 38 98 F6 01 00 00 FF 00 00 FF 00 00
..\Src\ExtPopupMenuWnd.cpp(7340) : {7396} client block at 0x01F68168, subtype c0, 1620 bytes long.
a CExtPopupMenuWnd object at $01F68168, 1620 bytes long
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7387} normal block at 0x01FF01D0, 68 bytes long.
Data: <| Ox > 7C D9 4F 78 19 00 00 00 19 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7386} normal block at 0x01FF0128, 104 bytes long.
Data: <| Ox+ + > 7C D9 4F 78 2B 00 00 00 2B 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7380} normal block at 0x01FF00A8, 68 bytes long.
Data: <| Ox > 7C D9 4F 78 19 00 00 00 19 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7379} normal block at 0x01FD8E50, 134 bytes long.
Data: <| Ox: : > 7C D9 4F 78 3A 00 00 00 3A 00 00 00 01 00 00 00
{7378} normal block at 0x02088898, 980 bytes long.
Data: < O > E8 0B F3 01 00 00 00 00 00 00 00 00 F0 4F 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7372} normal block at 0x01FF0028, 68 bytes long.
Data: <| Ox > 7C D9 4F 78 19 00 00 00 19 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7371} normal block at 0x01FD8F50, 104 bytes long.
Data: <| Ox+ + > 7C D9 4F 78 2B 00 00 00 2B 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7364} normal block at 0x01FA8F38, 68 bytes long.
Data: <| Ox > 7C D9 4F 78 19 00 00 00 19 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7363} normal block at 0x01FA8E70, 134 bytes long.
Data: <| Ox: : > 7C D9 4F 78 3A 00 00 00 3A 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7360} normal block at 0x01FA0B58, 40 bytes long.
Data: <| Ox > 7C D9 4F 78 0B 00 00 00 0B 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7359} normal block at 0x01F75568, 58 bytes long.
Data: <| Ox > 7C D9 4F 78 14 00 00 00 14 00 00 00 01 00 00 00
..\Src\ExtCmdIcon.cpp(6467) : {7358} normal block at 0x020883F8, 1120 bytes long.
Data: < > CD CD CD CD F8 83 08 02 00 00 FF 00 00 FF 00 00
..\Src\ExtPopupMenuWnd.cpp(7340) : {7356} client block at 0x01FA04C8, subtype c0, 1620 bytes long.
a CExtPopupMenuWnd object at $01FA04C8, 1620 bytes long
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7350} normal block at 0x01D12A60, 28 bytes long.
Data: <| Ox > 7C D9 4F 78 05 00 00 00 05 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7343} normal block at 0x01E36C90, 34 bytes long.
Data: <| Ox > 7C D9 4F 78 08 00 00 00 08 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {7336} normal block at 0x01F70FC8, 32 bytes long.
Data: <| Ox > 7C D9 4F 78 07 00 00 00 07 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\array_p.cpp(67) : {7335} normal block at 0x01D188F0, 4 bytes long.
Data: < > AC BC F8 01
..\Src\ExtToolBoxWnd.cpp(1467) : {7333} normal block at 0x01F75490, 152 bytes long.
Data: < g | > C4 67 C8 00 7C B7 F8 01 D4 C7 BE 00 00 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\array_p.cpp(67) : {7332} normal block at 0x01F74958, 4 bytes long.
Data: < > F4 B8 F8 01
..\Src\ExtCmdIcon.cpp(6467) : {7330} normal block at 0x01FA0028, 1120 bytes long.
Data: < ( > CD CD CD CD 28 00 FA 01 00 00 FF 00 00 FF 00 00
..\Src\ExtRibbonBar.cpp(1543) : {7328} client block at 0x01F8B080, subtype c0, 3268 bytes long.
a CExtRibbonGalleryPopupMenuWnd object at $01F8B080, 3268 bytes long
Object dump complete.

Technical Support Oct 4, 2006 - 9:27 AM

Thank you for reporting the bug. To fix it, please update the following part of the CExtPopupMenuWnd::_OnMouseClick() method in the ExtPopupMenuWnd.cpp file:

        if(    nHitTest == IDX_RIBBON_FILE_MENU_OPTIONS_BUTTON
            || nHitTest == IDX_RIBBON_FILE_MENU_EXIT_BUTTON
            )
        {
            if( bLButtonUpCall )
            {
                DWORD dwButtonType = 0;
                switch( nHitTest )
                {
                case IDX_RIBBON_FILE_MENU_OPTIONS_BUTTON:
                    dwButtonType = TPMX_RIBBON_OPTIONS_BUTTON;
                break;
                case IDX_RIBBON_FILE_MENU_EXIT_BUTTON:
                    dwButtonType = TPMX_RIBBON_EXIT_BUTTON;
                break;
                } // switch( nHitTest )
                RIBBONFILEMENUBUTTONINVOCATION _rfmbi( dwButtonType, this );
                m_nCurIndex = IDX_NOTHING;
                _SetCapture();
                if( nHitTest == IDX_RIBBON_FILE_MENU_EXIT_BUTTON ) // THIS LINE WAS ADDED
                    m_dwTrackFlags |= TPMX_NO_FADE_OUT_ANIMATION; // THIS LINE WAS ADDED
                DestroyWindow();
                _rfmbi.Notify();
            } // if( bLButtonUpCall )
            else
            {
                CRect rcItem;
                _GetItemRect( nHitTest, rcItem );
                if( ! rcItem.IsRectEmpty() )
                    InvalidateRect( &rcItem );
            } // else from if( bLButtonUpCall )
            return true;
        }
The CExtRibbonBar and CExtRibbonPage classes have been greatly improved since the release of 2.60. The latest code features new ribbon bar based window captions, new 4 paint managers, auto hiding, scaling that depends on the screen DPI and better fonts friendly to complex languages were added. The latest source code is always available for our customers via ftp.